设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6071|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
* `" v" }! }7 \3 _5 I4 Y- mimport swarm.Globals;' A& L, q" v$ j4 K

, d2 S3 E7 M" ~2 Upublic class test {, x, v; n" L) x
/**5 Z/ R& R& h2 J1 r4 W
  * @param args+ V( c8 d- i/ y. e2 s+ f
  */
: N3 v5 z. a" x. T public static void main(String[] args) {
# J6 _  y0 _; E1 [5 s; R    & L% l, V; p( J- r$ [
     int y=(int)(10*Math.random());
" v2 V* N2 N+ _8 }  _     System.out.println("result is "+y);  V/ m9 a3 M7 p6 M
) |6 c2 n* g5 q
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
6 F6 y3 l, N( V) }# R0 L  System.out.print(z+" re");
3 f5 w; N0 m. @* k9 m% T. F  }
% n, A7 q2 }1 q' |+ T, l0 [}
0 E3 X* o; I+ h0 o3 d! w8 \/ f9 t; s/ i; E) t2 |* k( p6 M
结果是:- T4 o6 n7 q# v0 l* z
result is 2
2 k* Y* n+ ?$ R- W: n$ a* w#
: N3 f9 G3 M( U2 A. _. e# An unexpected error has been detected by Java Runtime Environment:/ O  @2 ]& g6 n; ^; q
#/ X' E9 W: ]7 W& K
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
3 s, D8 \/ C6 t( ]0 |#
) m! D  {7 W3 Y5 @) H! Y8 D# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
% A$ q% e3 E* V8 U& ^# Problematic frame:1 H+ @! J. j/ z4 P2 I: R8 N
# C  [javaswarm.dll+0xb8305]
# H, h) ?9 G% l# q5 b2 k#
. j; O. R  ]& q3 A* n# 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-10 00:07 , Processed in 0.015932 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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