Skip to content
Advertisement

Tag: java

How to change java version within a bash script?

I have one piece of a script that needs a different java version to the rest of the script, up till now I’ve always manually changed versions with sudo update-alternatives –config java and then just select the one I need. Is there a way to do that within a bash script? I’ve tried export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/bin/java which matches the path listed

Unable to get PATH to be set for all users

Trying to get OpenJDK 17 installed for Pufferpanel. User pi can do java -version fine however Pufferpanel gets bash: java: command not found My /etc/profile and /etc/profile.d/java.sh have these lines: In addition JAVA_HOME=”/usr/lib/jvm/jdk-17.0.1+12″ is set in /etc/environment Full permissions have been given for java.sh and the JAVA_HOME folder with chmod 777. The user pufferpanel now can run the script however

ProcessHandle returns ambiguous results

I’ve two Java 11 methods that check whether a process for a given PID is running: When checking multiple PIDs on Linux clients, I’m getting sometimes different results for certain PIDs, where the first implementation always returns true and the second one always false. Checking some “false positives” with shell command ps -ef | grep <pid> shows that first implementation

Unable to load library (libFile.so) on jboss server on redhat linux

I am getting the unsatisfied link error when I try to run the web-app. I have created the function which loads the native library stored at “/home/libraryFiles”, using JNA. I have stored all of my libXXXX.so files at “/home/libraryFiles”. I have exporting my war file from eclipse in windows and deploying it on the jboss server on redhat linux. This

Gradle JVM version doesn’t match the used JDK version

In the screenshot below, you can see what I am using the 11.0.11 JDK version but my Gradle uses the 1.8.0_282 JVM version. And it’s not a problem because for set the Java version in a project using Gradle Toolchain. I’m not sure but it looks strange. Is it worth worrying about and can I specify a specific JVM version

Selenium driver throws error on Ubuntu 18.04

I am porting my code over from Windows to Ubuntu, I went ahead and installed java, and all the drivers, and built my jar file. While executing it, I am getting this error. I downloaded the Linux 64bit Chrome Driver for this. The error seems to be starting from my jars main class line 17, which is this line. Here

Advertisement