设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5944|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。2 W+ M- a/ _+ n7 X! S6 j
import swarm.Globals;
4 l6 T  s9 c# U. f( ^
! o  d! l1 U2 F0 V, Y8 S; vpublic class test {4 e9 k$ p/ L/ n4 i# K
/**
; j9 |$ x: e+ s# K. K9 Q) P% n" c  * @param args% K" Z; r- q+ r
  */& N# t% x- K) ~) M2 u$ O' P1 \
public static void main(String[] args) {
: H2 i* z& O; s" z2 K1 L) d8 [    , b- B0 a! R/ v2 i) E
     int y=(int)(10*Math.random());
& U7 ~' Q. H! N. b) O# A+ ~5 e     System.out.println("result is "+y);
. V" t/ P. g& I% _
( M% p$ A4 y/ `     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);  t" L/ V& P( D3 x4 F6 t
  System.out.print(z+" re");
7 b( u& f5 D- u  h* }  }1 s9 Z! }  X% F- p+ D2 T
}
& X: ~8 X+ I2 r( A! Z1 G+ x" p. r) C, M- s6 k  G5 D
结果是:
& ~" m6 w" h% j8 S. yresult is 2+ n0 _4 i9 K* K
#! z3 E2 g" R! }2 r% @
# An unexpected error has been detected by Java Runtime Environment:
/ G( F! X5 {2 b4 w#
# ^1 U3 F$ A( S; A( F#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
, I2 p5 g$ h3 @; [. E#2 ^/ R, g: n/ \) s# ?5 R0 J
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)6 w9 n: n' {+ v+ ~* _: g( f: W" |
# Problematic frame:
6 w# Z& E( w+ t# C  [javaswarm.dll+0xb8305]
7 Z; a- I% s6 E2 S% ^* g#( H, S4 H& L; F4 V0 P
# 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-20 03:04 , Processed in 0.019374 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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