wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes How do you create a .jar file or a Mac OS X .app in Eclipse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How do you create a .jar file or a Mac OS X .app in Eclipse?" Watch "How do you create a .jar file or a Mac OS X .app in Eclipse?" New topic
Author

How do you create a .jar file or a Mac OS X .app in Eclipse?

Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 688

I've decided to use Eclipse as my IDE. It seems to be working for development, but I don't know how to make a deployable app with it. Either a .jar or a Mac OS X .app would be better.

I've found that in Eclipse, under the "File" menu, you can choose "Export". You are given several options, among these are to create a Mac OS X application, but the resulting app doesn't work. There are pieces missing from the Mac OS X app when you look at it in the Findert with the command "Show Package Contents".

In my previous job, when we updated our code from Mac OS 9 to Mac OS X, we wrote shell scripts to put all of the pieces together. I seems like Eclipse's feature to create a Mac OS X app isn't finished yet.

You are also given the choice to create a .jar file, but this option doesn't work either. The .jar file is missing the manifest. I've created a Manifest file, but I don't know how to put it into my project so that it is automatically inserted into my .jar file.

-- Kaydell
[ December 07, 2006: Message edited by: Kaydell Leavitt ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60788
    
  65

Moved to the IDEs forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 688

I figured out how to make a .jar file in Mac OS X from the command line. You use the following command:

jar cmf MANIFEST.MF myjarfile *.class

I also figured out how to make a Mac OS X .app -- but not with Eclipse. That still seems like something that is not finished, even in the latest version of Eclipse (version 3.2.1). I downloaded the latest version of Apple's Mac OS X developer tools, and in the process, got an update of Apple's "Jar Bundler" application, version 11.4.0. With Jar Bundler, you specify your main class file and your other class files etc. and it bundles everything up into one neat, self-contained package.

-- Kaydell
[ December 08, 2006: Message edited by: Kaydell Leavitt ]
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

In Eclipse, you can create a jar by selecting your project and select Export from File Menu. Select jar file from dialog box(which has other types as well) and follow the instructions in Export wizard by clicking next .....

hth,


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How do you create a .jar file or a Mac OS X .app in Eclipse?
 
Similar Threads
NoClassDefFound Error in an Eclipse Export
I'm Getting an Error Creating a Jar File in Eclipse
FAQ How to deploy to a .app for Mac & a .exe for Windows
I'm Getting an Error Creating a Jar File in Eclipse
some JAR problems.