设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5731|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
" f* }9 F! a/ eimport swarm.Globals;
6 Q0 Q$ T$ S$ `, g; X1 d9 f3 s! q+ {$ ~! v% |8 E( Q# _# H7 v
public class test {
7 j8 L2 [' g5 D2 N  K# v. H" w. q /**8 W, L1 _! @( ^4 p, b
  * @param args
' R0 z  H+ g/ Y9 j, P* z  */. D; V  a  d# L. A# n0 t8 e( @
public static void main(String[] args) {6 c* c5 f8 w+ ]) h6 _' w! e/ E
    2 D4 r- ?1 I0 }  B
     int y=(int)(10*Math.random());0 ~+ B3 J8 F# Q* {7 O
     System.out.println("result is "+y);  J+ ^/ s# e& @* {5 ]
7 \$ U& |: b1 s! S
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
( m" A* N# L) r  System.out.print(z+" re");
" n" P  ^, @  m  }
" h" U5 J2 P1 D0 ~* ]. R}# l5 @0 \8 R$ q# p4 m: [
! f3 `( }0 y, Y  f" m, V
结果是:1 p3 @8 l% W) ?) \9 S4 Y
result is 22 Y& h& \2 X: \5 h  [1 a- i
#, S/ r  e& ~! B  F7 f) _
# An unexpected error has been detected by Java Runtime Environment:0 t8 O& |$ F3 c- z- n' x# Z  ~" R" s8 L
#
; V2 U' e8 `0 Q) @% G0 S. p#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=10689 b# ?8 y5 M$ n
#
/ ^5 q( e$ ]4 \7 r: y# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
1 f. c  {, e5 L# Problematic frame:
- i6 K7 A( C$ B: D6 t# C  [javaswarm.dll+0xb8305]
2 j' ~' S3 T7 N# |: G3 R#
9 s. `  e* x6 W( ^# 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-4-24 09:06 , Processed in 0.020079 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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