设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6152|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。6 f8 X5 K& U& x9 c1 g
import swarm.Globals;) S! \/ k7 n* ]- Z* \
, f, t& q# M, u, Q, M# K. M+ O
public class test {  A  J0 Y+ N- W. ~2 a( x, D. O
/**; q4 i7 y* X) A8 y. \
  * @param args5 Y  x. T0 f" q9 ^
  */- k# }' ^' D' U- x4 t/ P. \4 U4 o
public static void main(String[] args) {
$ G& j& V4 B) Y* @7 m, q, O& Q   
  _1 h' j$ S, r. G4 K. B- S     int y=(int)(10*Math.random());' P1 w  r3 h9 }) A' |  Y
     System.out.println("result is "+y);$ ~" t! M, _1 Q6 i; w0 u

- z3 m( h; z4 r5 b& ?5 |! M     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);9 @9 c" H# a) L" e& i0 Y
  System.out.print(z+" re");2 o: t. x1 h% R+ g! Z) Z/ l8 v8 [
  }2 x0 G9 x" i9 \6 D* w
}' T# T2 D/ ?' L! w7 `" E! K
  k. X' _& U+ F
结果是:6 n+ a5 X2 r/ ~5 z( Q! R
result is 2' B9 X9 c7 U0 b( T
#
+ ^# L4 k% @0 `1 X# An unexpected error has been detected by Java Runtime Environment:
& \4 @0 N* r' [% i9 l# q) Y' \#
0 `% |' B- N2 v#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068  R) ?% o# J/ c5 U# T" I
#4 O* O' X% @1 i  l
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
: \& }# b# i! k& Q# Problematic frame:  Q, q, s$ M9 m6 r
# C  [javaswarm.dll+0xb8305]) C9 n+ t4 \9 W+ `* U9 a2 _
#
2 p  \$ Z; h1 V  x# 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-6-22 16:50 , Processed in 0.013815 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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