设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5526|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
6 B1 j2 o% q8 L' M0 a7 Q0 Iimport swarm.Globals;' y# k* }0 _; ^, f/ v

( }+ g( ~9 W- p0 D5 ]9 b$ fpublic class test {
- r/ q, B; v& r0 p; K! B /**$ q* [0 I& s( f# d# c5 c0 z
  * @param args
2 M  b" j" x( U" b+ e' c) P1 V& g/ l  */
, B( ]  E0 e* U  t! j9 G- P4 c public static void main(String[] args) {$ b/ [+ f7 d- Q9 X% H: G
   
( Q( x6 e  P5 g     int y=(int)(10*Math.random());
! f7 X9 R! R2 T     System.out.println("result is "+y);
( n& \) j. w, [+ s; t7 y& i( s
# o- K- z9 U3 R5 b- d     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
" O' R( ]8 s: w  x! L8 K, i  System.out.print(z+" re");
/ C8 W0 [+ O7 W" d( K- Y$ S  }. c0 T+ I* E/ q( g
}0 Z+ d% p& C! ~0 J
2 g: ?" I7 {6 j( X% l
结果是:
9 h) R: `7 d2 {) b3 e: Uresult is 2& p- e9 M2 q$ {$ J
#0 t8 H: r' n$ X2 A# U+ A1 g
# An unexpected error has been detected by Java Runtime Environment:
# V7 [/ H9 [! ]! u; F( _#
/ w, e6 ^: V8 }) E( D8 \0 u#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
6 w) s0 M6 w" q! c#
8 f: f$ \/ L5 B3 |/ V# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)5 A. k% c6 r0 m7 o7 u
# Problematic frame:& h' G: i( n; C& |' i
# C  [javaswarm.dll+0xb8305]
5 |: t2 F' {+ ^+ r2 n#9 E- f" N1 f- i! E' n: z  l- Q$ O
# 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-3-22 06:34 , Processed in 0.017132 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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