- Dec 1, 2000
- 2,419
- 0
- 0
I'm using Sun ONE Studio 4... I have some simple java source with two classes. One class, Demop1 (don't ask), contains the main() method. There is another class, Rational.
I have both of these classes in the same file with Demop1 declared as public and Rational declared without a scope.
This is for a school project... and it specifies that "your program must NOT be part of a named package". Unfortunately the IDE seems to stick "package Project1;" at the beginning of the file. If I remove that line, it will not compile.
Furthermore, the project requires that I create a jar file for submission. When I create a jar, specifying Main-Class: Demop1 in the manifest file, the jar will not execute. I get a NoClassDefError (or some such thing) saying that it can't find Demop1. There are no typos.
Can anyone provide some insight on these two problems?
I have both of these classes in the same file with Demop1 declared as public and Rational declared without a scope.
This is for a school project... and it specifies that "your program must NOT be part of a named package". Unfortunately the IDE seems to stick "package Project1;" at the beginning of the file. If I remove that line, it will not compile.
Furthermore, the project requires that I create a jar file for submission. When I create a jar, specifying Main-Class: Demop1 in the manifest file, the jar will not execute. I get a NoClassDefError (or some such thing) saying that it can't find Demop1. There are no typos.
Can anyone provide some insight on these two problems?
