我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。* u0 K5 x) f6 C! w* `9 [# V: x
import swarm.Globals;
' j F5 R4 ~4 c, O& i. P* w4 I6 k4 b
public class test {
+ |5 A- w2 N7 E2 `/ r, G2 A /**
, k0 \ P- B2 T8 ` * @param args8 U% C4 ^' n$ ]
*/
9 j# G$ o; s' x+ d" q public static void main(String[] args) {
, o: o* y8 {# t+ ?
, ?. v5 C9 f% e int y=(int)(10*Math.random());
Z, u! F+ m, }0 q System.out.println("result is "+y);
9 L4 T/ d: {4 M5 w G
]$ s( i: q$ D( ]% }) c double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);3 ]6 l' i, `9 X' C" s
System.out.print(z+" re");
* }( s" ~* a. [ @+ q }
3 Z9 O9 a u/ }) x}, S2 g' ]8 D/ |. ]3 Q6 G) c
# O0 c3 E% {* p5 @结果是:6 }9 Y; L# N& R6 ]: m+ Y, p. n
result is 2
7 j2 x N" d) K9 Z#
# z- H& Y5 J B* j/ D0 w# An unexpected error has been detected by Java Runtime Environment:; g- n; D+ u; \7 b$ r
#
4 e L9 z6 n, s0 \5 J0 J# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068* l. ?( E K* H6 ?* c9 ^
#
! D8 E" f9 q, F* R# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)9 Q; g: o, F3 L; [# b* F6 [
# Problematic frame:
; F V+ J8 `" @# C [javaswarm.dll+0xb8305]1 N' S. g# J0 w/ i$ _; t7 w0 }7 @7 B
#$ P+ u* m) p7 s! B+ ~
# An error report file with more information is saved as hs_err_pid1064.log |