Closed omezger closed 3 years ago
Do you really need Java 15? I would suggest to uninstall that and use OpenJDK 11 from this link, which works fine. https://adoptopenjdk.net/
Ok, I removed all Java 15 VMs and installed https://adoptopenjdk.net/ Terminal shows: omezger@MezMacBook-Pro-16 ~ % /usr/libexec/java_home -V Matching Java Virtual Machines (1): 11.0.9.1, x86_64: "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home Deleted Structorizer, Restarted my Mac and tried it again with fresh unzipped App, with same Result 😢 . Could it be JavaAppLauncher because Structorizer.jar works still fine?
It could be ... but I have running Structorizer on a lot of Mac's at school running all kind of different OSX versions, even the latest Big Sur .... and there is no Problem.
So the question is: why does it not work :-(
Could you check the Console-App to see if there are any error messages thrown out there?
Did you mean Messages like this: Jan 20 20:17:06 MezMacBook-Pro-16 com.apple.xpc.launchd[1] (lu.fisch.Structorizer.28696[835]): Service exited with abnormal code: 1
Yes, that's at least a hint, even if nothing really to stick with :-(
I'm scared about all this s.... that I read there "all things are going permantently wrong" 😠Information overflow Just trying to get more Info:
JavaAppLauncher omezger@MezMacBook-Pro-16 MacOs % JavaAppLauncher -v zsh: command not found: JavaAppLauncher ...feeling so stupid, forgot all being a teacher...
seams a problem with zsh. You may try this:
https://stackoverflow.com/questions/33935281/command-not-found-oh-my-zsh
There was no .zshrc File in ~/ my Home and I tried several things like your link in a new .zshrc with no success, just like there is no .zshrc file.. something strange with my 10.15.7.
omezger@MezMacBook-Pro-16 ~ % echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
good night
Just to be sure, could you check the content of the folder
/Applications/Structorizer.app/Contents/Java/Structorizer.jar/Contents/MacOS
Is there a binary name "JavaAppLauncher" which is executable? What happens if you launch it in the terminal with ./JavaAppLauncher ?
I think you mean /Applications/Structorizer.app/Contents/MacOS there is JavaAppLauncher .. Same Thing..
I updated a MacMini from HighSierra to Catalina and launched Structorizer and Umlet successfully without any Problem. Used /System/Applications/Utilities/Activity Monitor.app to check what Structorizer uses... On this machine is no installed JVM but Structorizer uses in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/... from 2016
At my new 16' is nothing like this, I don' migrate from old System and don't uses the migration assistent to get a new clean system. But I installed some Java Dev Software like IntelliJ...
Next I will test it on a fresh clean Catalina-System and without Installed IntelliJ or Java 15 to check if there is the problem..
Thanks a lot for Support, I and my Students love your Software! At the moment I think the problem is on my site... Oliver
On a new fresh Catalina with installed https://adoptopenjdk.net/ Version 11 The problem is still there: Unable to load Java Runtime Environment. In /Library/Internet Plug-Ins/ no Plugins are installed. At my MacBook Pro 16' I fixed the problem coping /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/... from my migrated MacMini. So I think /Applications/Structorizer.app/Contents/MacOS/JavaAppLauncher needs the Plugin. % /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
I am not at home on a Mac but the mentioning of a "JavaApplet" rings a bell. As the Java Applet (running in a browser) is regarded as a potential security risk, it will by default not be installed anymore, browsers often don't support it any longer, and class javax.swing.JApplet
is deprecated since Java 9. Maybe it has something to do with it? Should we just kick the fading-out class StructorizerApplet.java
(which still refers to javax.swing.JApplet
) out of the project, perhaps?
The applet isn't online anymore anyway, so I think we could move it to "old files" too ;-)
But that is not @omezger's problem. On the Mac, up to Java 8, the "JavaAppletPlugin" was nothing else than a JRE and used by the system for running Java applications With Java 10 upcoming, this had been changed, but it seems to remain somehow deep down their system :-/
@fesch Okay, I am just guessing a little: Could there be a similar problem on the Mac like in the Windows registry as described in the User Guide (that an installed JDK isn't recognized, because the application only looks for a JRE)?
No, OSX is different :-/
Apps like BlueJ, Arduino, Freeplane bring their own JRE in the package: /Applications/Arduino.app/Contents/MacOS/Arduino /Applications/Arduino.app/Contents/PlugIns/jre1.8.0_242.jre/Contents/Home/lib/jli/libjli.dylib /Applications/Arduino.app/Contents/Java/apple.jar /Applications/Arduino.app/Contents/Java/batik-1.8.jar /Applications/Arduino.app/Contents/Java/batik-rasterizer-1.8.jar /Applications/Arduino.app/Contents/Java/batik-svgpp-1.8.jar /Applications/Arduino.app/Contents/PlugIns/jre1.8.0_242.jre/Contents/Home/lib/libverify.dylib /Applications/Arduino.app/Contents/PlugIns/jre1.8.0_242.jre/Contents/Home/lib/libjava.dylib /private/var/folders/hg/gxcvmc493cj8vyz6qk_bxz740000gn/T/hsperfdata_omezger/19590 /Applications/Arduino.app/Contents/PlugIns/jre1.8.0_242.jre/Contents/Home/lib/libzip.dylib /Applications/Arduino.app/Contents/Java/batik-ext-1.8.jar /Applications/Arduino.app/Contents/Java/batik-xml-1.8.jar
Structorizer uses the Internet-Plugin: Applications/Structorizer.app/Contents/MacOS/JavaAppLauncher /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/libverify.dylib /private/var/folders/hg/gxcvmc493cj8vyz6qk_bxz740000gn/T/hsperfdata_omezger/19919 /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/libzip.dylib /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/server/libjvm.dylib /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/libjava.dylib /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/rt.jar
At fresh Catalina system with installed adoptopenjdk-11.jdk these Plugins are not installed, so the AppLauncher can't find the Java Runtime Enviroment. At my fresh system I can start Structorizer via /Applications/Structorizer.app/Contents/Java/Structorizer.jar And it uses the installed JRE at /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/.. but I can't get access to many folders i.e. Desktop :-(
@fesch Is a solution in sight? Can we contribute to a solution at all? Should we give some relevant recommendations in the User Guide?
My test on a clean OSX Big Sur
@omezger : I've succeeded in integrating a JDK8 into the package, so that it should now start even on a system where no JDK is installed, but the overall package size increased significantly.
Could you please try?
Tested on my clean Catalina System: It works! I think you fixed it. Thanks a lot!
@fesch Oops. That has indeed become a heavy package! Maybe, on the long run the JDK can be replaced by a JRE. At least via the homebrew package manager there seems to be a more or less working way to generate a JRE from AdoptOpenJDK on GitHub (as part of the AdoptOpenJDK project): Homebrew-OpenJDK. I haven't checked this, though.
Yes ... I deleted the packaged source freeing up some 40MB but still heavy. Indeed, a JRE will be enough. I took the JDK because I had it ready from some other project, ;) but now that the way to go is clear, we can for sure optimize this!
Signing the OSX package is something else I would like to do, but I did not success in building zsign an none of the other methods worked out either ...
I will try this later on ...
@codemanyak : Using the above Link I was able to considerably reduce the size so that the final package shrinks down to about 50MB.
@omezger : Could you perhaps give the newly uploaded package a try?
Good shrink, but if I click at a nsd-File Structorizer starts but don't open the File. I tried this: Open file via Filemenue, allow access to the desktop, (setting is thereby saved in the system preferences Security, at Files and Folders) -> file is opened. Closed Structorizer, double click on the file, Structozier starts but the file is not opened.
@omezger Was this different with the prior ("fat") package? Or haven't you tried?
Sorry, I don't try this with the fat package and now its replaced :-(
This has nothing to do with the used JRE (either fat nor light) I think, but I can generate the fat package if you want to try.
This has nothing to do with the used JRE (either fat nor light) I think, but I can generate the fat package if you want to try.
I did not think so, either, but just wanted to make sure we don't look in a wrong direction.
Ok, I would try it with the fat one ;-)
@omezger : OK, the fat package is now again on the server.
The fat one works fine, the thin one not. The fat one don't border privacy-settings "files and folders", I can open nsd-Files with double click from everywhere.
Grrr ... so the question is: Why does the fat one work and the thin one not?
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by lu.fisch.structorizer.gui.OSXAdapter (file:/Users/btsadmin/Downloads/Structorizer/Structorizer.app/Contents/Java/Structorizer.jar) to constructor com.apple.eawt.Application() WARNING: Please consider reporting this to the maintainers of lu.fisch.structorizer.gui.OSXAdapter WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release
So Java8 seams good with this but Java11 does not ...
Strange, I get the same messages with Java 8, but double-clicking a file is working ...
@omezger : I found a way to make it work with the thin package (that is now online!) Can you please confirm that it works for you too?
Seems to be ok!
I found a way to make it work with the thin package (that is now online!) Can you please confirm that it works for you too?
@fesch Would you mind explaining in a few words what the core of the problem was and how you solved it (not urgent, just out of curiosity)?
Would you mind explaining in a few words what the core of the problem was and how you solved it (not urgent, just out of curiosity)?
@fesch Oh sorry, I revoke my question - I see it in the code.
;-)
@fesch By the way and on occasion of #940: Could you please try to keep the JRE out of the Windows/Linux package? (Obviously, it is only used in an OS X context, anyway). If you keep the light-weight script stuff out of the Mac version, then it should also be feasible (and would make way more sense) to keep the relatively heavy JRE out of the other downloads.
yes, the JRE gets deleted from the directory before making the Windows/Linux package ... but my script still seams wrong. I will adjust it ...
Argh ... the name of the folder of the thin package changed, this is why it did not get deleted :-/
Structorizer 3.30-14 don't launch by clicking on nsd-File or App
java version "15.0.2" 2021-01-19 Java(TM) SE Runtime Environment (build 15.0.2+7-27) Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
If I open the Package an click on /Applications/Structorizer.app/Contents/Java/Structorizer.jar it works fine. What shall I do? Thanks