我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。$ I' q+ J1 C& I6 {2 p
import swarm.Globals;
! D. P* |+ j& J# }( W
5 G2 ^! M4 }' M7 Rpublic class test {
/ |7 b2 Q) X# x' q4 L /**
3 c) g, ]" O& v, T6 ]6 G. m * @param args+ g5 m. C- ~! k
*/; A2 D0 a* ]/ L1 p- n; W6 b
public static void main(String[] args) {
+ g! c$ l; H) [2 W 0 t4 x) b! v, l, P/ @; m
int y=(int)(10*Math.random());& P8 L |3 h6 k( e9 W- X- q
System.out.println("result is "+y);
! P7 X1 ^6 F$ y+ N% d# U4 E! l% Y
double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);' W* I* w d/ I# _( v
System.out.print(z+" re");; Q( a! b- U. T9 K
}
, V2 W1 }6 ^/ T, o- {% ^}
$ Z' m5 g2 d+ ^1 a
3 b7 \. Y8 A* N结果是:& e% T+ }3 H/ A- s, _- g
result is 2
; J" }" E. E6 H#8 |8 }: d P# A; V
# An unexpected error has been detected by Java Runtime Environment:* u; j l. C; ~0 O" W' k; A$ _
#
1 M. F" t: H1 w: w4 _: G# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
: {0 g: O/ ^$ J- F#
: m& `( v3 }! m" Q! F0 v. w4 i$ C# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)9 A6 B1 W# d3 Z! ]+ d7 s. k
# Problematic frame:
; @9 v8 p7 j9 f7 L3 ~5 G$ N# C [javaswarm.dll+0xb8305]
& d) y" ^# {$ \9 s#! C5 h* x2 J% y; n* l6 y
# An error report file with more information is saved as hs_err_pid1064.log |