Archived
This forum has been archived. Please start a new discussion on GitHub.
A primary question
OrNot
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
-
Hi,
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.0 -
As explained in the section 4.4.3 of the manual, the Slice translators use the C preprocessor to process a Slice file, this allows the use of #include directives (with the restrictions mentioned in the manual) and macro definitions in Slice files. But this has nothing to do with the targeted programing language. Slice files are programming language-independant
.
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.0
