Skip to content

Raekye/OSX-Java-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

OSX-Java-app

Run Java applications created with Apple's outdated bundler

Sometimes you download an OSX app and when you try to run it you get To open "Something.app" you need to install the legacy Java SE 6 runtime.. This Stack Overflow question explains it in detail.

This script reads the Info.plist file in an application generated by the bundler and builds the command line arguments for running the jar directly. Of course, you still need the app downloaded, and Java installed and available at the command line.

I made this script for Runescape and Minecraft; it may not work for everything else, but at the very least it'll give you an idea of how to manually figure out how to run a jar bundled in an app.

Usage

  • To download, run wget -O <path to file> https://raw.githubusercontent.com/Raekye/OSX-Java-app/master/java.sh at the command line
    • If you've never used the command line before, it looks scary but is actually straightforward (for this anyways)
      • Open the Terminal app under the "Other" folder in your Applications, or search for it in Spotlight
    • If you want to be able to double click and run, name the file with a .command extension, and I recommend placing it on your desktop
  • chmod u+x <path to file> to make it executable

Look for the following at the beginning of the script and follow the instructions.

# Uncomment and edit the line below if you want to run this without arguments
# e.g. "cd /Applications/Minecraft.app/"
# e.g. "cd /Applications/Runescape.app/"
# cd /path/to/MyApplication.app/

Example

# Run these commands in Terminal
cd ~/Desktop/
wget -O minecraft.command https://raw.githubusercontent.com/Raekye/OSX-Java-app/master/java.sh
chmod u+x minecraft.command

# Edit the file so you can run it without arguments, as explained above
open -a TextEdit minecraft.command

Technical usage

./java.sh [--print] [path]
  • --print: Only print the built command, don't run it
  • path: Path to the application, e.g. /Applications/Runescape.app/. If blank, assume the current directory
    • As explained above, you can uncomment and edit cd /path/to/MyApplication.app/ so you can run the script without specifying the path every time

About

Run Java applications created with Apple's outdated bundler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages