java-home

Discover from a batch file where is Java installed?

I want to set the JAVA_HOME variable from a batch script ...

What is the correct target for the JAVA_HOME envrionment variable for a Linux OpenJDK debian-based distribution?

Folks In Windows, JAVA_HOME must point to the JDK installation folder (so that JAVA_HOME/bin contains all executables and JAVA_HOME/libs contains all default jar libraries). If I download Sun's JDK bundle and installs it in Linux, it is the same procedure. However, I need to use Kubuntu's default OpenJDK package. The problem is that a...

Ant can't find Javac. No matter what I do it always claims JAVA_HOME is "C:\Program Files\Java\jre6"

...and that's wrong. Here's the error I get: BUILD FAILED C:_TraderPlatform\Clients\Open\Open\Java\Applets\PPDataTransporter\nbproject\build-impl.xml:338: The following error occurred while executing this line: C:_TraderPlatform\Clients\Open\Open\Java\Applets\PPDataTransporter\nbproject\build-impl.xml:158: Unable to find a javac compil...

Windows JAVA HOME problems

I'm trying to experiment with OracleHelp for Java on my Windows Vista server. I downloaded Oracle help, and I'm following their installation instructions which states: Unzip the OHJ installation .zip file into a directory of your choice Ensure that you have the JAVA_HOME environment variable set to the location of your compatible Java ...

Mismatching JVM versions in deploying web-app between Eclipse and Tomcat

Hi, I have a web-app, built and compiled in Eclipse, which I want to deploy to my Tomcat 6 (I want to do it manually) and I get a UnsupportedClassVersionError exception which means the JVM tomcat is running is older than the one my eclipse is running. After some checking I see that in the tomcat manager window it says: JVM Version-1.5.0_...

Why does ANT tell me that JAVA_HOME is wrong when it is not?

I get the error: C:\dev\ws\springapp\build.xml:81: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\Program Files\Java\jre6" But I have clearly set my JAVA_HOME to be C:\Program Files\Java\jdk1.6.0_14 Where is ANT getting this va...

Where to set JDK to be used for SunOne server?

Where to set the JDK to be used by the SunOne server on Solaris? Is it all configured via an environment variable like JDK_HOME or JAVA_HOME, or is there a config file for the SunOne server somewhere where the path to the JDK is being set? ...

JAVA_HOME points to the wrong place

I seem to have an incorrectly specified JAVA_HOME variable. I can get around it for many things but now I am seem to be stuck. I am trying to use the Google App Engine and upload an application. When I do so I get the error that the error: cannot find javac executable based on java.home, tried "C:\Program Files\Java\jre6\bin\javac.e...

Setting up java classpath and java_home correctly in Ubuntu

I am getting the error Exception in thread "main" java.lang.NoClassDefFoundError: When I try and run a compiled class on Ubuntu. I am using a very simple Helloworld example, and the millions of responses which already exist on the internet suggest that my CLASSPATH and JAVA_HOME variables have been incorrectly set. However, I hav...

linux red hat enterprise linux

I installed jdk1.6.0_16 on enterprise linux 4 and I also set teh JAVA_HOME in my ~/.bash_profile echo $JAVA_HOME correctly shows the new path of the java file export JAVA_HOME=/jdk16/jdk1.6.0_16/bin/java The bin directory is also int he path However when I do java -version I still see java version "1.4.2" How do I see newly install...

Installing ant; clearly misunderstanding JAVA_HOME

Hey all, I am installing ant on a Windows XP machine, and am following the instructions at Apache's manual site. It said to set JAVA_HOME, so I checked, saw there was no environment variable named JAVA_HOME, made one, and set it to "C:\Program Files\Java\jdk1.6.0_19" When I try to run ant debug, however, it tells me that JAVA_HOME is c...

How to set java_home on Windows 7?

I went to the Environment Variables in 'System' in the control panel and made 2 new variables. one for user variables and one for system variables, both named JAVA_HOME and both pointing to C:\Sun\SDK\jdk\bin but for some reason, I still get the below error when running a java command... BUILD FAILED C:\Users\Derek\Desktop\eclip...

Set environment variable in Ubuntu

In Ubuntu, I'd like to switch my JAVA_HOME environment variable back and forth between Java 5 and 6. I open a terminal and type in the following to set the JAVA_HOME environment variable: export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun And in that same terminal window, I type the following to check that the environment variable has been...

JRuby wrong element type class java.lang.String(array contains char) related to JAVA_HOME

I am on Ubuntu x64 bit running: java version "1.6.0_18" OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1) OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) and jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2010-02-11 6586) (OpenJDK 64-Bit Server VM 1.6.0_18) [amd64-java] I have this code running on my Windows 7 computer...

Tomcat complaining about botched JAVA_HOME path

I have installed the JDK, to C:\jdk, the JAVA_HOME variable is set to C:\jdk\jdk, and when I echo %JAVA_HOME% I get C:\jdk\jdk. Yet Tomcat complains. The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE I seem to be having erro...

Where can I configure Ant 1.8's environment variables on an Ubuntu box?

When trying to build with Ant, I'm getting an error that Ant can't find a compiler, and that JAVA_HOME is set to /usr/lib/jvm/java-6-open-jdk/jre. An echo check reveals that JAVA_HOME is set to /usr/local/lib/jdk1.6.0_22 (where Ant OUGHT to think it is, btw). So the environment variables are generally right, but Ant apparently has its ...