I need to wrap jar file in .app file through jar bundler in mac os x but whenever I am going to do this jar bundler could getting main class from jar file but this jar is working well on windows or Linux platform's please give me the link or proper step by step description for wrapping jar file to mac os executable file (.app). Thanks in advance.
Asked
Active
Viewed 1,644 times
1
-
Do you have a significant reason not to use JWS? Its 1) More portable 2) More maintainable 3) Fully Functional. If you decide for some reason that you ***have*** to bundle the program as a .app, then definitely use [AppBundler](http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html) - JarBundler is effectively deprecated. – Perception Feb 18 '13 at 12:42
-
Now I am using App bundler as you advice me but this time it is causing an error "taskdef class com.oracle.appbundler.AppBundlerTask cannot be found using the classloader AntClassLoader[]" – ppst99 Feb 18 '13 at 13:44
-
ppst99 - did you specify the correct classpath for your taskdef? – Perception Feb 18 '13 at 13:47
-
lib/appbundler-1.0.jar here my appbundler jar file is located – ppst99 Feb 18 '13 at 13:51
-
Now giving error "Cause : The name is undefined" – ppst99 Feb 18 '13 at 13:58
-
1Coding by comments rarely, if ever works. Give it an honest go at solving the issues by researching online, and if run into a specific problem, post it as a separate question. – Perception Feb 18 '13 at 14:00
1 Answers
0
Just use the ant builder with custom build.xml file
command to use ant is.
go to the location of build.xml file through terminal after that hit the command.
$ant yourTargetName
Where your target name is declared in you build.xml file.
<?xml version="1.0"?>
<project name="Project Name" default="default" basedir=".">
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="lib/appbundler-1.0.jar" />
<target name="bundle-Target Name">
<bundleapp outputdirectory="."
name="Your Project Name"
displayname="yourProjectDisplayName"
identifier="yourMainClassName"
shortversion="1.0"
applicationCategory="public.app-category.developer-tools"
mainclassname="yourMainClassName">
<classpath file="/yourJarFileLocation"/>
<option value="-Dapple.laf.useScreenMenuBar=true"/>
</bundleapp>
</target>
</project>
To wrap in package this .app file.
Hit the command on terminal.
$productbuild --component filename.pkg /your app file location

ppst99
- 69
- 1
- 13