[csu540-f05-rpf] Jar'ing SimplestDraw
Robert Futrelle
futrelle at ccs.neu.edu
Fri Sep 16 08:44:05 EDT 2005
Here's a page about double-clickable jars:
http://today.java.net/pub/a/today/2004/01/05/swing.html
I've also added it to the class jars page at
http://www.ccs.neu.edu/home/futrelle/teaching/csu540f2005/assignments/jars.html
Remember: Refresh your browser page if you haven't looked
at a particular one in a while, else you may be looking at an out-of-date page.
Even though I know this, sometimes it takes me a moment to remember
to do it.
- RPF
>I'm sure you know about this already, but it's a possibility that it could
>have been overlooked: did you use the m flag when calling jar to ensure
>that the manifest file was being included? While looking through the man
>pages I noticed that the m switch must be used, and that the order in
>which the m appears is the order in which you must list the manifest file.
>
>If that's not the case, something else you can try is this: instead of
>jaring things from the surrounding folder (eg: jar cvf nameOfMyJarFile
>foldername) try jaring from within the actual project folder, ala: jar
>cvmf manifestfile * nameOfMyJarFile.jar
>
>I was able to get a jar file to run via executing: java -jar jarfile.jar,
>and when I did so I was jaring from within the project folder. Whether or
>not it works when jaring the entire folder from the folder level is
>unknown, as I haven't tried that.
>
>In any case, that method still didn't succeed in making a
>"double-click-runnable" OS-Aware jar file.
>
>Hope some of this huge novel helps you out, at least a bit.
>
>-Jay
>
>On Thu, 15 Sep 2005, Simon Schanche wrote:
>
>> Prof,
>>
>> I have made a manifest.mf file with the following:
>> Manifest-Version: 1.0
>> Main-Class: SimplestDraw
>> Created-By: Simon Schanche
>>
>> When i run the jar-ed executable, i get: Exception in thread "main"
>> java.lang.NoClassDefFoundError: csu540SchancheA1/jar
>>
>> So i unjarred my executable in another directory and checked the
>> MANIFEST.MFin the META-INF folder. It did not have a line for
>> Main-Class and the
>> Created-By line was changed from my name to Sun.
>>
>> How do i go from here?
>>
>>
>> Thanks,
>> Simon Schanche
>>
>
>_______________________________________________
>csu540-f05-rpf mailing list
>csu540-f05-rpf at lists.ccs.neu.edu
>https://lists.ccs.neu.edu/bin/listinfo/csu540-f05-rpf
More information about the csu540-f05-rpf
mailing list