I was able to install Java and SonarQube, configured the wrapper.conf, and adjusted the port to 9000 to make it work 3 days ago.
Now, running StartSonar.bat gave this
Unable to execute Java command. Access is denied. (0x5) wrapper |
"C:\Program Files\Java\jdk-11.0.11\bin" -Dsonar.wrapped=true ...
C:\Program Files\Java\jdk-11.0.11\bin is what I have in wrapper.conf and it did work.
In a cmd window, C:\windows\system32>java -version
java version "11.0.11" 2021-04-20 LTS Java(TM) SE Runtime Environment
18.9 (build 11.0.11+9-LTS-194) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11+9-LTS-194, mixed mode)
navigate to the path above do java -version reports the same.
However I noticed my system Path has this, verified the one in javapath is the same version.
C:\Program Files\Common Files\Oracle\Java\javapath
C:\Program Files(x86)\Common Files\Oracle\Java\javapath
And java_home is empty: echo %java_home% got %java_home%
I'm totally confused now. What went wrong?
Related
I just got a new computer which didn't have java or android sdk installed, I added both today, but the first time I made a mistake and downloaded java 10 and set that as the JAVA_HOME but since then I downloaded java jdk 1.8 and made that the JAVA_HOME but I'm still getting an error:
I'm doing - ionic cordova run android --device with the error report saying:
ANDROID_HOME=C:\Users\Simon\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172\bin
studio
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_172\bin
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
(node:56548) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1
So it's saying I don't have the correct directory, but I'm pretty sure I do:
and here is my environment variables:
However... when I do java -version it returns:
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Not sure if that's normal...
What should I do? I think all the info should be correct.. Any ideas? Thanks!
Running Cassandra
$ apache-cassandra-3.11.1/bin/cassandra -f -R
Unable to find java executable. Check JAVA_HOME and PATH environment variables.
Java Settings are
java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (Zulu 8.20.0.5-linux64) (build 1.8.0_121-b15)
OpenJDK 64-Bit Server VM (Zulu 8.20.0.5-linux64) (build 25.121-b15, mixed mode)
whereis java
java: /usr/bin/java /usr/lib/java /etc/java /usr/share/java /data/ytbigdata/anaconda3/bin/java
which java
~/anaconda3/bin/java
~/.bash_profile setting
export JAVA_HOME=/data/ytbigdata/anaconda3/bin/java
export PATH=$JAVA_HOME/bin:$PATH
The Cassandra documentation says "On the Cassandra nodes where the agents are installed, create the file /etc/default/datastax-agent and set the environment variables for JAVA_HOME and any other custom environment variables that the agent might need." https://docs.datastax.com/en/opscenter/6.1/opsc/install/opscCustomVariables_t.html
I am installing SUbversion Edge under CentOS 7.
The first step is
Set the JAVA_HOME environment variable, and point it to your Java 6 JRE
home. For example:
export JAVA_HOME=/usr/java/default
Test the variable:
$ $JAVA_HOME/bin/java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
The problem is that /usr/java forlder not exists.
But /usr/bin/java is existing.
Have I use this folder instead?
So what do I have to do?
You should use correct Java home path in your system. If you installed Java in CentOS via YUM, then correct path should be
export JAVA_HOME=/usr/lib/jvm/jre
You should not use /usr/bin/java as JAVA_HOME, because it is not Java home path, it is symlink to java executable.
I have a appilcation that needs Java 32bit on my Debian 64bit server. Is running fine now with this in the .profile or in the SH file.
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_25/
export LD_LIBRARY_PATH=.:$JAVA_HOME/jre/lib/i386/server:$JAVA_HOME/jre/lib/i386/client:/usr/local/lib
However, when I to start it over screen it simply don't load the Java path and the LD lib path.
Anyone has a idea how to solve this problem?
Please, give me the results the next commands in your console
java -version
and
echo $JAVA_HOME
echo $LD_LIBRARY_PATH
Do you have this in you environments variables?
env | grep JAVA
In my case I have this
user:$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
user:$ echo $JAVA_HOME
/opt/jdk/jdk1.8.0_25
user:$ env | grep JAVA
JAVA_HOME=/opt/jdk/jdk1.8.0_25
I have installed ant-1.9.2 and jdk1.7.0 in windows 7 and tried the following ways to set the path
C:\>set ANT_HOME=C:\Users\sahaya_s\Downloads\apache-ant-1.9.2;
C:\>set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45;
C:\>set path=%ANT_HOME%\bin;%JAVA_HOME%\bin;
C:\>echo %path%
C:\Users\anto\Downloads\apache-ant-1.9.2;\bin;C:\Program Files\Java\jdk1.7.0_45;\bin;
here the path has divided into two. what is went wrong?
and tried by giving complete path
C:\>set path=C:\Users\sahaya_s\Downloads\apache-ant-1.9.2\bin;C:\Program Files\Java\jdk1.7.0_45\bin;
C:\>echo %path%
C:\Users\sahaya_s\Downloads\apache-ant-1.9.2\bin;C:\Program Files\Java\jdk1.7.0_45\bin;
C:\>java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)
C:\>ant -version
ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
Still am getting problem with ANT_HOME. Could anyone help me with this?
You have unneeded ; causing your path to split. Use:
C:\>set ANT_HOME=C:\Users\sahaya_s\Downloads\apache-ant-1.9.2