我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。( x% B0 F8 l. [/ o+ ?4 b
import swarm.Globals;
, }) D+ K5 c* Q3 X, I& u: t) n% ]& ]& j" v& y
public class test {
, g3 U! W4 C# y, F /**
5 b0 ]! h% ]* p) U) z * @param args
! O% l' ^! D9 h3 J8 k8 b; G; C */6 w6 ^. M' s. n8 w3 \( {6 e
public static void main(String[] args) {
' n' Q; x* h% R$ l# ^+ L
; K9 t& L" S: j) ~2 ?1 V# d+ p( k int y=(int)(10*Math.random());; c1 ?" S& w. b. B1 a
System.out.println("result is "+y);3 n8 R% f5 e+ x, q
- p9 @% H4 ]7 N1 u- _ double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
8 b9 J# Q9 s) C/ @, a7 l$ O0 x System.out.print(z+" re");
7 s. F, h: `- R% {( {' _2 f }
% E0 G& w0 d4 `$ x0 R}
7 f4 ~+ ?* w; t& t, W4 F3 X
, t3 F" t1 F+ J% ]0 U结果是:
3 {- g3 D" c1 [! l/ ~7 Rresult is 2
9 O- Y% z6 g5 ]; ~; J% m( y#
" ~! y3 f! U& Z# Z. g7 ^# An unexpected error has been detected by Java Runtime Environment:
* b4 p6 w7 Z' a9 U. S, n#0 I8 O4 A5 K/ T+ {! c5 T
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
% J. n! q3 r, g( u#0 Z+ Z0 K( q4 ?
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)! l; F# z) q, I3 ]1 F
# Problematic frame:1 V* C) ?# b- @: y4 o5 W6 c( _
# C [javaswarm.dll+0xb8305]
3 w- Y# Y! X% s( r$ d0 ?# s O#
' c) ?1 x( e! |8 Y" X# An error report file with more information is saved as hs_err_pid1064.log |