Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generating correct jar file



A Cocoa-Java application doesn't create a standalone .jar file, it creates a .app bundle (inside which the .jar lives). You need to run the application (which runs the main() from main.m - ObjC, not Java). Once NSApplication is initialized, then Cocoa knows to load your classes from the .jar file. Also note that the .jar should not contain the system's classes (all those NS* classes). Those live with the system, not with a particular app.

Dave

On Sep 24, 2003, at 2:15 PM, dmitry wrote:

My warm greetings to the forum members!
I apologize if this was answered already. I can't build correct jar file for my Cocoa Java application project
in Project Builder. The default *.jar file i run gives the error:
---
Failed to load Main-Class manifest attribute from
JavaSimpleMultiWindow.jar
---
Yes, I know I have to decompile the jar and correct manifest file to point to the class containing the main() method.
But the problem is that my project is type of "Cocoa application" and doesn't have main() method ether.
All I have are my Java class files and the main.m file which was created by PB. I have found also by decompiling
the jar file that Java cocoa framework was not included in the file. So, even I create main() method
the jar still won't work because there is no way to convert all my NS<types> to the Java native types.


So my question: Is it possible at all to generate correct jar file in Java Cocoa applications?
And if so how to do this.

Thanks for reading,
Dmitry Bouzolin.
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Generating correct jar file (From: dmitry <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.