Re: Jedit using wrong java on MacOS

Steve Jakob <[email protected]>
Newsgroups gmane.editors.jedit.user
Message-ID <[email protected]>
Hello Dr. Phil,

I’ve had similar issues on my Mac in the past where the jEdit application stub is unable to find the JRE or uses the wrong one. I was able to fix the problem by replacing the application stub with the “Universal Java application stub” found here:

	https://github.com/tofi86/universalJavaApplicationStub <https://github.com/tofi86/universalJavaApplicationStub>

It’s just a shell script rather than compiled code, so it’s easy to view and modify with a text editor (like jEdit, for example) if you’re familiar with BASH scripts. It also respects the JAVA_HOME variable, so it’s easy to run jEdit with the JRE of your choice. The info on that web site does a good job of explaining how it works.

To set it up:

- in the Mac Finder, navigate to the jEdit application (probably in your /Applications directory)
- right-click and choose “Show Package Contents”
- enter the “Contents” folder and then the “MacOS” folder
- rename the existing “jedit” stub to something else (eg. “jedit.save”) in case you want to change back
- save a copy of the “Universal Java application stub” into this folder and rename it to “jedit”

The next time you try to start jEdit it will use the new stub.

Good luck,

Steve Jakob

> On Dec 26, 2020, at 4:40 AM, Evans, Philip A. (Dr.) <[email protected]> wrote:
> 
> Hi everyone
> 
> If I install jedit from the downloadable mac dmg file (which is prefereable to the universal installer for many reasons) it seems to insist on pocking up the oracle Java that shipped with MacOS, instead of the newer java I’ve installed from MacPorts.
> 
> I have disabled the system java, set JAVA_HOME etc. Other Java apps seem to be picking up openjdk15 fine, but not jedit. If I use jedit 5.6.0 then it complains that it won’t work at all, and jedit 5.5.0 complains because I have a plug in that requires java>1.8
> 
> Does anyone know how to force jedit to use a specific installation of java?
> 
> Thanks
> 
> 
> Phil
> 
> 
> -------------------------
> 
> Phil Evans,
> Swift Development Scientist & Athena W-ISC Technical Lead
> X-ray and Observational Astronomy Group,
> University of Leicester
> 
> Tel: +44 (0)116 252 5059
> Mobile: +44 (0)7780 980240 (work)
> Mobile: +44 (0)7974 977723 (personal)
> 
> Office: G49 Physics Building
> 
> [email protected]
> 
> http://www.star.le.ac.uk/~pae9
> http://www.swift.ac.uk
> 
> Follow me as a Swift scientist on Twitter: @swift_phil
> http://www.star.le.ac.uk/~pae9/twitter
> 
> 
> -- 
> -----------------------------------------------
> jEdit Users' List
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jedit-users

-- 
-----------------------------------------------
jEdit Users' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.