设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6048|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。, B! n5 {* W2 `8 a+ ^8 M5 `
import swarm.Globals;
* L9 F( X5 C* r" T  M$ H
7 q7 b0 ~7 Y; ?# ^4 f0 V$ c7 _# bpublic class test {9 \" p9 }1 [6 _5 x; G1 v6 A
/**& N- l, A/ ?  ]  i
  * @param args! ~% {  a9 U6 M4 o$ p6 _
  */9 |7 P/ S# Z3 Q8 i5 j
public static void main(String[] args) {7 a. j# F9 Z) z5 p3 G
    + o& I& C% r6 u' A9 Z: @: q  p
     int y=(int)(10*Math.random());8 d. d6 y) G4 C; a" @
     System.out.println("result is "+y);  [+ S& I: M3 P/ A. d

, P0 z( R; C$ |/ _' e! K     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
. h& S% y+ `$ J# G  System.out.print(z+" re");3 b& q! h4 A. j0 i) B& s3 A( N
  }1 T& j- ]' ]2 V9 S) h6 j) ]2 a
}
9 j+ s9 U! \3 b( n% R- ^7 \  Z7 i& U4 l0 M# t0 p9 N4 j% B
结果是:
, v* ?* E) Y; ]7 H6 W9 ~9 p1 tresult is 2- w: h) L9 n4 g# f
#
; ]) P$ O! ?+ M6 N- B% O" n# An unexpected error has been detected by Java Runtime Environment:' ~+ m& \1 Q6 J3 N
#: R4 n7 s! W4 _+ ~  l5 _
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068% _, A  _$ s! p/ c
#
  W4 y% Z5 A1 k) p. h7 X$ n. b/ m# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)3 s9 E* m% n9 o( b- N+ H
# Problematic frame:
; M: t8 s. _0 {# C  [javaswarm.dll+0xb8305]
* }6 S. l7 y. {8 O## X# e. u6 I# }
# 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-6-6 22:47 , Processed in 0.015221 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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