[csu540-f05-rpf] Jar'ing SimplestDraw

Robert Futrelle futrelle at ccs.neu.edu
Fri Sep 16 08:00:19 EDT 2005


I'll check this out today, but I recall that if your class is in a 
folder within  the directory in which you do the jar, the class has 
to be referred to with an extended name, indicating its director(ies).

  - Prof. Futrelle


>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