I am trying to get jmxtrans to work yet I get the below on ubuntu 12.04 and using openjdk 7.
/usr/share/jmxtrans# java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
/usr/share/jmxtrans# ./jmxtrans.sh start /var/lib/jmxtrans/kafka.json
Cannot execute /usr/lib/jvm/default-java/bin/jps -l!
What does the above mean?
It seems that the jps file can't be found in the /usr/lib/jvm/default-java/bin directory. It is available in the '-devel' packages if you want to install those (yum install java-1.7.0-openjdk-devel, apt-get install openjdk-7-jre-devel). It could also be that your JAVA_HOME is not pointing to the correct place if you have multiple java versions installed.
You should not need it however, regular ps works fine. You can add a variable to your configuration that says export USE_JPS=false. The configuration can be found in /etc/default/jmxtrans.
Check out these issues for more information:
https://github.com/jmxtrans/jmxtrans/issues/89
https://github.com/jmxtrans/jmxtrans/pull/109
Related
I had openjdk 11.0.2 installed. I upgraded the java version by running
sudo apt update
sudo apt install openjdk-11-jdk
If I run sudo apt install openjdk-11-jdk again, it shows a message saying that "openjdk-11-jdk is already the newest version (11.0.11+9-0ubuntu2~20.04)"
However, when I do java -version it displays the older version 11.0.2 not 11.0.11
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
The JAVA_HOME still shows "/opt/java/jdk-11.0.2", so I guess this might be the problem that the java -version is still showing the older version?
When I do whereis java it shows
java: /usr/bin/java /usr/share/java /opt/java/jdk-11.0.2/bin/java /mnt/c/Program Files/Common Files/Oracle/Java/javapath_target_917640/java.exe /usr/share/man/man1/java.1.gz
Not sure where the newest version was installed so that I can make the JAVA_HOME point to that one
openjdk-11-jdk-headless_11.0.11+9-0ubuntu2~20.04_amd64.deb and openjdk-11-jre-headless_11.0.11+9-0ubuntu2~20.04_amd64.deb package shows (by extracting with 7-zip) that OpenJDK 11 will be installed at /usr/lib/jvm/java-11-openjdk-amd64.
This will give you enough information about appending environment variables such as PATH and JAVA_PATH.
And, there may be a path called default-jvm or so, you may use that path accordingly.
I have downloaded glassfish server 3.1 and i have installed java 1.7, but while installing glassfish server I have the error below:
My java version is:
C:\Users\viksa>java -version
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b22)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
Go to your glassfish download location:
C:\Users\J Balakrishna\Downloads
Take your Java installed location:
C:\Program Files\Java\jdk1.8.0_112
Run:
C:\Users\J Balakrishna\Downloads>glassfish-3.1.2-windows.exe -j "C:\Program Files\Java\jdk1.8.0_112"
Please check "How do I specify the jdk for a glassfish domain?".I think You can get similar ways just like adding JDK to asenv.bat.
please check the environment variable settings, it seems its referring to an old instance of JRE which is also present in the machine.
Check the PATH variable.
check your JAVA_HOME environment variable.
Finally, follow the instructions on the last line of that popup:
ogs-3.1.2.2-windows.exe -j \path\to\where\your\java\is
Download and install java runtime enviornment 1.6 ... its the requirement for JRE and not JDK
I have problem to use maven from ubuntu server 13.10 64bit.
I am getting following error (even when I type mvn -version):
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/lib/jvm/jdk//bin/java
But when I type java -version I get:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
I have no idea where can be the problem, especially because I have used maven without any problems before I've installed hadoop 2.2.
Thank you in advance for any help.
It appears that the Hadoop instructions and/or start up script modifies the JAVA_HOME environment variable in the shell.
Unless this change is made permanent by changing one of the many configuration files - like $HOME/.profile - it only influences the shell in which you have observed the problem.
Hi Stackoverflow friends
I've recently configured Jenkins Server into Apache Tomcat 7.0.42
The procedure that I make was deploy the jenkins.war file into tomcat servlet container.
Here I make reference some important considerations:
My machine is a CentOS 6.4 Server:
[root#safe2school srv]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root#safe2school srv]#
My JDK version is JDK 1.7 UPDATE 45, this is the official Oracle JDK
[root#safe2school srv]# java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
[root#safe2school srv]#
I've tried with the installation of dejavu-sans-fonts (yum install dejavu-sans-fonts
) and set the envoronment variable export JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
in the file /etc/bashrc but all these options doesn't work.
The output for this error is in the following image (http://i.stack.imgur.com/DNM8m.png):
There is some alternative that you can support me in these task?
I appreciate your help. Thanks :)
I just ran into these messages switching from OpenJDK 8 to OpenJDK 11. None of these steps helped. But make sure "fontconfig" is installed, which solved my issue!
Try locating the file:
/etc/sysconfig/jenkins
and inside it, the line: JENKINS_JAVA_OPTIONS=...
Make sure it has the headless option, e.g. :
JENKINS_JAVA_OPTIONS="-Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"
Otherwise, please indicate more specifically how you start your Jenkins instance.
Trying to install Sencha Command 3.1.1 on my iMac (10.8.3). The installer is saying:
The installer could not find a valid Java(tm) on this machine.
Supported versions: Vendor : Any min. 1.6.0 max. any
Following another Stack Overflow thread, I tried linking /usr/bin/java to /Library/Internet Plugins/JavaAppletPlugin.plugin/Contents/Home/bin/java. Now, I get this on the command line:
~ 🍔 java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
So that looks good, but the installer still complains that it cannot find Java. Why can't it?
What eventually fixed this for me, after consulting with Sencha support, was installing the full JDK rather than just the JRE. I don't know exactly why this fixed it, or what the root cause was, but now Command installed successfully and is working fine.
I had JDK installed, but one thing worked for me was exporting $java_home/bin:
export PATH=$JAVA_HOME/bin:$PATH