设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5143|回复: 2

[求助] 好困惑啊,帮帮忙?

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
$ F! j* \! F, A! y8 D- Z' pimport swarm.Globals;5 g7 G1 M) |+ v, i! f+ @

. w/ ]7 k6 `$ q+ S" v  ipublic class test {
. b' g. t/ |4 {  c- a6 g /**, v" `6 `+ ~6 Q/ z8 B
  * @param args
$ [3 z6 t+ b+ {* w# P' z  */
* ~$ m% y! G- y" D( [ public static void main(String[] args) {
% X4 s& Z) ^6 x' S; Q5 f    ! J3 a6 M, o8 T8 w
     int y=(int)(10*Math.random());
$ X2 ]% g- x8 B; @     System.out.println("result is "+y);! m3 B5 i5 P4 t0 Q/ s

# ^! U. {" _6 e+ G, }! f5 x     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
* Q) ~1 m! a* Y1 h0 s( U' r  System.out.print(z+" re");
. Q0 V/ u7 Q! \1 x2 s  }+ Z5 O2 l1 k; h+ [6 z$ P6 m) _5 x5 |1 B
}& `% H  W2 ]$ j/ k/ j0 f
% |4 V" ^$ e% A6 e
结果是:/ d7 C  ~% ~# _  [+ |% c& N
result is 2
, ]) C- q, O) U+ [#
/ B, z0 Y3 n+ Q) _4 [, @' r0 N) {# An unexpected error has been detected by Java Runtime Environment:" s" L0 W1 }2 U% `. c% R
#$ v5 f8 ^; M# `4 \
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
. ]' @5 g7 {$ d7 i' T#
2 `$ y) S/ i3 x8 Q  a2 g# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)- T" m1 N% o5 Q$ c/ n
# Problematic frame:/ j* p. V' t* q. D; {" ]
# C  [javaswarm.dll+0xb8305]% J9 f0 `) A9 k! z1 I* D
#) l! G6 K) ?7 b3 r1 v" j
# An error report file with more information is saved as hs_err_pid1064.log
 楼主| 发表于 2010-2-1 11:07:41 | 显示全部楼层
怎么没有人帮我啊?我很急啊?版主帮帮吧
 楼主| 发表于 2010-2-1 11:11:40 | 显示全部楼层
看来这地方好久都没有人来了?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-1-19 19:10 , Processed in 0.018104 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表