我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。+ D1 ~5 T) D+ [. O5 K3 {/ N! \
import swarm.Globals;$ D" z) n3 M: k! _! X) E
( b, t0 r8 o# `# l( ?7 H) `9 r7 cpublic class test {/ a4 D/ s# z' F5 \; D K" D' A
/**
0 z6 \. T2 m% `/ L [ * @param args$ _1 U; f. _$ J) r$ l% W- y e" y# m
*/0 e& a. @" w* K& D- x
public static void main(String[] args) {7 c/ b1 h! A7 u
# I# f: d* [, V; `4 ]3 F0 }( D' Z4 d int y=(int)(10*Math.random());3 V' U. ^$ d1 N( l
System.out.println("result is "+y);- S$ X6 y: Z+ Z
4 E% X8 T, Y% w! P' a/ r
double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);, c* ?* t: t! m. x. E6 ^1 W, r% l* Z
System.out.print(z+" re");# t7 z0 B4 Q; p3 q/ D
}' W2 Y% L* J: F1 x' T M
}' |% s; i5 q V J) R
' ]( ^& }" A( ` Z |: K: P* u
结果是:/ T/ c( `$ {9 w# X- ~( b$ M
result is 2* r/ C: u5 |; I9 r
#7 p, Z5 c- I. n! ~
# An unexpected error has been detected by Java Runtime Environment:; m. X# d4 m% ?5 S
#
6 X9 [2 q! J* i6 ?& Y# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=10689 _/ Y# R) G e) I4 Y! J
#
) h4 D# P4 a/ G% H) P# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)* F/ _, a7 _$ ?! c7 V
# Problematic frame:
! k6 m, H% v$ A7 n& o% t1 \# C [javaswarm.dll+0xb8305]
* [3 [7 {* k6 Y" V6 X#$ w+ c% j' M; k* r& K1 ?
# An error report file with more information is saved as hs_err_pid1064.log |