我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。2 e$ y, T( t% W, a2 Y
import swarm.Globals; [3 L9 X0 P; B. x* @
- @4 S& c8 [/ A* ?) D( p% D
public class test {5 E" H$ ? I7 g0 ]( W/ ]
/** G& D3 `0 P9 i0 z* Y
* @param args
$ s- w: M/ H9 |& O/ { */
' V9 ~$ C& ^* a) s4 D" D/ w/ a public static void main(String[] args) {
7 Z- C- _- i* @5 R0 M. Y: d! y2 \
$ H3 [ c+ {* R: i. l6 F int y=(int)(10*Math.random());* {- W: D8 a0 n/ X
System.out.println("result is "+y);
/ n9 n% a# z5 w6 w. X' O: f" T
, @" O( \9 w: | E& T: a double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
) r1 w! T9 {1 ^+ V/ `' M System.out.print(z+" re");- k8 r6 V$ n, b, c
}6 c5 f0 N! _+ G# z; L
}7 ^) a$ x5 @" }* G
) |- Y* w* u) y6 \& i' } j0 V
结果是:" l" ~2 G s4 I0 t
result is 2- s: f+ D4 w4 u$ }
#
: n6 R: Y: h4 @0 R# ~# An unexpected error has been detected by Java Runtime Environment:
* J( S. K" f+ A& D* h+ }2 }& O& ?#
( i' T/ x$ B, s# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068* Z( u! T6 q2 U; N( s$ `
#6 p$ n* d+ z% m/ {# y
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
) C4 V: B& c; u% y7 {9 S# Problematic frame:3 k. M2 L% s5 i! Q* T! t
# C [javaswarm.dll+0xb8305]
. |: ^: C7 X1 ^7 J/ W& P. K$ Z+ d+ y$ w#; {5 C" \! l7 i" [6 ?# q; Q ?
# An error report file with more information is saved as hs_err_pid1064.log |