SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Regards<br /> <br />Ph.D.<br />SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD 2
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
I created the manifes.mf file. which contains
Manifest-Version: 1.0
Main-Class: Runme
my directory structure is:
suncertify>bin //has all classes
suncertify>code //has the source files
suncertify>manifest.mf // the manifest file
C:\dev>jar cmf suncertify/manifest.mf runme.jar suncertify*
when I run it I got class not found error.
C:\dev>java -jar runme.jar
Exception in thread "main" java.lang.NoClassDefFoundError: Runme
Runme.class is in the default package:
suncertify/code/Runme.java
suncertify/bin/Runme.class
Regards<br /> <br />Ph.D.<br />SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD 2
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
I understand form that I must have an executable jar.
My instruction doesn't state anything about .class files, but how can I execute the jar without calss files? Also, how about stubs , I genereate the stubs using rmic compiler, and I leave in the bin directory.
I tried to add the full path of the main class file, and it didn't work.
I tried to add the class name in the manifest using:
Name: suncertify.bin.Runme.class
and still didn't work.
It works only if I generate the jar file while I am in the bin directory, I don't know what else to do.
Regards<br /> <br />Ph.D.<br />SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD 2
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|