设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2850|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
) s+ G5 l" \# G* E, S" Timport swarm.Globals;% K( ?6 z9 N# E: j$ K- W. W# U
5 \  c% @6 _5 c& x
public class test {
( w. O/ A7 w/ ~/ `& @4 e /**% D' ]' Q1 |# h
  * @param args
& r1 f! }1 I( l4 n: l2 L  */1 e$ v# u* s$ t0 C7 q4 @
public static void main(String[] args) {
$ F8 |/ C) c1 U' X1 }    8 u0 e, m: g/ K
     int y=(int)(10*Math.random());
2 P  \$ S3 X# \0 g* x, g3 s5 F     System.out.println("result is "+y);
5 |' I- Q. C2 o' W- ~* u  n1 y. d  H0 L/ b' b
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);2 |5 a: E6 V. u
  System.out.print(z+" re");
' U" G" w; o' E4 K" B: a8 S, I  }  J+ ?$ ]7 E9 l
}
0 u, X+ ?+ ^& J7 O1 q+ F1 ]
) |+ q3 |0 Q4 F- q( C结果是:
& W9 r# _1 Q: \! r. z2 a  ~% sresult is 2. A0 {% {2 D7 F+ I0 o7 Z
#
$ s. s  O! L3 O- w# An unexpected error has been detected by Java Runtime Environment:
% F" \( k8 l& k% W#- c% ~) g; A+ D4 y# q7 W7 E
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
5 `' M& g; r6 Z#
1 i' c4 c8 v5 L; P# E. ?2 p0 s# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)' i. B# B% T' j( r' s1 e
# Problematic frame:
9 O& F2 F0 V$ ?# K1 a$ U; l( ?3 _# C  [javaswarm.dll+0xb8305]! W$ V/ k. i( V: J! x, B$ E
#- @, u2 T& F! x9 K
# 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, 2024-6-15 07:31 , Processed in 0.020581 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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