Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong jdk packaged with the release #229

Closed
lesquoyb opened this issue Jun 26, 2024 · 7 comments · Fixed by #250
Closed

Wrong jdk packaged with the release #229

lesquoyb opened this issue Jun 26, 2024 · 7 comments · Fixed by #250
Assignees
Labels
😱 Bug The issue reveals a bug in GAMA 🧑‍🔧 Github Actions This issue concerns one repository's automated workflow Priority High

Comments

@lesquoyb
Copy link
Contributor

Describe the bug
In the current alpha release there's a problem with the jdk packaged for MacOs with arm architecture: when running it this message appears:
image
changing the path in the ini to a proper jdk 21 makes it work

@lesquoyb lesquoyb added 😱 Bug The issue reveals a bug in GAMA Priority High 🧑‍🔧 Github Actions This issue concerns one repository's automated workflow labels Jun 26, 2024
@hqnghi88
Copy link
Member

hqnghi88 commented Jul 3, 2024

Hi, Obviously you must have jdk21, otherwise if you are in jdk 17, use the non embedded GAMA it should work. This issue is specific for the ALPHA release with jdk embedded one

@agrignard
Copy link
Member

This is what I have with a jdk 21 that I copied at the same level of the jdk in Gama.app/Contents/jdk-21.0.3.jdk

Screenshot 2024-07-03 at 17 18 11

@agrignard
Copy link
Member

Ok so I installed a jdk 17

arno@dhcp-153-122 UMMISCO % javac -version
javac 17.0.11
arno@dhcp-153-122 UMMISCO % java -version 
java version "17.0.11" 2024-04-16 LTS
Java(TM) SE Runtime Environment (build 17.0.11+7-LTS-207)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.11+7-LTS-207, mixed mode, sharing)

but I get this error when running the GAMA without JDK

Screenshot 2024-07-03 at 17 42 52

can the log can help?

@lesquoyb
Copy link
Contributor Author

lesquoyb commented Jul 3, 2024

Gama 2024-06 now requires jdk 21, it cannot run with jdk 17.
If you still have a crash with gama without jdk + your system having jdk 21, then yes please provide the log file

@agrignard
Copy link
Member

thanks @lesquoyb and @hqnghi88 working now with GAMA without JDK and jdk21 installed

@RoiArthurB
Copy link
Contributor

Hi all, so I did some tinkering and I found that this issue only occurs while setting GAMA with a relative path to JDK.

If you edit the Gama.ini file and modify the path to your java bin to anywhere on your computer with an absolute path (ie. something like this /path/to/somewhere/java instead of that ../../otherpath/to/java) it'll fix the issue.

Therefore, I'm thinking the error comes from the new SWT which might modify the -vm parameter. My current question is that double slash in the Eclipse's path ([..]MacOS//..[..]) which might be an issue for the JDK path resolver or something like this...

RoiArthurB added a commit that referenced this issue Jul 9, 2024
For some reason, Eclipse or JDK doesn't like to resolve JDK find at an upper level than the executable. Therefore, creating a symbolic link next to the GAMA bin pointing at the historical place of the JDK (ie. one level above) fixes this issue. Who knows...
Fix #229
@RoiArthurB
Copy link
Contributor

I don't fully understand the reason of this issue, but it only happens on MacOS (no pb on Linux nor Windows).

The problem comes from the JDK being one level above the executable, but it's possible to trick it with a symbolic link. Therefore I create one before re-zipping the GAMA release with the embedded JDK. I also updated the -vm parameter to use this symlink :)

@github-project-automation github-project-automation bot moved this from Todo to Done in GAMA 2024-11 Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😱 Bug The issue reveals a bug in GAMA 🧑‍🔧 Github Actions This issue concerns one repository's automated workflow Priority High
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants