Archived
This forum has been archived. Please start a new discussion on GitHub.
icej HelloWorld compile failure
in Help Center
I am a school student and new to ICE. I've successfully compiled cpp version ice helloworld.
But it doesn't work when it comes to java version.
I did everything exactly as the mannul says, but at the console mode, it always said " package Ice does not exist " and " package IceInternal does not exist " ... 100 errors.
Even when I ran the already compiled \icej\IceJ-1.5.1\demo\Ice\hello\classes with java Server or java Client, it resulted in "Exception in thread "main" java.lang.NoClassDefFoundError: server".
Can any experienced user help me? thanks a lot.
My OS is windows2000 with j2sdk1.4.2_05.
But it doesn't work when it comes to java version.
I did everything exactly as the mannul says, but at the console mode, it always said " package Ice does not exist " and " package IceInternal does not exist " ... 100 errors.
Even when I ran the already compiled \icej\IceJ-1.5.1\demo\Ice\hello\classes with java Server or java Client, it resulted in "Exception in thread "main" java.lang.NoClassDefFoundError: server".
Can any experienced user help me? thanks a lot.
My OS is windows2000 with j2sdk1.4.2_05.
0
Comments
-
Looks as if Ice.jar is not in you CLASSPATH.0
-
You need to put Ice.jar (..../icej/lib/Ice.jar), db.jar (Berkeley DB) and this classes directory in your CLASSPATH.
Cheers,
Bernard0 -
Does this cmd automatically add classpath Ice.jar?
javac -d classes -classpath classes:D:/Ice-1.5.1/lib/Ice.jar\ -source 1.4 Server.java Hello.java generated/*.java
To avoid this, I even added "CLASSPATH \Ice-1.5.1\lib\Ice.jar" mannully to the OS environment variables.
But it still doesn't work.
Sorry bothering you for such simple question.0 -
The path separator on Windows is ';', not ':'. So try:
set CLASSPATH=D:\Ice-1.5.1\lib\Ice.jar;classes
You'll also need db.jar to run the Freeze demos (or anything using Freeze).
Cheers,
Bernard0 -
Oh my god!
I simply copied this cmd from the pdf mannul and forgot to change ":" to ";"
It works quite well now.
Thank you both marc and bernard, very much!0