A primary question

in Help Center
hi, there,
This seems simply a java primary quesion but hope getting some helps from here. This is my first java application.
I can compile and run the demo hello sucefully in the IDE of Eclipse but failed if I open a terminal window to run the command : java Server
Exception in thread "main" java.lang.NoClassDefFoundError: Ice/Object
I have set the classpath = ......../ice.jar .
What should I do further?
TIA-OrNot
This seems simply a java primary quesion but hope getting some helps from here. This is my first java application.
I can compile and run the demo hello sucefully in the IDE of Eclipse but failed if I open a terminal window to run the command : java Server
Exception in thread "main" java.lang.NoClassDefFoundError: Ice/Object
I have set the classpath = ......../ice.jar .
What should I do further?
TIA-OrNot
0
Comments
Cheers,
Bernard
Another question
Doesn't the slice directives #include < > make any sense in Java? That's, it only works in c++ ? What slice language will translate to "import" in java?
The #include directive in a slice file is a slice construct and it doesn't necessarily have any equivalent in the targeted programing language. Please see the Slice-to-Java mapping chapter in the Ice manual for more information on how Slice definitions are translated in Java.
Benoit.
Do you mean the section of 4.4.3? I have read it carefully but still feel confused about the "include" so I aske the question above. Could you please give me more helps?
Thank you very much.
OrNot
Once the slice definitions are parsed by the translator, they are translated according to the mapping rules of each language. I recommend to take a look at Chapter 10 and 12 for more information on the Slice-to-Java language mapping. You could also simply try to translate a Slice file that contains a #include directive with the slice2java translator and see how the Slice definitions are translated in Java definitions
Benoit.
In c++, it seems the #include <foo.ice> in slice file is mapped into #include <foo.h>. I have thought that it will be mapped into in java . But It doesn't. Maybe it was for I did not find the right usage of the slice2java command?
I got it