How to help the jEdit application find java?

Mac applications have an info.plist file inside them, where you can sometimes poke in sneaky settings.

You can browse to this by right clicking and saying "Show package contents". You should see a "Contents" directory, and be able to edit an "info.plist" file.

What sneaky settings? Well I got enough clues from this jedit forum post.

First we need to create a symlink from Plugins (also in the "Contents" directory) through to where our JDK is installed. In my case I wanted it to use my homebrew installed JDK, so I needed to do...

cd /Applications/jEdit.app/Contents/PlugIns

ln -s /usr/local/opt/openjdk/libexec/openjdk.jdk openjdk

(Creates a symlink called "openjdk")

Having done that, we can add an entry in info.plist looking like this:

        <key>JVMRuntime</key>
        <string>openjdk</string>

It probably doesn't matter where in the file. I put these two lines above <key>JVMOptions</key>

Having done that, I can now click the jedit icon in Applications, to start it up!