我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。3 q0 ?/ y" ?' l7 ~& X/ t+ S4 @' _
import swarm.Globals;
) e. Y8 X3 P7 ?2 s* W5 |' j7 V8 j6 ^; \0 c+ S! l( h8 `' O; ~
public class test {
6 a4 y/ I: `5 d6 U3 F# g2 I0 o' v' ~ /**0 A9 r6 K3 W2 I) Z1 A" M
* @param args
& D. D- ?' P G2 W4 Y' L */
+ L; I c2 L: g4 e z public static void main(String[] args) {
, C/ ? J, }' I, I , ^' t# x$ N% ]- c
int y=(int)(10*Math.random());
" w6 y3 A4 g, U System.out.println("result is "+y);6 |& d2 u* m' E t: x3 j
3 F4 {9 O5 c* g( ?( d# M
double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);) [6 R% v& ~+ u, L- B
System.out.print(z+" re");5 t* g4 J* D% D/ A: {! C. H
}5 ~! o) N7 [+ R( y
}9 E: W9 z m0 F0 M
) Z. v$ _: M# r1 C) ]结果是:+ l8 y. ~, s$ _4 I) t. H
result is 28 |) {. h6 }" N$ A% ^
#
: f/ W: i' b9 V1 o, O! H) M# An unexpected error has been detected by Java Runtime Environment:0 j' _1 n/ z2 K2 n. O
# Y( x2 Y2 Q' n- |; w9 X2 |: D& l
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
5 V/ B( ?' C$ r$ F4 d/ l* P4 a#
6 m8 R! N a5 O( {9 E: s# S4 n# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
$ d- y1 x2 y7 U8 q: d# Problematic frame:& d4 B$ T- t1 k+ V! k ?1 m9 x
# C [javaswarm.dll+0xb8305]
3 U) S# ?5 e3 g3 A#
$ G \) k! N& ]* z, y# An error report file with more information is saved as hs_err_pid1064.log |