Topic: 菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM)

  Print this page

1.菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM) Copy to clipboard
Posted by: mingfanli
Posted on: 2004-09-02 00:00

请尽量用准确的文字描述作为标题

我是初学者;刚装了JCreator2.5pro
jdk为 j2sdk-1_4_2
编了个HelloDate.java 结果运行出错,不得其解,望各位前辈指点,为谢。

代码:
// HelloDate.java
import java.util.*;

public class HelloDate {
public static void main(String[] args) {
System.out.println("Hello, it's:");
System.out.println(new Date());
}
}

运行后的错误提示是:
--------------------Configuration: j2sdk1.4.2 <Default>--------------------
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Process completed.

如能解救,感激不尽!(补充:运行环境已配置好)

2.Re:菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM) [Re: mingfanli] Copy to clipboard
Posted by: why
Posted on: 2004-09-02 00:45

Which OS are you using?
How do you tell 运行环境已配置好?

What's the output of
java -version
?

How did you run the little program? Something like
C:\> java HelloDate
?

Do you have an older version of Java installed?
Have you tried resinstalled J2SDK?

3.Re:菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM) [Re: mingfanli] Copy to clipboard
Posted by: mingfanli
Posted on: 2004-09-02 02:00

我装的2000系统,
环境变量的设置是
CLASSPATH=.;jdk1.4.2\lib\dt.jar;C:\j2sdk1.4.2\bin;
JAVA_HOME=j2sdk1.4.2
Path=j2sdk1.4.2\bin
然后在dos下运行 java HelloWord.java
出现一样的提示
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
请中文跟我教我,我不懂英语。

4.Re:菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM) [Re: mingfanli] Copy to clipboard
Posted by: why
Posted on: 2004-09-02 02:45

?????? where are the drive?
CLASSPATH=.
JAVA_HOME=C:\j2sdk1.4.2
PATH=%JAVA_HOME%\bin;......

if you use Command Prompt, you may run the following to setup the environment on that Command session:
SET JAVA_HOME=C:\j2sdk1.4.2
SET CLASSPATH=.;%CLASSPATH%
SET PATH=%JAVA_HOME%\bin;%PATH%

5.Re:菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM) [Re: mingfanli] Copy to clipboard
Posted by: mingfanli
Posted on: 2004-09-02 08:48

我抓了个图。
JCreator 是可以自动配置的嘛。。。

(缩略图,点击图片链接看原图)

6.Re:菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM) [Re: mingfanli] Copy to clipboard
Posted by: why
Posted on: 2004-09-02 09:19

无论如何,阁下试过在COMMAND PROMPT上,依敝人的建议设定环境和执行程序没有?

有没有试过重装J2SDK?

>> 请中文跟我教我,我不懂英语。
这样的中文敝人也是看不懂的说。

7.Re:菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM) [Re: mingfanli] Copy to clipboard
Posted by: mingfanli
Posted on: 2004-09-02 16:14

我的JDK才47M,和SUN官方网上的不一样,所以我在试着重新下JDK,看结果如何,谢谢版主!

8.Re:菜鸟求救 (JCreator2.5pro Error occurred during initialization of VM) [Re: mingfanli] Copy to clipboard
Posted by: mingfanli
Posted on: 2004-09-02 22:02

呵呵,终于调通了。我重新下了JDK1.4.2_05. 在安装的时候把所有的进程,如杀毒,防火墙之类的东西都关掉了.然后把环境变量设好,结果就编译通过了...
很感谢斑竹..........


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923