设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4479|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
- P& L$ W# ^! U4 a5 Nimport swarm.Globals;0 E! V5 b8 p5 \* }6 |

" k/ b( K% }4 T  D, P% u, ^' ypublic class test {
! t" p' |- ]$ c9 q2 P /**4 k! v' a- u$ v( q; s& [1 q9 L, L
  * @param args
( Z7 @3 h; ?0 e5 n4 y  */. H9 S8 k& o* H$ X- i4 {' O
public static void main(String[] args) {- Q& u6 Q% h1 a( b6 D5 ^
   
5 r5 J4 G) p1 s2 d     int y=(int)(10*Math.random());0 |, \  r& R! L/ v9 R0 @% I. e8 D
     System.out.println("result is "+y);% y2 t) l) K& @& R

) }* |% ]( S5 |+ L     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);4 ]% l5 E2 ]9 ?! i) j$ K
  System.out.print(z+" re");
% @+ @- F& n+ T$ E  }
. o, _# c, O+ Z+ N% P7 j}
2 V0 h' a$ @+ N4 _$ @5 }; ^* p  V1 W9 a* T: m
结果是:% D7 a# M3 j/ h9 F
result is 2
5 v, }' R& G7 H6 X5 M$ w#
# \4 w+ J' _) l# L( T2 ~7 x- {2 a( G$ B# An unexpected error has been detected by Java Runtime Environment:
1 \. o4 j0 z. ?4 \" g#5 g/ T- u/ L% E1 @' c. \
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
. I* }5 x% T0 P" K& o- y#
- k5 ]( W$ i+ ?# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
: }. s* \8 e# l  U7 ]# Problematic frame:
' \/ b2 D4 {4 @* L# C  [javaswarm.dll+0xb8305]
- y+ e7 D% @& Y3 a7 Z/ ^#& p" b5 K; M7 r1 d2 g- Y
# 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, 2025-8-18 03:37 , Processed in 0.019460 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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