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.
Related
I am trying to install wso2ei-6.4.0, but it will not run due to the following error messages. I am running a RPi with Debian
Error: JAVA_HOME is not defined correctly.
CARBON cannot execute java
I have executed Java -verison and have the following return
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)
I know the java directory, using Java -which
/usr/bin/java
How do I run Java from any of the directory to execute the installation of wso2ei-6.4.0?
After some time and reading, I managed to add the following into ~/.bashrc:
export JAVA_HOME="/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt"
export PATH=$PATH:$JAVA_HOME/bin
Note the arm32 directory for the jdk
Try this (as root user):
export JAVA_HOME=/usr/bin/java
Does this solve your issue?
I setup Java 6 to be used by all other application. Normal setup with JAVA_HOME, JRE_HOME, etc. This is working fine.
I have another application that needs Java 7. I downloaded Java 7.exe and extraced tools.zip from it to a folder. Now I am trying to check the version going to the bin folder. When I type in java -version, I get the following error.
error occurred during initialization of vm
java/lang/noclassdeffounderror java/lang/object
where as java -fullversion shows Java 7. It looks like even though I am in the bin folder where Java.exe exists, it still getting the one from PATH?!?!
How do I use the java.exe from a folder ignoring the one from PATH?
You need much more than java to run java. You need all the rt.jar and lib which come with Java. It sounds like you are missing some part of the JRE or it can't find your JRE.
I suggest you re-install the version you need and run it using the full path name like
c:\>"c:\Program Files\Java\jdk1.7.0_60\bin\java" -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
c:\>"c:\Program Files\Java\jdk1.8.0_45\bin\java" -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
By using the full path name you can use any specific version from any directory.
I am working on using Floodlight Controller for SDN. I used
ant eclipse
to setup the Eclipse files and then changed the Build Configuration as desired in the installation instructions. I am getting the following compilation error in the package net.floodlightcontroller.util.MatchUtils:
The method setMasked(MatchField<F>, Masked<F>) in the type Match.Builder is not applicable for the arguments (MatchField, Masked)
on lines 141 and 148.
Can somebody help me with the issue?
Operating System: Mac OS X 10.10
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)
As suggested in the comments above, it works with Java SE 1.7. There is also a Github Issue.
Can't seem to find an answer to this.
If I type java -version I get
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
I'm trying to run PMD to analyse an iOS project. When I run the command in Terminal however, I get:
Could not create the Java virtual machine.
Anyone have any idea what is causing this?
This could be due to installation issue. Check whether you have installed correct JRE for your platform(bit pattern etc.). If its fine try changing memory settings.
This link will help you to set memory settings in Java
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