设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6755|回复: 2

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

[复制链接]
发表于 2010-1-27 11:16:30 | 显示全部楼层 |阅读模式
我在试着编程,很简单的取随机数,可就这样也不对,我不知道哪里错了,编译时没问题,而且在Eclipse环境下运行JSimpleBug的例程也没出错,可为什么我这个简单的试验程序却出错了呢?帮帮忙吧。在Eclipse环境下。
+ n# f7 K4 M% B4 [+ |$ timport swarm.Globals;; c/ J  p# e5 j
+ c9 q9 T) e/ y$ ~8 J: ?' D
public class test {& R2 E$ h0 x" k3 n$ `1 e2 I) }4 k5 h
/**
$ N2 S, M- p6 q  * @param args
" V% w, n; i. E6 I  */
. w5 |' D1 P) G9 F- \! P7 R. c public static void main(String[] args) {
% V+ L+ d1 |: V6 z/ M* ~. L  k# a    5 ~9 c+ f/ V3 w4 I7 o5 S
     int y=(int)(10*Math.random());
& Z! ^: \2 s; N     System.out.println("result is "+y);+ l( e, j5 r8 ^

2 B4 {; j4 D6 V5 C% q+ z     double z=Globals.env.uniformDblRand.getDoubleWithMin$withMax(0.0, 1.0);
5 Z; e# c2 C8 t; m) `! Z5 u  System.out.print(z+" re");6 H" N: l6 `! w7 N5 a. E/ n
  }
3 U7 U: g: s$ T9 \) i}" [' I5 A# j, x8 S6 T; B5 q# ?

! X1 Z& `" J9 c. B3 e; s结果是:
* r; m) H8 V, V8 d3 C5 f4 iresult is 2
, Z/ C, Y2 y9 u, l/ X#6 c3 P, E, \9 @( T4 \4 E) t2 C
# An unexpected error has been detected by Java Runtime Environment:
- i- C# j/ G  {#' w3 A# d( y* o* I) J5 T, K
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100b8305, pid=1064, tid=1068
2 n6 Y1 ~" t# ^3 h0 C#; v( m- [# [# T7 }0 o1 X
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)( i3 Q  a; H4 S! I6 c$ |; g0 V
# Problematic frame:2 ]* o) z; A( v1 C! F9 x: m
# C  [javaswarm.dll+0xb8305]7 O: f9 O& \+ P- g8 k- ~$ j4 [9 e" L& ?
#
- I7 j: X3 [5 t! I6 j& f! T; 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-8-25 12:54 , Processed in 0.019200 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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