我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。7 {1 J, h; l. s2 `" x7 y
import swarm.Globals;
6 _7 ~, E2 q* k' l& U. t+ Z- c6 W
3 A2 y6 y3 I3 j4 `public class test {5 ?( x9 s! h/ e& F' x$ A
/**: h w% _% h& z+ Y% D6 L: A1 C9 }
* @param args
1 z5 P1 x0 z1 \& f" v; C3 V */
8 l% c2 k. }( [8 V public static void main(String[] args) {
& V& ]$ T! e1 m
6 A H9 O4 L( |$ Z1 r; k( t1 p int y=(int)(10*Math.random());
, R- i# q2 r, Y! B: c5 Q/ m r System.out.println("result is "+y);/ a# M8 s1 S9 c! u7 e
8 u" ^; o8 s; |8 a. s double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);/ S* c2 R- d- w8 R& z1 }
System.out.print(z+" re");8 \. ^- w& e! o6 t$ e$ R
} _7 w0 {9 v- H; ?4 v" N
}: W5 C7 d! R' C" V
$ ^$ K e: y0 t+ S5 N. o, f结果是:& G9 a7 r: e. \/ x6 @3 t2 b
result is 2+ C/ L4 q8 d9 [7 x: ~1 ~) s. y
#5 ~0 ]2 U. w/ R+ T- C
# An unexpected error has been detected by Java Runtime Environment:/ s, m: k* d0 F( U) ^
#4 k# N! F* k2 s1 n0 o" Q) E8 ?
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
) E! B; O& z' y( k#2 p- }5 V( h2 G0 ^
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
8 s ]# A! s. q' F8 A; g& f! F7 O# Problematic frame:' y) E4 Z; A; v& `( _) W) A5 B: h
# C [javaswarm.dll+0xb8305]% S$ k A6 [, S& t( x
#
! ~! ^$ S( D' q( A! d# An error report file with more information is saved as hs_err_pid1064.log |