设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5858|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
. R$ d+ t: M" [% d& Nimport swarm.Globals;6 T7 M7 k4 f' h+ ~% ^$ `

8 f- |( H: g( g5 [, dpublic class test {
6 o5 n0 B; _6 o+ { /**
3 P; a! E/ @9 ^! O, |) X8 t  * @param args
3 m  i) W( s/ R; b: Y  */6 o9 Y6 o! A) ~, W0 o9 z1 J
public static void main(String[] args) {
. T! e) o4 X# K+ ?# K  S$ T/ G   
+ D+ l( a: P. w/ i' P     int y=(int)(10*Math.random());$ a8 F+ s+ k- a9 [. m
     System.out.println("result is "+y);
/ G7 |; B* v9 a. B' O" ]+ r$ F" Y# s7 J2 F* s
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
( M: c: D" c; S$ p* }  T2 j0 K  System.out.print(z+" re");
0 X) q6 C+ m( k0 _2 y5 d! ], j  }
& \- E$ B; x9 r}
, s& Q1 S8 ]9 R" `) l+ g: O6 v+ o  Z
结果是:
9 T6 i3 c2 D/ e8 O) `result is 2
  u1 S  b: N. h2 e0 a6 G  f( ~#
0 i2 U, N* I, ]; D! R# An unexpected error has been detected by Java Runtime Environment:) ^8 l3 }" c5 x* L' W
#
/ }$ B7 W. z; l1 U. \. m  A#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068- t5 B1 O& m/ x9 o
#6 e* g6 L) h* {7 D
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)6 D5 O" a6 O4 `  ^7 [& ]- U
# Problematic frame:
1 @" f9 x: H# g" T# C  [javaswarm.dll+0xb8305]* W; j' W: Z+ [* }$ B0 o
#
) P+ n; |7 ^5 K( t! w  s# 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-5-8 23:13 , Processed in 0.018042 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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