Thanks, Michael, Christian, and Johan, for your help and ideas!

I finally had the chance to dive in. I couldn't just install temurin (Java
21), since I already had used Homebrew to install temurin@8 (which I need
for eXist). Whenever I've previously needed to switch between two versions
of Java I would use homebrew to uninstall one and install the other. This
takes time, so it wasn't ideal. I would like to run eXist and BaseX
whenever I need them, without this hassle. So this gave me a chance to try
out jenv. I followed a few tutorials. The best one I found was
https://www.baeldung.com/jenv-multiple-jdk.

Hopefully the underlying bug causing the weird error on macOS will be
solved, but in the meantime, this will do the trick.

Below are some of the commands I used, in the hope that this might help
others who need to run multiple versions of Java.

Thanks again!
Joe


# install jenv - and follow the installer's hints to add lines to your
.zshrc or .profile
brew install jenv

# install the versions of java you need
brew install temurin temurin@8

# register these versions
jenv add /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home

# set the global java to 8 - a good default for me
jenv global 1.8

# set the current shell to 21 - so I can start basexgui in this terminal
without affecting other places
jenv shell 21.0

# check current shell version
jenv versions
  system
  1.8
  1.8.0.392
* 21.0 (set by JENV_VERSION environment variable)
  21.0.1
  temurin64-1.8.0.392
  temurin64-21.0.1

On Wed, Oct 25, 2023 at 9:19 AM Johan Mörén <johan.mo...@gmail.com> wrote:
>
> Thanks for the workaround Michael!
>
> It worked for me as well but I installed temurin via homebrew.
> brew install temurin
>
> Regards,
> Johan
>
> On Wed, Oct 25, 2023 at 3:03 PM Johan Mörén <johan.mo...@gmail.com> wrote:
>>
>> Hi Michael, my setting for "Allow Applications Downloaded from…" is “App
Store and identified developers”.
>>
>> It's controlled by a central company profile so I can't change it.
>>
>> Thanks for pointing out that the warning is not the cause. I managed to
see the same error report as you posted when i choose "report to apple"
>>
>> Regards,
>> Johan
>>
>> On Wed, Oct 25, 2023 at 2:21 PM Michael Seiferle <m...@basex.org> wrote:
>>>
>>> Hi Johan,
>>>
>>>
>>>
>>> it works (well worked… see below) on my machine with the very same
setup (basex@10.7 & openjdk@21 via brew, see my previous email), so I am
sure it is an issue for certain setups.
>>>
>>>
>>>
>>> what’s your security settings? Apple Menu -> Privacy & Security ->
Allow Applications Downloaded from… mine is set to “App Store and
identified developers”.
>>> Now if I set it to “App Store” BaseX will not start with the following
error:
>>>
>>>
>>>
>>> BUT: now it won’t start again even if I set it back :-{
>>>
>>> So my motivation to find a fix or workaround is considerably higher now
I will report once I found something.
>>>
>>>
>>>
>>> The warning that is dumped to your console — something something
NSApplicationDelegate.applicationSupportsSecureRestorableState — doesn’t
cause BaseX to crash, as I could see this warning as well.
>>>
>>> Background:
>>>
>>>
https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate
>>>
>>>
>>>
>>> Best
>>>
>>> Michael
>>>
>>>
>>>
>>>
>>>
>>> Von: Christian Grün <christian.gr...@gmail.com>
>>> Datum: Mittwoch, 25. Oktober 2023 um 13:09
>>> An: Johan Mörén <johan.mo...@gmail.com>
>>> Cc: Michael Seiferle <m...@basex.org>, BaseX <
basex-talk@mailman.uni-konstanz.de>
>>> Betreff: Re: [basex-talk] Crash when starting basexgui
>>>
>>> Thanks. It seems we have to wait for Apple to fix this. Unfortunately,
their bug tracker doesn’t seem to be public [2].
>>>
>>>
>>>
>>> [1]
https://github.com/Homebrew/homebrew-core/issues/150824#issuecomment-1776139189
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Oct 25, 2023 at 1:01 PM Johan Mörén <johan.mo...@gmail.com>
wrote:
>>>
>>> Running MacOS Sonoma Apple Silicon M2 processor and ran into the same
problem when homebrew updated my JDK to 21.0.1 today.
>>>
>>>
>>>
>>> According to this article it seems like applications like jmeter and
IntelliJ needs to fix this by implementing a specific interface. I guess
this applies to Basexgui as well?
>>>
>>>
>>>
>>>
https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate
>>>
>>>
>>>
>>> Regards,
>>>
>>> Johan
>>>
>>>

>

Reply via email to