设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6083|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
; x+ O% U- v: i6 V  G* Uimport swarm.Globals;
6 Y6 C5 D" p1 h; L
0 N7 Q: g+ M5 ~6 |; Ppublic class test {
7 I9 e6 o( d/ s7 Y/ S4 R, w4 b8 L /**2 F% G- @6 h: |; v
  * @param args
3 X$ _% A$ A" s1 n1 ^; Z6 p- M: q  */
% [! I- f, i6 c8 T0 u6 I* a6 U public static void main(String[] args) {" o& D, L1 ^( _/ c1 P7 [; v! H
   
) I+ d; Y8 y7 a% W- q0 R     int y=(int)(10*Math.random());
2 p3 E8 J/ w: D% x! Q# }' C) V     System.out.println("result is "+y);  s1 ~6 u) o  q" |
) u1 r( e( p; T) N
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
$ U) Q0 L. G2 i) n2 c  System.out.print(z+" re");& J6 e- S2 r- Y, @! T2 e4 w# e
  }5 Y' g& L  |& W3 ]% j; M
}6 j: d2 n* q; X& W. i
2 |- o/ E0 Q1 \' G: A3 J& }
结果是:
. b- q; W% Z. K& n' \& {6 Tresult is 2# B7 `9 T7 ^2 O
#
  Z9 f6 c' t- M' C& z5 n2 \# An unexpected error has been detected by Java Runtime Environment:
& u) h! t) ]/ R0 L1 @2 J#; b$ q% x; B9 T/ m- g  X8 [; @% u
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
2 s; T. F9 r  P/ L2 Z4 |3 S#
6 T$ n  H% t  l- \7 T- b6 ^3 u# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
) Q) W( I" ^9 y* W$ ]# Problematic frame:; f+ q" C7 w- d; ^: l
# C  [javaswarm.dll+0xb8305]
4 F( a0 {/ q7 P7 R#
) ?6 z3 t' `+ h+ J% k# 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-11 20:55 , Processed in 0.018085 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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