设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5132|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
2 k! k. s5 r. E6 Simport swarm.Globals;
7 y* a6 D8 ~# }; k
0 k1 T" d. H' d7 @0 Zpublic class test {: W( I+ N8 ^7 I" G# ]. z8 ]
/**
0 s& \3 g4 N+ y% ?1 Z  * @param args+ ?3 o' o7 C* x+ A
  */
; C2 ~& {5 I) ^/ |$ Z- Q' P public static void main(String[] args) {* Q9 \4 V* s- W2 v, I; m9 M
    3 z9 Y1 A0 i% z8 ^+ d5 }
     int y=(int)(10*Math.random());
0 ?, x' N, L1 Y2 |6 a9 M% o  ?     System.out.println("result is "+y);
* [( Z% E7 Y- [1 v) N* Q: W
3 `4 e0 R. }) ^     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);# ^  w; |+ d9 E; U0 _
  System.out.print(z+" re");
+ I5 z; X) o# U9 S) N! e  }1 w0 h7 }3 f% E4 `# v
}4 p4 H/ x) v" `4 V

& j9 J6 {7 q+ l' A, ]7 J7 d/ L结果是:
- I' x) @% G1 w9 j5 R3 j% \; C$ Vresult is 2# H$ I2 o/ I2 n
#
6 X. Q6 X8 ?- S1 T# An unexpected error has been detected by Java Runtime Environment:
- r% w/ c6 Z5 l1 ^4 I#  a- w* f; W4 s& [8 ^2 Z: W+ `! P& w% n0 W
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
& P  Y: D# N- P4 s& g) o#
( d* k( P& b$ [# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)- H. n/ P. I; v) @9 r# n
# Problematic frame:* c8 ~8 x! X6 b: N
# C  [javaswarm.dll+0xb8305]
2 x4 e( I4 t+ J4 V/ K8 u#2 _9 S/ {7 M% ?0 {( c" s+ T
# 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-18 17:28 , Processed in 0.014128 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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