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

Stop Java from killing Bash script that started it

I’ve spent the past couple days working on this, and at this point I am super stuck. I have a Java program that must be run not as a service. This program must also be capable of updating itself when a new file is given for updating. As a result, I have a script that is started with Linux that

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

Advertisement