我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
3 w. c; J( [7 N* uimport swarm.Globals;7 O9 x* X" l& |
2 ~* O2 p* Y4 y4 ] c1 `3 B/ h0 Bpublic class test {
* N' g& O9 s( [% M /**
! p1 J' M8 t: t! P7 q( S& R * @param args9 g" {# Q* l d
*/5 z: P. P r: k; v9 t
public static void main(String[] args) {8 _5 }& i+ N- [% [" d
7 @* ~7 P0 a, e& a1 K9 K7 E& Q
int y=(int)(10*Math.random());' Q u1 j1 C! r. e
System.out.println("result is "+y);: M6 o$ K2 R% t) s4 ]: K t
6 i8 y3 C, x8 \' V$ @ double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);# ]' q5 s6 i5 v+ z F
System.out.print(z+" re");& p/ \0 b& i1 ]; v0 k( B
}
1 z6 Y+ @2 R$ k% f4 j$ \+ y# ]- z}' a3 [# w: y; e
; s3 j; f1 f0 h- O& Y结果是:$ ? T3 f8 [5 s4 g; _% T
result is 28 l6 Q3 d/ Q2 a# m' i
#* Z7 g8 L8 a+ N
# An unexpected error has been detected by Java Runtime Environment:
8 ~( K: O& ]' l2 a; l7 H; D#
- s5 ?% Z9 p' z! `1 h- u2 N# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068 H s- O7 d. c1 f9 m5 t, e4 J4 D4 t
#* ~; D; i- I9 k! O/ G
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)" `! P* H' r" E' i! u
# Problematic frame:
! n4 z9 j& I" S# ?4 m4 Y* F# C [javaswarm.dll+0xb8305]
. [0 ?5 j& N X5 Y7 c' {#' m1 m7 S! J8 q# ?0 R8 F2 x
# An error report file with more information is saved as hs_err_pid1064.log |