我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。$ F2 O/ S& \. m( e
import swarm.Globals;
* x; j7 v- T! H1 M+ Y; K+ A. [ P+ c: i6 y. z( g
public class test {4 X3 X) Q6 g' ?- |: U: a
/**
$ ]' x3 d' k- | * @param args0 g4 a: o. M" w. j# g8 \% z) f
*/
7 ^! Z i1 w" ~' q6 U. Z public static void main(String[] args) {
1 l% r6 W% f% F) l% d6 ~$ G ( v$ {% ]1 N4 t! s5 V7 D4 U
int y=(int)(10*Math.random());" N0 c2 G3 I8 t" f! z8 [" b3 K2 K
System.out.println("result is "+y);% z5 w* M" j" T( N1 ?+ p: U( a) b9 R
7 a% F" J5 y p$ c2 h" H$ ~ double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);5 g4 B! L6 |2 g/ P( S3 n& U
System.out.print(z+" re");$ K: A9 T# R: Z6 O, h
}
3 ?" Z1 A3 W$ Y/ O7 ` u% s0 m, A& r}$ |" N! y9 ~% [9 e! l- e
* i4 C2 I U e# y
结果是: G8 L1 T7 i: [7 [
result is 23 u! K9 p* s9 l. A! ]( }
#7 U0 x7 g: t8 v; @! G, r
# An unexpected error has been detected by Java Runtime Environment:
' W: n V: c8 z$ s& x Z/ c#6 Y& \0 f4 n$ ~, Y( \1 L
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
& t( d( w& ~9 P( U; {#
E4 I& L: M' T: ~. z# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
, \) K1 ^: f( G8 Y/ P! R" j# Problematic frame:
% d( x: J; A4 i$ q# i# C [javaswarm.dll+0xb8305]9 H' A9 [( S; w
#
$ J2 K$ \9 r, e6 S- u# An error report file with more information is saved as hs_err_pid1064.log |