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

Crash on Mac with security violation error - Java 14 #1386

Closed
MikeMitterer opened this issue Apr 9, 2020 · 2 comments
Closed

Crash on Mac with security violation error - Java 14 #1386

MikeMitterer opened this issue Apr 9, 2020 · 2 comments

Comments

@MikeMitterer
Copy link

MikeMitterer commented Apr 9, 2020

Im using Mojave 10.14.6 with several versions of Java on my machine.

Lately (in the meantime I've installed Java 14) I got a crash report and a Java security error.
The error was something like "Not allowed to run application without certificate..."

I think ugs should be aware of JAVA_HOME | JDK_HOME...

However - I was able to solve the problem by:

  • in my .bashrc:
    export JAVA8_HOME=/usr/libexec/java_home -v 1.8
    export JAVA_HOME=$JAVA8_HOME
    export JDK_HOME=$JAVA_HOME

  • adding the following lines to ugsplatform:

...
PRG=$0

#### I added these line ###
if [ -z "${jdkhome}" ]; then
    jdkhome=${JDK_HOME}
    if [ -z "${jdkhome}" ]; then
      jdkhome=$JAVA_HOME
    fi
fi

while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
    if expr "$link" : '^/' 2> /dev/null >/dev/null; then
	PRG="$link"
    else
	PRG="`dirname "$PRG"`/$link"
    fi
...

Specifications

Version

I tried both UGS nightly (2020 04 06) and Stable 2019 08 14

Operating system

Mac Mojave 10.14.6

@winder
Copy link
Owner

winder commented Apr 9, 2020

There are some comments about this in #1328

Thats interesting that overriding the jdkhome is part of the problem. Instead of setting jdkhome in the launcher script (which is a build artifact) would suggest setting it in ugsplatform.conf.

There is also a UGS package which ships with the java runtime (and uses jdkhome), which might work without any changes: https://github.com/winder/Universal-G-Code-Sender#downloads

@jeffpoulton
Copy link

jeffpoulton commented Jun 7, 2020

I tried running UGS on OS X Catalina with both Java 11 and Java 14. Both versions of Java resulted in the UGS crashing. I installed Java 8 and followed @MikeMitterer's steps and was able to successfully launch UGS without it crashing.

However, I did not want to set Java on my machine to 1.8. Following advice from @winder to configure jdkhome in ugsplatform.conf, this line does the trick for me:

jdkhome="`/usr/libexec/java_home -v 1.8`"

My machine is configured to use Java 14, but UGS is running against Java 8.

@breiler breiler closed this as completed Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants