Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Making a JAR

Thread view: 
hynespm - 20 Jul 2007 15:34 GMT
Hi,

I am making a JAR file for a program in Swing. The Swing application
uses 5 external Jar files. Im having problems creating the manifest
file correctly and when i get my jar made, it cant find the main
class. Below is the mamifest file  it contains the main-class variable
and the class path variable(I use this to point to the external jars,
if this is the incorrect way of doing it please let me know).

Manifest-Version: 1.0
Main-Class: start.Start
Class-Path:
C:\Sun\jwsdp-2.0\jaxb\lib\jaxb-xjc.jar;
C:\Sun\jwsdp-2.0\jaxb\lib\jaxb1-impl.jar;
C:\Sun\jwsdp-2.0\jaxb\lib\jaxb-api.jar;
C:\Sun\jwsdp-2.0\jaxb\lib\jaxb-impl.jar;
C:\Sun\jwsdp-2.0\sjsxp\lib\jsr173_api.jar;

Cheers
Patrick
Andrew Thompson - 20 Jul 2007 17:48 GMT
...
>I am making a JAR file for a program in Swing. The Swing application
>uses 5 external Jar files. Im having problems creating the manifest
>file correctly and when i get my jar made, it cant find the main
>class.

Does the jar contain a class with path & name of
start/Start.class ?

>...Below is the mamifest file  it contains the main-class variable
>and the class path variable(I use this to point to the external jars,
>if this is the incorrect way of doing it please let me know).

I think it is.  The paths should be relative,
not absolute..

>Manifest-Version: 1.0
>Main-Class: start.Start
>Class-Path:
> C:\Sun\jwsdp-2.0\jaxb\lib\jaxb-xjc.jar;

..so if the main jar lives in.. 'jaxb', that path would be..
lib/jaxb-xjc.jar
..note the forward slash, and lack of ';'.  The example
in the JavaDocs shows two jars listed on the same
line, delimited by a space.

HTH

Signature

Andrew Thompson
http://www.athompson.info/andrew/

cyprian - 21 Jul 2007 16:17 GMT
> ..
>
[quoted text clipped - 30 lines]
>
> Message posted viahttp://www.javakb.com

you can save yourself much trouble by using NETBEANS to build your jar
files. then open the jar file and see what's inside, that way you'll
learn how to create one yourself seamlessly


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.