Jar bundler not getting main class automatically from jar file. can you please describe the whole process?

StackOverflow https://stackoverflow.com/questions/14936167

  •  10-03-2022
  •  | 
  •  

Question

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.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top