设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6528|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
; s/ E( P9 w: _7 Y, t& eimport swarm.Globals;
; D2 G: r7 l8 w5 \+ `; R8 t7 @/ @+ y
public class test {
; R6 ^* R& \+ w8 v: f /**, f  o. l5 \7 Q
  * @param args
4 r$ @8 _8 A/ L: j, |  */7 n, C2 h. l! d
public static void main(String[] args) {
6 N+ |8 ~6 `" p4 `% _. f8 O    4 B# @- K. P4 A% R$ B, V* p4 \
     int y=(int)(10*Math.random());
. Z+ X. ^# n  K( a8 m4 ?$ X6 Z     System.out.println("result is "+y);
' M! j0 ?5 x; M8 \- _  ~+ e  }7 B+ o& u  G# c% _
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);% M$ H% Z! n6 B4 f
  System.out.print(z+" re");
% M% h7 I2 P6 G2 P  B& v  }3 F* }& ~. X8 ~" u- E) o- @7 N
}
7 E! a9 Z0 O9 I2 ?
% s# J4 G: }* i9 C. P结果是:
. S- w9 d0 L5 c! u" D, Y& e' dresult is 2
3 @; \  ]  G' n- y4 g2 n#) q' ?, p: m, }3 o. a
# An unexpected error has been detected by Java Runtime Environment:6 q2 j4 t$ k4 M9 L9 i8 E
#3 T+ b* q! \( ]8 M" E
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068* W. u& m4 q" s( x  E1 G
#
- Z  C# Z3 A7 A  X5 S# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing). W7 B6 B$ b2 _$ H" `
# Problematic frame:$ V. B, b5 v! ~
# C  [javaswarm.dll+0xb8305]' N) N9 `. l8 s4 }& ]1 c: V7 U
#
6 `+ h* W& B2 J# 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-7-30 22:51 , Processed in 0.016737 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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