Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the IDEs forum.
 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic