我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。! j1 ~6 J% E$ T/ B, w0 O
import swarm.Globals;# r3 }' `# G2 Z
8 ?" a0 X# O' r" c
public class test {
& L" t+ r8 P ?% }& E* ?, ~" s7 M /**) O$ u- v6 v& N- s
* @param args
# k# O$ B% q; X/ m */* H' ~, X! M/ R; U7 u; W
public static void main(String[] args) {
8 M8 _% V8 ]6 P9 x ' ?- G) g9 [: \, |; @( K4 b
int y=(int)(10*Math.random());5 D' k8 n/ s. ^* Y
System.out.println("result is "+y);
+ U8 z$ t% o* Z( R
3 h# @+ v1 |2 d$ j9 q5 `5 a% w double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);7 f; m# J" Q! o
System.out.print(z+" re");2 K( Q6 V( j) y9 v1 ]# U
}' O9 x4 q- `, R* V
}7 U8 j# E" j# b6 U5 g5 }
1 R/ k1 t8 {! @; X" E' U6 g$ \
结果是:8 E+ T0 R" ?; {: W2 [! l
result is 2
^% h: m& M( c#
0 U& F# t+ K3 L4 L% V0 |+ }# An unexpected error has been detected by Java Runtime Environment:0 m' U; a% ^2 I* t* s' h$ a) T
#
# x# a! j* N4 h: |0 ^ E) {) S# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=10686 ^. H$ |. q3 g
#& ]: ? K7 e6 a P% Y# d
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)8 f, S( \5 |9 M- J( o" I
# Problematic frame:8 n5 I @1 E+ G2 ^+ _/ d$ |4 D
# C [javaswarm.dll+0xb8305]- A% {8 a, S# T4 O5 h, D' ]% Q+ b
#
6 \% n, o( H, K# An error report file with more information is saved as hs_err_pid1064.log |