Java App Bundler Mac

We have enabled hardened runtime on our macOS binaries which will allow them to be bundled into applications and pass Apple’s Notarization tests. OpenJDK 11+ will work out of the box, OpenJDK8 needs a bit more work because it’s built on an older toolchain that the notarization test doesn’t support. For deploying on Windows, I like using Launch4j for wrapping my application jar and creating a native Windows executable that can detect and use an already installed JRE, or allows you to bundle your own. It's fast, lightweight and easily scripted with Ant (or Maven) as part of your build process. Combined with this, I typically use NSIS for creating an installer that puts in shortcuts,. Jar to Mac OSX App Bundle with app bundler. Ask Question Asked 6 years, 2 months ago. Active 6 years, 2 months ago. Viewed 6k times 3. Download Java Application Bundler and place it in the lib directory of your project. You will need to create this directory.

2020腾讯云双十一活动,全年最低!!!(领取3500元代金券),
地址:https://cloud.tencent.com/act/cps/redirect?redirect=1074

【阿里云】双十一活动,全年抄底价,限时3天!(老用户也有),
入口地址:https://www.aliyun.com/1111/home

Advanced medical dictation software is built for physicians and practitioners. Voice recognition app macos.

I am trying to bundle my Java application to an Mac OS X .app bundle. I am currently using appbundler and I followed Oracle's guide. The Ant task works fine in Netbeans and the corresponding .app package is built correctly (on Windows). But when trying to execute the .app package to my MacBookPro (OS X 10.7.5), I get the following error in the log:

I already checked the permissions for the .jar file and the execution bits are set for the main-jar and all the jars in the lib-folder.

The application just runs fine when typing the following to the terminal:

For clarification, here's the final folder structure:

By the way, my application has lots of external dependencies, all located in the 'lib' folder which are properly linked by the class-path property within the MANIFEST.MF file of the executable main-jar file 'LawSuiteSE.jar'. Do I need to copy these libs within the appbundle-ant-task or is it okay to copy them subsequently by hand?

Java application bundler mac

I also tried to build the application and the corresponding .app package on the MacBook Pro, but the same error message.

Here's my Ant-task:

EDIT: I meanwhile replaced the JavaAppLauncher in Contents/MacOS with a small run script (start.sh):

Then I also replaced the value for the key CFBundleExecutable in Info.plist from JavaAppLauncher to start.sh.

Now it works fine, but how can I use a relative path to the jar-executable? Something like './Java/LawSuiteSE.jar' doesn't work and gives me the same error as before. Is there any constant pointing to the current app-folder, something like '$APP_ROOT' so that the script could look like:

Recommend:osx - Packaging C binary in Mac OS X Application Bundle

ehavior with the result. My bundle has this minimal structure: $ ls -R HelloWorld.appContentsHelloWorld.app/Contents:Info.plist MacOS PkgInfoHelloWorld.app/Contents/MacOS:helloworld helloworld is a C binary compiled from: #incl

Any ideas?

javaosxantbuildjarbundler
|
Mac this questionedited Aug 15 '14 at 14:12 asked Aug 14 '14 at 14:01 salocinx 1,053 4 26 65 Are the symlinks working? Generally, when building on windows, the symlinks are broken. – nbz Aug 14 '14 at 14:04 Okay I checked and updated my symlinks on the MacBook Pro by following this guide: monkehworks.com/…. But I does still not work. Next I will try to build my app on the MacBook. – salocinx Aug 14 '14 at 14:32 Building the entire project and bundling the package on the Mac did not help.. still same problem. – salocinx Aug 14 '14 at 14:54 |

1 Answers
1

---Accepted---Accepted---Accepted---

Do I need to copy these libs within the appbundle-ant-task

Yes, you should mention all the required libraries in classpath elements. The bundler will then copy them all to the appropriate place inside the bundle (only JAR files that are directly under Contents/Java will go onto the classpath when the bundle is run, JARs in subdirectories are ignored). You should also use dots instead of slashes in the mainclassname.

Edit

Now it works fine, but how can I use a relative path to the jar-executable

You can use dirname $0 to get the path to your bundle's Contents/MacOS, and take a relative path from there. You should probably also make an explicit reference to the public JRE rather than relying on java being on your PATH, as that will only work if the target machine has a JDK installed, not if it only has a JRE. Installing the JDK will install the public JRE as well, so it's safe in that case too.


|
this answeredited Aug 15 '14 at 14:18 answered Aug 14 '14 at 15:34 Ian Roberts 91.2k 6 104 123 Hi Ian, thanks for your suggestion. Now the bundler copies and flattens all the .jar files within my lib folder to Contents/Java. I also adjusted my MANIFEST.MF to directly looking for the .jars in the app-root folder instead of app-root/lib. But still the very same problem. Btw. is there really no way to keep up the folder structure within the lib-folder? My external libs have themselves heavy dependencies to a lot of other jar-libs in a clearly defined folder structure within the lib-folder. Thanks in advance! – salocinx Aug 15 '14 at 10:06 @salocinx The native launcher stub inserted into the bundle by the bundler task creates it's classpath by enumerating all the jar files that are contained in the Contents/Java directory (and only that directory, no subdirs), and executes the mainclassname - this behaviour is hard coded in the stub and is not negotiable. – Ian Roberts Aug 15 '14 at 10:13 Thanks for the quick answer Ian. Okay these are bad news. Is there any work-around to launch my application with some kind of a script or something similar out of an .app-bundle? My application basically works just fine on the Mac when directly launching with 'java -jar Servitus.jar --installer', but I'm really interested in an .app-bundle.. :-) Any further ideas? – salocinx Aug 15 '14 at 11:00 @salocinx you can certainly construct a bundle by hand, and the main 'binary' in Contents/MacOS can be a shell script that delegates to /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java. This is the approach I use for GATE, though it's a bit more complex in that case as there's a second level of indirection (it's a cross-platform tool, the script inside the .app bundle delegates to another shell script, which other platforms would call directly). – Ian Roberts Aug 15 '14 at 11:28 Hi Ian, that's exactly what I meant. Meanwhile I wrote a small start.sh script and linked it with the CFBundleExecutable key in the Info.plist. The only problem remaining is that I need to provide the full path to the .jar-executable within the script, with relative paths it doesn't work.. is there a placeholder that points to the current .app-folder like $APP_ROOT or something similar? Please have a look on the original question above, I added an 'EDIT' section to describe the problem in more detail. – salocinx Aug 15 '14 at 14:14 | show more comments

Recommend:osx - How to print stack trace from Java Mac Os X Application Bundle

ndle that I build crashes on launch. I want to print a stack trace so I can figure out what is causing the problem. I think this should be pretty straight forward but I can't find an example of this anywhere (maybe my terminology is incorre

xml:lang='en-US'>

These documentation pages are no longer current. They remain available for archival purposes. Please visit https://docs.oracle.com/javase for the most up-to-date documentation.

This page shows you, step by step, how to convert a simple Java application to a version you can distribute on a Mac. To follow along, download the ButtonDemo (.zip) example from the Java Tutorial. This example was created using NetBeans which uses the Ant utility. You can run all necessary tools and make all necessary edits from the command line, without launching NetBeans. The Ant tool is required.

Mac app blocker serial. Download Mac App Blocker for Mac Free download free setup for Mac OS. It is Offline dmg File with Direct Download Link with the standalone Compressed file. Mac App Blocker for Mac Crack, Mac App Blocker Mac Serial Key. About The Author. More From This Author. The Battle of Polytopia 2021 Mac.

You have created a Java application and want to bundle it for deployment. This requires the following steps:

Create a JAR File

This step creates the ButtonDemo.jar file.

Execute ant jar in the high-level project directory to create the dist/ButtonDemo.jar file. This jar file is used to create the .app package.

Java App Bundler Mac Shortcut

Bundle the JAR File into an App Package

To create the ButtonDemo.app package, use the appbundler tool. The appbundler is not shipped with the 7u6 version of the Oracle JDK for the Mac. You can download it from the Java Application Bundler project on java.net. There is also AppBundler Documentation available.

As of this writing, the most recent version is appbundler-1.0.jar, which is used by this document. Download the latest version available and substitute the file name accordingly.

Our app allows you to select any area on your desktop and take its screenshot with 2 button-clicks. Easy-to-use application Simple and intuitive user interface makes your. What Is a Screenshot? The term “Screenshot” also known as a snapshot or screen capture, or print. Screenshot app mac uworld pro. Install UWorld on the VM. Window the VM on your Mac. Find the question you want to screenshot and have it up on the VM screen. Make sure your VM is NOT the active window and is in the background on your Mac. Then use snipping tool to screenshot the question on UWorld on the virtual machine in a background window. If you open up terminal on a mac and type 'screencapture -iw /Desktop/.insertpicturename.png' you can click and screenshot UWorld. UWorld is neither endorsed by nor affiliated with NCBE. None of the trademark holders is affiliated with, and does not endorse, UWorld product/site. This site is protected by reCAPTCHA and the Google.

  1. Install the appbundler-1.0.jar file. In this case, create a lib directory in the high-level project directory and add the appbundler-1.0.jar file.
  2. Modify the build.xml file in the high-level project directory as follows. (The added code is shown in bold.)
  3. Invoke the appbundler by typing ant bundle-buttonDemo from the high-level project directory. This creates the ButtonDemo.app package in the dist directory.
  4. You should now be able to launch the application by double clicking ButtonDemo.app in the Finder, or by typing open ButtonDemo.app at the command line.

Bundle the JRE with the App Package

In order to distribute a Java application, you want to avoid dependencies on third party software. Your app package should include the Java Runtime Environment, or JRE. In fact, the Apple Store requires the use of an embedded JRE as a prerequisite for Mac App Store distribution. The runtime sub-element of the <bundleapp> task specifies the root of the JRE that will be included in the app package.

In this example, the location of the JRE is defined using the JAVA_HOME environment variable. However, you might choose to bundle a JRE that is not the same as the one you are using for development. For example you might be developing on 7u6, but you need to bundle the app with 7u4. You will define runtime accordingly.

Since this example defines the runtime sub-element using JAVA_HOME, make sure it is configured correctly for your environment. For example, in your .bashrc file, define JAVA_HOME as follows:

Use the following steps to modify the build.xml file at the top of the project directory:

  1. Specify an environment property, named env:
  2. In the target that creates the bundle, specify the location of the JRE on your system, using the env property:

The resulting build.xml file should look like the following. (The new lines are shown in bold.)

Create a fresh version of ButtonDemo.app, using the ant bundle-buttonDemo command. The resulting version includes the JRE in the app package. You can confirm this by examining the Contents/PlugIns directory inside of the app package.

Sign the App

The Gatekeeper feature, introduced in Mountain Lion (OS X 10.8), allows users to set the level of security for downloaded applications. By default, Gatekeeper is set to allow only OS X App Store and Developer ID signed applications. Unless your app is signed with a Developer ID certificate provided by Apple, your application will not launch on a system with Gatekeeper's default settings.

Mac instagram desktop app. Instagram (commonly abbreviated to IG or Insta) is an American photo and video sharing social networking service owned by Facebook, created by Kevin Systrom and Mike Krieger and originally launched on iOS in October 2010. The Android version was released in April 2012, followed by a feature-limited desktop interface in November 2012, a Fire OS app in June 2014, and an app for Windows 10 in. Flume is a beautiful Instagram app for your Mac. Instagram desktop free download - Parallels Desktop for Mac, Microsoft Remote Desktop, Hulu Desktop, and many more programs. 'Grids is a better way to browse Instagram on the desktop' 'Grids app makes Instagram viewing on desktops more fluid and interactive' 'Experience Instagram in a whole new way with Grids for Mac'.

For information on the signing certificates available, see Code Signing Tasks on developer.apple.com.

The signing certificate contains a field called Common Name. Use the string from the Common Name field to sign your application.

Sign your app using the codesign(1) tool, as shown in the following example:

To verify that the app is signed, the following command provides information about the signing status of the app:

To check whether an application can be launched when Gatekeeper is enabled, use the spctl command:

If you leave off the --verbose tag, and it does not print any output, indicates 'success'.

For more information, see Distributing Outside the Mac App Store on developer.apple.com.

Submitting an App to the Mac App Store

Java Application Bundler Mac

Packaging an app for the Mac App Store is similar to packaging for regular distribution up until the step of signing the app. Signing the app for the Mac App Store requires a few more steps, and a different kind of certificate.

You will need to create an application ID and then obtain a distribution certificate for that application ID. Submit your app using Application Loader. For more information, see the following links (on developer.apple.com):

Java App Bundler Mac Download

Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved.