设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6332|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。( r" ]  g* l, s
import swarm.Globals;) V3 F. K8 o( N- o8 k* Q" O% [8 @

7 e2 @" R9 n4 O/ \public class test {( A4 G7 D8 j! G
/**
: q) N0 M1 w# b. Q! E' D2 }  * @param args( J) U4 s& x$ N0 P. @
  */
: j' g. j: b! b public static void main(String[] args) {9 V& W+ I3 K* W" }- q+ o
   
, F4 X0 u: c7 a, w2 n& r! k     int y=(int)(10*Math.random());
% B* _# ^' U! E8 d     System.out.println("result is "+y);
, F  J5 X/ ~3 o$ E( a1 G; Q3 Y( i" |3 f- _# i/ A
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
! ~0 Q- u0 O( q4 x& i- s3 }7 e  System.out.print(z+" re");
; t1 J, |- T1 D& U  j% L; q  }
0 W  Y) h# ?( c0 E9 H}' c% ~9 f3 s+ L/ b# F% E

, D% K0 Q: J1 ^结果是:
$ Q% o9 f$ U5 z! j7 ?9 d7 b3 _result is 2
  R- m- N* p+ j& \2 x#
1 r1 U/ J' l/ P" R0 }) T# s# An unexpected error has been detected by Java Runtime Environment:" k+ l# t/ L  v, x& o
#9 M1 D8 t' {4 S* ?- J9 m0 F% v# E
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=10684 u9 a6 N! x1 ]; Z
#
0 g$ h5 U1 Y7 c- F- z# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
6 e5 `6 V* A4 n7 W. z+ x# Problematic frame:
8 w9 I, u4 O' j* `# C  [javaswarm.dll+0xb8305]
3 N/ E+ ?; X- E1 h2 b: y* z#4 s+ J! r" _. Z9 h% H
# 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-7-14 13:47 , Processed in 0.025142 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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