设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6681|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
) h3 e& i1 V1 x" U/ eimport swarm.Globals;7 ^  C. T) [) |6 Y6 A

! z+ ~) G8 N! h2 v0 cpublic class test {
: d$ V% Q, P, N8 n  T /**
5 ^' W; ~1 A! r% M: A  * @param args
8 `# P% r6 }7 f& v1 I  */3 g- I2 }: `5 |' F' Y. C3 D
public static void main(String[] args) {# z4 }4 s/ _5 \$ K
   
9 G4 C6 G9 S% g$ p4 h: D) t, s- w- i     int y=(int)(10*Math.random());9 ]& z$ T) o, g+ Q6 s
     System.out.println("result is "+y);
" }- c) A; o! Z  j' p+ G! }' w+ r% t3 L& }- w. _! @# B
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
8 Q9 W1 Z- u4 ^4 E, u" _" P  System.out.print(z+" re");, A5 o! \' m+ h
  }
3 y3 B% V7 K8 M& ?% ^( p}. N0 N3 |) o1 [7 \( P
0 w  F  e& I* H$ c4 b
结果是:
. w! @& o! ~- Q. f9 ~$ [$ Sresult is 2: M  F. d: m' q& z9 K
#
/ Q/ t/ h/ \6 k' a* D; Y# An unexpected error has been detected by Java Runtime Environment:
% {6 Q+ f: \" \( C#$ `) s5 u, Y& e
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=10685 T1 I, b; S. C! d
#
' [4 \; b/ d9 k' R# w# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)5 X8 }0 S, Q1 N* ^) v& S6 r
# Problematic frame:
# w' {6 e$ v3 p& W/ }; S# C  [javaswarm.dll+0xb8305]
2 O) M  _- ?5 ?0 i. ~5 ^% v#
6 b2 m, }, }- w6 W# 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-8-15 13:32 , Processed in 0.017441 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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