Home Help Center

icej HelloWorld compile failure

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.

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Looks as if Ice.jar is not in you CLASSPATH.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    You need to put Ice.jar (..../icej/lib/Ice.jar), db.jar (Berkeley DB) and this classes directory in your CLASSPATH.

    Cheers,
    Bernard
  • oopsoops Member
    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 D:\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.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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,
    Bernard
  • oopsoops Member
    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!
Sign In or Register to comment.