设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5405|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。0 Q4 k! M0 I/ y- O+ l7 F/ A/ r
import swarm.Globals;( N3 D3 q; N, {6 L5 }4 P0 B
2 i2 f7 y: c1 S; e/ H% [' g
public class test {
0 x" E* n. ~: y8 N% D5 J /*** q, b+ |; F! v/ O% f
  * @param args
1 [4 y( P' F2 P  */
) H: }" v. n9 C4 _% Q! b4 P public static void main(String[] args) {
# E! l+ G+ G; C# A" N8 c    0 ^, f$ L7 j, J
     int y=(int)(10*Math.random());
8 K% r4 B) O5 r0 X: y     System.out.println("result is "+y);
/ T# j4 L# c9 d3 t- |+ q6 S% `( y, @5 A! B$ g
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);6 [+ {) R$ Z/ W/ G
  System.out.print(z+" re");( }7 P2 [' V- P% G+ a/ i2 Q
  }
8 l" g, w+ ~( @. y}  Z$ j  |: I7 q

  j+ `7 g9 ~6 O% F: D4 K结果是:
& S6 P7 K! l2 l# {( sresult is 2
+ o& {7 Q' B1 a. ~% Q) j#+ _* b- j# A+ F/ M
# An unexpected error has been detected by Java Runtime Environment:
$ U0 r# |, p! j5 y; i0 r#) x* ^6 r; |2 A$ @1 T7 [
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=10686 b7 \1 m2 V0 b6 u, F8 P  f
#
8 n/ L. z* w% m# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)8 ~4 f6 M$ j0 W, D
# Problematic frame:  W7 j( S3 {5 c7 E
# C  [javaswarm.dll+0xb8305]* U% ~$ a( F5 e% N$ s
#
3 @' w, H) Q+ j7 E8 u9 n; l# 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-3-1 20:56 , Processed in 0.021948 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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