我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。; C5 c; z; `# J+ o
import swarm.Globals;) U. {) ^0 ^# \# J0 W
; b3 A& p2 |1 ?- Mpublic class test {8 [8 S3 E& s) P+ z) }5 D, n
/**1 U" w! u: D; j4 q
* @param args
0 \/ Y. u0 H; b6 I+ p+ L4 |9 G */
9 W6 Y0 V6 l; u6 s k! f public static void main(String[] args) {
% S: V! T- F/ u( }9 M5 M; B% d
+ j! N# ^0 Z: i( Q/ `* D int y=(int)(10*Math.random());
) g! U1 T' O& J1 E- n o: |6 f) k System.out.println("result is "+y);; a' J% C H+ d: d
! L r- w' n7 b2 U- O: ^8 N1 B
double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);4 k! X9 a s, F' x
System.out.print(z+" re");
0 V4 A, E+ k$ n; G' z* q }; I& V( c& U9 k, F+ H
}, {% N4 L( y/ Z% B5 J7 v0 C ~( ^
7 E! C7 x! B4 B f; S3 u( e1 [7 w
结果是:. {( u( X' U) B$ v, \* f$ j. i& ]
result is 2
, ^" u1 T% O5 V- X. T, B5 A#
& y; k% f4 \$ H3 b# An unexpected error has been detected by Java Runtime Environment:
$ ~" N. D% E' v; V#* r3 Q$ e, P) d8 c L' @1 q1 w7 m8 x
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
& R6 m. C1 y" l& P! i## j: }& v1 A8 ?8 f+ M% {
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)2 ?/ s: b8 C5 N- ?0 F5 f" I5 s7 j
# Problematic frame:& e0 R! X7 S. s. u+ d- G3 p# Y
# C [javaswarm.dll+0xb8305]( e# _+ P/ p+ ]3 g
#' \0 O! L" w9 E; x0 o! D! P! q( Q
# An error report file with more information is saved as hs_err_pid1064.log |