我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。) [8 b+ L# h+ x$ n3 P- ^7 e7 T7 W
import swarm.Globals;
$ w* ~' |4 m: g, k. s6 O8 B: l4 F( w$ s
public class test {
9 E: w6 ~% B7 X, @: B+ R /**
/ B7 x6 @! A! }) n * @param args8 T2 ^, X# E0 M& K/ `# L- t
*/$ ?4 J3 T* ~& v( j1 T4 _* u8 j7 ~
public static void main(String[] args) {' ]6 }1 g) b6 [
: d& _! N6 o. b/ s int y=(int)(10*Math.random());( w# I) k0 P+ w# O3 [$ W5 a
System.out.println("result is "+y);
& ?3 g, i1 l; M3 W: O0 Y9 O& {+ f
double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
* d* e* V8 Z- e, X System.out.print(z+" re");; f# W, Y- z4 t( x% Z1 \
}
, e) `6 \9 ^1 g O0 W! \}
6 [ d% |- o% H4 O. O4 g) m
7 p6 K8 `* z0 V0 V* l结果是:: O6 Y. d0 W! M- x$ N2 a, s" |! o
result is 2
. ^( Y9 f8 |1 T& T#
) N$ t, y% c2 i% V6 ?3 S# An unexpected error has been detected by Java Runtime Environment:
. E: N/ `, I: k2 `( y. g#
5 F! W4 m$ p) ~# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
# t" P9 z$ `) k# _5 l5 z#
" r/ d) b/ G5 f5 t& G' X2 ?- I1 _# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
5 h5 c0 X% ] i( J( ]3 L& I/ j' l' T# Problematic frame:
5 {) K" T% t; E: U8 J& j# C [javaswarm.dll+0xb8305], |1 @7 I2 V6 k0 ]
#
* k/ o' U' d# _# `# An error report file with more information is saved as hs_err_pid1064.log |