Closed arnscott closed 5 years ago
java --version
say?Thanks for the response!
I purged my old installation and tried with a fresh install, but there wasn't any change.
Confirmed it's not working with java 11, but does work with java 8. There have been a lot of changes in the java world recently an transition from 8 to 9+ isn't as smooth as it should be.
I just installed 18.10 (Lubuntu) into a VM (Windows host) to test your use case:
$ sudo apt install openjdk-11-jdk
$ sudo apt install openjdk-8-jdk
$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
*select java 11 manually*
$ java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-2ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-2ubuntu1, mixed mode, sharing)
$ ./batmass
... it shows splash and then closes the window, process stops ...
$ sudo update-alternatives --config java
*select java 8 manually*
$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.18.10.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
$ ./batmass
... it shows splash and then closes the window, process stops again,
even though system java is 8 ...
$ vim ../etc/batmass.conf
*uncomment and edit this line, make sure the path is just to the top level
java directory, not the bin sub-directory*:
jdkhome="/usr/lib/jvm/java-1.8.0-openjdk-amd64/"
$ ./batmass
*runs as it should*
This is not a BatMass problem, it's the whole Netbeans problem as well. Maybe I'll find time in the future to migrate the application to the newer version of the platform, but there's no other solution except changing the jdkhome
variable manually in the config file.
Awesome! Thanks for looking into this. It was just the extra manual configuration with sudo update-alternatives --config java
that I needed to add and it now works.
One thing to note, just changing the jdkhome
variable in the config file isn't enough, the JDK8 needs to be set as the alternative manually, too. Maybe worth adding to the README file in the section "Important Before You Begin" section so you don't get bothered with more issues like mine?
Huh, I didn't know that, it's weird. Thanks for bringing this to attention, I'll add it to the readme.
Actually, I think I spoke too soon there! Seems to be fine when you just change the config file. Must have been something wrong with my environment! I just tested running from the .zip and using the bash script installer and it works. Sorry for the confusion!
EDIT: This may have been because I already updated the links with update-alternatives
The bash script installer doesn't create the batmass script as an executable, though, I needed to chmod +x
it on 2 machines.
Thanks for clearing this up (even if it was mostly just my confusion!), annoying that the transition to java 11 is making this strange.
The binaries not being runnable has been an issue in the past. I don't know in which part of the build/deployment process do the permissions get lost. Currently the NetBeans Platform (the underlying framework this was built on), along with the NetBeans IDE itself, are in the process of being donated from Oracle to Apache. This has thrown off NB by almost two years at this point, but the process is alive and going on. NB 9/10 has been released, compatibility issues are being ironed out. Albeit slowly. It will run on Java 11+ eventually, but I'll need to revisit, update, rebuild.
No worries then, perfect! Thanks again for the help in resolving this.
Trying to run Batmass on Ubuntu 18 gives the following errors:
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/home/aaron/batmass/platform/lib/boot.jar) to field java.net.URL.handler WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory 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
In an effort to try and fix this, I updated the batmass.config to use the path to the directory of an older JDK (JDK 8) as $jdkhome. However, this does nothing and the program just fails silently. Is there some work around for this, or am I missing something completely (I could absolutely be misunderstanding what's going on!)?