我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。; g, t7 A7 ^: F! v
import swarm.Globals;; ^: \$ D% i# e- \) u3 ]
- X/ e) i4 z' l7 F: g
public class test {3 f! O& N, S" [4 U& K
/**( a. V4 Q) _" ^
* @param args5 W& T, i4 S A7 R! n
*/$ e* X6 u8 r9 G1 a+ p
public static void main(String[] args) {
( p" l4 h" {& | * g. q- d* [" c' s# [
int y=(int)(10*Math.random());
9 \1 h) F! K% R& W; B4 K3 K+ | System.out.println("result is "+y);
* X9 |. E" h4 U; M& E. e0 s
+ q# Y; K( V$ B$ u, k8 E0 c double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
- U7 F* C/ S3 _; X) z System.out.print(z+" re");
, W2 U4 h+ w# [8 N, [$ s. A L; D }
0 D8 H `" T3 i. h w}1 V, Y3 Z6 |5 r6 h0 O
0 y$ }" {2 e; o2 V$ f- O
结果是:: b0 p3 ~$ z3 U
result is 2* s x# i! ~ m5 I$ \6 ]9 q& O5 Q
#) R% B" Q3 q9 W: A
# An unexpected error has been detected by Java Runtime Environment:
0 R! ?- w$ [3 i: }: c#6 _( Y$ u, x& g& {, o$ k
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068# l; r% ]* e1 w% s9 h% ~
#* d* L8 \6 V- Z1 E2 @$ l
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)2 Y' |/ I* D5 ]& N
# Problematic frame:
8 h5 S0 M5 N+ _0 K# C [javaswarm.dll+0xb8305]
3 ~" ]- z2 g% S3 q#
" n, V1 |% t, S" g; _& y# An error report file with more information is saved as hs_err_pid1064.log |