设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6055|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。+ S- t" z1 X  f4 I+ j
import swarm.Globals;. _( l8 G! j$ b2 R
1 c6 Y; q  E' T! h# X
public class test {! l0 w; V$ O  [; _# ]5 k
/**1 e1 b4 E9 }$ G0 C  s! G3 k
  * @param args  F& t0 F9 _0 O. Y' e5 d
  */
8 A, A5 t8 m* v' i public static void main(String[] args) {8 j$ o9 f0 {" I9 S! D& b
   
/ i, H1 H+ }% Z7 D5 ^     int y=(int)(10*Math.random());
! |$ M1 y+ f0 Y1 |" P; q2 K8 U     System.out.println("result is "+y);
, q. ]+ }4 Q3 T( I2 {2 r' A8 \' g7 n* V
     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);4 F# z+ D% Y) Z' l
  System.out.print(z+" re");
# P( Z$ m+ R. b  }
# a( E4 d/ U* g$ T; c}
/ r7 A' M8 Z, _% P1 a; n$ d/ m! |
6 G6 v6 s0 t, U# Z& R3 d- e结果是:
% k! r' o  a% v" ]result is 2
7 T. D1 i0 Z$ H3 Y/ k' ]% Y/ K#" S, @6 t3 V* b
# An unexpected error has been detected by Java Runtime Environment:  t% }# O. v# U! x1 }
#
3 H) ?, Y/ f. G5 X; w#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
. H- {7 x+ M9 Y$ X4 {#
3 E" n" ^; S- |! M8 E# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)7 `3 x% y* a9 z0 V
# Problematic frame:
- y9 N/ ?* G$ Y7 p1 T/ S# C  [javaswarm.dll+0xb8305]
" k1 Q5 P- j& q3 E$ O/ y  n#& A' G7 n& Z: Y/ |1 [
# 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-7 19:05 , Processed in 0.014988 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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