Topic: 这是什么意思?(java.lang.NoClassDefFoundError: Property)

  Print this page

1.这是什么意思?(java.lang.NoClassDefFoundError: Property) Copy to clipboard
Posted by: louning1
Posted on: 2005-04-17 21:03

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

class Property is being used somewhere in your code.
It may be missing from the classpath -- wrong/mispelled filename...
Show us your code.


Exception in thread "main" java.lang.NoClassDefFoundError: Property

2.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: liujing319
Posted on: 2005-04-18 21:08

你的路径设置的不对
java.lang是一个程序包,是默认引入的,但是没找到这个包,说明你环境变量设置的有问题

3.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: liujing319] Copy to clipboard
Posted by: why
Posted on: 2005-04-18 21:14

liujing319 wrote:
你的路径设置的不对
java.lang是一个程序包,是默认引入的,但是没找到这个包,说明你环境变量设置的有问题

Please be careful when you try to answer a post.
I think you don't mean it but it looks look it is about 没找到 java.lang 这个包.

4.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-19 21:36

是啊,到底是什么问题呢?
我最近也碰到这个问题了,用的是标准的helloworld.java
public class HelloWorld
{
  public static void main(String arg[])
  {
  System.out.println("Hello, World!");
  }
}

我的JAVA_HOME是:G:\BEA\jdk141_05
Path 是:G:\BEA\jdk141_05\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
CLASSPATH是:.;G:\BEA\jdk141_05\lib;G:\BEA\jdk141_05\lib\dt.jar;G:\BEA\jdk141_05\lib\tools.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;G:\Borland\JBuilder2005\lib\jdsremote.jar
CLASSPATH前加了点,但是没用

然后就是以下错误:

5.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-19 21:39

还有前面的javac是可以编译的:

6.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-19 21:50

有的人说class名和文件大小写,其实是一致的,如下图:

7.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-19 21:59

我觉得应该是环境变量有问题,weblogic和jbuilder的jdk在安装顺序或版本什么方面有些冲突,但是这些问题对于我这个初学者来说又难以发现和解决,希望各位前辈予以指教!
ps:我还装了sql server2000以及它的jdbc驱动,这个应该没什么影响吧?

8.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: why
Posted on: 2005-04-19 22:45

I can't tell what's happened, but let's try something simple:
java -classpath . HelloWorld
(. is the current directory)

9.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-20 07:46

thank u very much , i tried what said above and it did work well:

but what's the problem about that?

10.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: why
Posted on: 2005-04-20 08:44

Acutally I meant java -classpath . HelloWorld
and ". is the current directory" is just a note.

Personally I would try to avoid to include in the classpath folders with spaces in their names.
I would also try to make the classpath minimal and clean for a particular setup.

I'm don't know how you setup the environmental variables.
Maybe you could tell us how you do so, and run in Command Prompt
set >env.txt
and upload this env.txt for us to check.

11.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-20 19:22

the environmental variables of mine is posted at floor 4 ,

我的JAVA_HOME是:G:\BEA\jdk141_05
Path 是:G:\BEA\jdk141_05\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
CLASSPATH是:.;G:\BEA\jdk141_05\lib;G:\BEA\jdk141_05\lib\dt.jar;G:\BEA\jdk141_05\lib\tools.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;G:\Borland\JBuilder2005\lib\jdsremote.jar

and i upload the env.txt as follows ,too

env.txt (1.01k)

12.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: gonia] Copy to clipboard
Posted by: why
Posted on: 2005-04-20 20:14

gonia wrote:
the environmental variables of mine is posted at floor 4 ,
...
CLASSPATH是:.;G:\BEA\jdk141_05\lib;G:\BEA\jdk141_05\lib\dt.jar;G:\BEA\jdk141_05\lib\tools.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;G:\Borland\JBuilder2005\lib\jdsremote.jar

From your env.txt
CLASSPATH=C:\Program Files\Altova\xmlspy\XMLSpyInterface.jar

13.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-20 20:17

那是用户变量的classpath,上面的classpath我是设的系统变量,难道应该是用户变量?

Please try using the editing features.

我看书上写的是系统变量啊

14.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: louning1] Copy to clipboard
Posted by: why
Posted on: 2005-04-20 20:58

I don't know how you setup your 系统变量 and 用户变量 -- 用户变量 would inherits from and overrides 系统变量.
This is your own problem.

Anyway, it is suggested to use this form
java - classpath [SPECIFIC_CLASSPATH] [CLASSNAME]

15.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: why] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-20 21:13

why wrote:
I don't know how you setup your 系统变量 and 用户变量 -- 用户变量 would inherits from and overrides 系统变量.


really?then i should only setup 用户变量, right?

16.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: gonia] Copy to clipboard
Posted by: why
Posted on: 2005-04-20 21:35

gonia wrote:
really?then i should only setup 用户变量, right?

Haven't I made myself clear?
It is suggested to use this form
java - classpath [SPECIFIC_CLASSPATH] [CLASSNAME]

I would keep the CLASSPATH on these 变量 minimal, perhaps just . only; and setup CLASSPATHs for individual programs.

17.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: why] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-20 21:51

why wrote:

and setup CLASSPATHs for individual programs.


what does this mean? how ? set them in CLASSPATH , too ? and jdk only "." is
enough?

18.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: why] Copy to clipboard
Posted by: gonia
Posted on: 2005-04-20 21:56

why wrote:
用户变量 would inherits from and overrides 系统变量.



yes, i succeeded just use user variables , thx again

19.Re:这是什么意思?(java.lang.NoClassDefFoundError: Property) [Re: gonia] Copy to clipboard
Posted by: why
Posted on: 2005-04-20 22:10

gonia wrote:
what does this mean? how ? set them in CLASSPATH , too ? and jdk only "." is enough?

0. JDK doesn't even need the .

1. set up CLASSPATH, BUILD_PATH, or whatever within the GUI programs

2. Build batch files to set up the environment when using the Command Prompt or Terminal

3. Use Ant for development
...


   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