Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Running Java Tools
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running Java Tools



I don't know much about the details of jars and pure java apps, but the error message in the last couple of your attempts seems to indicate that the way java figures out which class in a jar file has the "main" method is through some info inb the jar's manifest and that your jar file is missing this info (or maybe has no manifest.)

Make sure you have a manifest and that it has this info.

Perhaps one of the more Java-savvy folks on the list can provide more detail...

Mike Ferris


Begin forwarded message:

From: Jonathan 'Wolf' Rentzsch <email@hidden>
Date: Thu Jan 25, 2001 09:19:55 AM US/Pacific
To: email@hidden
Subject: Running Java Tools

Greetings all,

I'm attempting to get my sea legs with X, Java and Project Builder. To
start off, I'd like to write a Java application (CLI, "tool" in Project
Builder-speak) on X on my Pismo and run it on X Server on my Sawtooth.
(I'll just FTP the jar to it.)

I can create a Java tool no problem and run it from Project Builder
without incident. However, how do I invoke the tool from the command line?

My test project is named "XPlatformTest" and here's what I've tried:

cd ~/code/XPlatformTest/build/XPlatformTest/

wolf% java XPlatformTest.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
XPlatformTest/jar

wolf% java -jar XPlatformTest.jar
Failed to load Main-Class manifest attribute from XPlatformTest.jar

wolf% java -jar -classpath "XPlatformTest.jar" XPlatformTest.jar
Failed to load Main-Class manifest attribute from XPlatformTest.jar

I'm sure it's bloody simple...

.......................................................
Jonathan 'Wolf' Rentzsch jon at redshed dot net
Red Shed Software http://redshed.net (847) 584-7465
PGP: B2AF 1A09 F881 EBDE C9D6 C4D2 C04F A3C0 3EC5 D5F2

"Remember: you are unique, just like everybody else."
_______________________________________________
projectbuilder-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/projectbuilder-users


References: 
 >Running Java Tools (From: "Jonathan 'Wolf' Rentzsch" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.