java-home

Android Studio error: “Environment variable does not point to a valid JVM installation”

蹲街弑〆低调 提交于 2019-11-28 07:26:50
When trying to run Android Studio on my computer, I get the following error: The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin) does not point to a valid JVM installation I tried to remove the \bin extension on my JAVA_HOME environment variable, but it gives me the following error: No JVM Found. Please install a 64-bit JDK. If you already have a JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables My System: Windows 8.1 Update 1 x64 (64 bit) Java Directory: C:\Program Files (x86)\Java

Difference between JAVA_HOME and JRE_HOME

早过忘川 提交于 2019-11-28 06:47:18
I have a script that starts Tomcat and it looks like this: rem set JRE_HOME=C:\Program Files\Java\jdk1.7.0_03 set JRE_HOME=C:\Program Files\Java\jre7\ set CATALINA_HOME=D:\test\Server\apache-tomcat-6.0.18 "%CATALINA_HOME%\bin\catalina.bat" jpda start I can set JRE_HOME to either my jre folder or my JDK folder and Tomcat will work, but if I remove JRE_HOME and use JAVA_HOME instead, Tomcat will only work if I give it the path to the JDK folder. So what is the difference between JRE and JAVA home, why does Tomcat behave in this manner? Tomcat enables some additional debugging options at start up

Set ANDROID_HOME environment variable in mac

旧街凉风 提交于 2019-11-28 03:48:00
I am new in developing native app using Salesforce SDK. I tried to create android project from command line using forcedroid tool but there is problem in setting environment variable named ANDROID_HOME. But i don't know how to set this variable. I am attaching screenshot to describe my problem correctly. Skizo-ozᴉʞS Open the terminal and type : export ANDROID_HOME=/Applications/ADT/sdk Add this to the PATH environment variable export PATH=$PATH:$ANDROID_HOME/bin If the terminal doesn't locate the added path(s) from the .bash_profile, please run this command source ~/.bash_profile Hope it works

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

余生颓废 提交于 2019-11-28 03:38:55
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 value? When you say you have "clearly set" JAVA_HOME to "C:\Program Files\Java\jdk1.6.0_14" - is that what you see when you run "set" from the command line? I believe Ant will guess at a value for JAVA_HOME if one isn't set at all... is it possible that you've set

What is the correct target for the JAVA_HOME environment variable for a Linux OpenJDK Debian-based distribution?

烈酒焚心 提交于 2019-11-28 03:38:05
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 all executables are placed in /usr/bin . But the jars are placed in /usr/share/java . Since they are not under the same JAVA_HOME folder I'm having trouble with Grails and maybe there will be trouble with other applications that expect the standard Java structure. If I

export JAVA_HOME with spaces in Cygwin

泄露秘密 提交于 2019-11-28 03:07:04
问题 I'm trying to set my JAVA_HOME in Cygwin with this command: export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.7.0_10" But when I do cd $JAVA_HOME , I'd get this error: $ cd $JAVA_HOME -bash: cd: /cygdrive/c/Program: No such file or directory I tried quoting, and escaping the space (ie., \ ), but none worked. Any idea what else would? Thanks, 回答1: I faced this problem too and I saw many posts but nothing really worked. There is a small trick that I did and things started working. My JAVA

How can I change Mac OS's default Java VM returned from /usr/libexec/java_home

邮差的信 提交于 2019-11-28 02:39:00
(Wasn't sure if this should go on SU... migration is certainly an option, but more programmers read questions here, so here goes). I am running Mac OS X 10.8.4, and I have Apple's JDK 1.6.0_51 installed as well as Oracle's JDK 1.7.0_25. I recently installed Oracle's 1.8 preview JDK for some pre-release software that requires it. Now, when I run /usr/libexec/java_home, I get this: $ /usr/libexec/java_home -V Matching Java Virtual Machines (4): 1.8.0, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home 1.7.0_25, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines

Should JAVA_HOME point to JDK or JRE?

无人久伴 提交于 2019-11-27 19:12:33
I pointed the JAVA_HOME to C:\Program Files (x86)\Java\jre7 . It works fine. Afterwards, I unzipped ant and set up the environment variables related to Ant, I got the following error messages after typing "ant -version" I searched this forum. Looks like one solution is to point Java to JDK instead of JRE. I am not exactly sure whether this should be the solution. In other words, in general, which one should JAVA_HOME point to? JDK or JRE? If you're doing any sort of development, or building with Maven or Ant, you need to point to the JDK (Java Development Kit) where utilities such as javac

How to set JAVA_HOME path on Ubuntu? [closed]

佐手、 提交于 2019-11-27 18:27:25
How can I setup JAVA_HOME path without having to set it each time I restart my machine? I've used the following ways when trying to set JAVA_HOME on my Ubuntu machine: 1) From terminal I've executed the following command: export JAVA_HOME=/usr/lib/jvm/jdk1.7.0 2) I've edited the /etc/enviroment file directly to add JAVA_HOME path in it What's really strange is that if I test JAVA_HOME using the echo command after an of the above two ways, I can see it is set correctly, but if I restart, logout/ login again or even after working on the machine for a while the JAVA_HOME is no more set and I have

How to change JAVA.HOME for Eclipse/ANT

ε祈祈猫儿з 提交于 2019-11-27 18:19:22
I am trying to sign a jar file using an ANT script. I know this has to be pointed at the JDK directory for jarsigner.exe to run, but when I echo java.home it returns the JRE directory. This isn't a problem for javac, because I can set the executable path. But, that does not exist for signjar. How do I change the java.home path? When I right-click on MyComputer and go to: Properties > Advanced > Environment Variables The "PATH" variable is correctly pointed to the JDK ( C:\program files\java\jdk\bin ). Update : The file now signs correctly after changing the PATH variable suggested below. In