设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3645|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。8 a/ \4 ?' {/ O. S8 d9 c
import swarm.Globals;
& R, J5 ^' S' j8 Q- t& s5 u) W. [+ t8 Z# _/ v* f
public class test {
' F; J' i9 ~) g" ] /**
& a$ S0 u* t0 l, U# r  * @param args
; ]9 i+ ]1 ?' ]- s. l( w* q  */' Y: Y: t! `0 z
public static void main(String[] args) {
: i0 S" @4 U3 J    ! P) J4 q4 I1 o$ f' E* [+ q, M9 x
     int y=(int)(10*Math.random());
: a+ e5 z) W- ?0 Y3 r     System.out.println("result is "+y);
0 W' c& k/ s2 E& f* s8 ~- P7 |
& `2 c* C  e* _4 j& t' A* J8 u1 y     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
, D# B  t+ o) K2 M3 {# w& k0 j; j  System.out.print(z+" re");
! w0 }: O: P; o  \; C  }6 v1 B* m+ d1 n1 g- N
}0 [6 H- q" b4 }& P4 b

% D5 B$ R' u6 C  {* ^& Y结果是:( Z3 h1 o$ i9 ~% |7 w3 r2 q  X  P
result is 2
* @0 S8 ^0 l% g" S. l#, I0 N+ ]- Q8 t6 |+ t
# An unexpected error has been detected by Java Runtime Environment:& I' p' H$ E0 f( |
#
4 W6 W' K, {. P) y#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068( W2 M" M7 @8 z/ r" w" {  w3 a) j5 E' Y- g
#
$ q7 s/ W" _/ m# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
: g7 B# K; g2 I3 H2 {# Problematic frame:0 p9 |- Y) A+ ?/ v; a. q  A( G
# C  [javaswarm.dll+0xb8305]
' ^6 A7 R/ g) i6 o; _0 {* R6 R3 b% g#
: i7 K* r, z# {3 L8 n, v# 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, 2025-3-7 05:44 , Processed in 0.017053 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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