我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。; ^' s* e: I3 [( y; z: e
import swarm.Globals;
( F0 A8 S( ?1 X( ?" c1 X
8 [& x% I! W+ _9 D+ Ipublic class test {+ c# f, K$ f" b+ G( j) E( P
/**0 O( @. o* n9 h, ^7 @' f
* @param args2 X0 c8 ]- v- Z/ q0 B2 x4 w
*/; x, k n) F0 b' l- _. [, g
public static void main(String[] args) {
+ G+ _- A8 t4 A1 I0 u: h5 w& I
/ t6 {2 Y+ Z( w- m( B- G int y=(int)(10*Math.random());
( X3 Z z/ d+ y& M System.out.println("result is "+y);
: Q3 n; ]3 K2 X$ V1 f! c, c( Q/ }! I, m h, V
double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);7 `* }" i3 J, U, i9 Q5 _; U
System.out.print(z+" re"); c4 T- b; f0 r; b0 P" ~, j
}
1 B1 D; J- T3 S* S( N}) Y6 o3 e @0 U" v' {# q9 ~* K5 ^* R
2 V; D- ~. p8 r% x' C结果是:7 N6 t T2 ?. p T
result is 2& g1 F: x9 u2 j1 r1 W5 I" E$ S
#
- ~6 r0 m* Y2 o9 ?, p# An unexpected error has been detected by Java Runtime Environment:
: x2 @/ |$ h9 r3 S+ T8 P2 A- D# O e## L3 i# o* \7 Q: L/ P
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068/ N$ O4 `) U5 Z' n
#
/ w B' G' A& H; }) Y9 j* l, H+ B# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)' k+ Z8 X5 |0 K
# Problematic frame:3 w# N5 j. V$ c W
# C [javaswarm.dll+0xb8305], ~: I$ }9 K2 j6 g
#
- Y$ {, x* t' ~3 J A) H# An error report file with more information is saved as hs_err_pid1064.log |