Showing posts with label java bundler. Show all posts
Showing posts with label java bundler. Show all posts

Thursday, February 26, 2009

Adding new file extension to NetBeans 6.5

If all you need is just add a new file Extension and associate it with a certain type of the file (e.g. PHP or C++), go to Tools->Options->Miscellaneous->Files
and add a new extension there, then select the appropriate type.
It's took me sometime to find out where this simple thing is hidden in NetBeans.

Monday, January 01, 2007

Creating Java Installation package on MAC OS X

1. Go to Finder->Applications->Utilities->jar Bundler


2. Define your application similar to the screens below:


Notes:
Main Class: Select here the JAR where your class with the main function is located.







Notes: Add your properties file and any other resource file if you have any
Add all the others JARs your application is dependant on.
I tried to add "icons" directory here with all the graphics, but the application did not find the icons. The right solution was to open the application package after it's creation and add the 'icons" directory withh all its content inside the package.



Notes: select "Set Working Directory to inside Application Package" if you want that your java code will find relative paths like "icons/button.gif"
Set minimum and maximum heap size

3. Upgrading: the Java package on Mac OSX is represented by a directory "ApplicationName.app" containing all the resources for this application. The posiible upgrade can be a tar (tar.gz) file including the jar/resource file that need to be upgraded. If "tar -xvf upgrade_filename.tar" is manually run in the "ApplicationName.app" directory all the files in the package will be replaced by the new files from tar archive.