设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5138|回复: 2

[求助] 好困惑啊,帮帮忙?

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。+ ?$ \5 f5 U1 f6 `' b
import swarm.Globals;
9 M  f) k% c( K* F: c2 N/ U1 T; g* h) |' a, ^# i% y
public class test {* g; s9 J" l5 S1 Q7 x" e
/**
& r6 \: a1 ?5 p# d8 b  * @param args
- R, z' w2 L8 j  */" T( b3 s* l, f$ F% J: o
public static void main(String[] args) {
& N5 Y/ j3 X+ m! b& Y0 M    ! t5 Y; A6 [2 Y5 T0 v
     int y=(int)(10*Math.random());2 E2 t2 Z* G- h$ d+ [
     System.out.println("result is "+y);
, u( W' B* _0 r3 b  O' L0 U: i7 I9 S2 d; [& ^. E1 V
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
- D2 p2 U8 g  }9 l4 q8 S; q8 E  c: Y  System.out.print(z+" re");
( y9 l7 Y2 `% p9 }4 z  }
' O; i% H: h5 o2 d! p, o}9 q  E- \) A( N4 v
! W4 b$ Y7 Z/ |+ Q. n
结果是:
8 [9 i5 l5 L( \1 z+ D9 V5 n% @result is 2
" r& G1 b$ [5 n9 v6 A% K" S#
$ c# G# D$ J% C# r3 O. _# An unexpected error has been detected by Java Runtime Environment:: [+ n3 g8 y, k+ J
#5 B2 Z( Y! N& T5 `2 J+ v! q
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
9 l1 o: j6 a% A#
, v  [5 w4 I9 |  t9 e7 @# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
- A" q" }0 ~' c* s5 ^# Problematic frame:
. K, e# I* [, Z/ P1 z0 J4 a# C  [javaswarm.dll+0xb8305]/ n$ O( x* S$ f
#% b$ q( _! t' O  L+ Z. N7 ?  f- d. e
# An error report file with more information is saved as hs_err_pid1064.log
 楼主| 发表于 2010-2-1 11:07:41 | 显示全部楼层
怎么没有人帮我啊?我很急啊?版主帮帮吧
 楼主| 发表于 2010-2-1 11:11:40 | 显示全部楼层
看来这地方好久都没有人来了?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-1-19 08:58 , Processed in 0.021201 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表