java-home

JAVA_HOME points to the wrong place

心不动则不痛 提交于 2019-12-04 04:51:17
问题 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.exe" and "C:\Program Files\Java\bin\javac.exe" I don't understand why it is looking there, doing echo %JAVA_HOME% gives me: C:\Program Files\Java\jdk1.6.0_14 Which

${env.JAVA_HOME} not found - Ant

对着背影说爱祢 提交于 2019-12-03 23:38:52
In my build.xml file, I have these lines: <property environment="env"/> <echo message="JAVA_HOME is set to = ${env.JAVA_HOME}" /> On some machine, this would print "JAVA_HOME is set to = /usr/jdk1.6" But on some others, it would print this "JAVA_HOME is set to = ${env.JAVA_HOME}" Does anyone know what might cause this? Thanks The message tells you that Ant was not able to resolve the property env.JAVA_HOME ; this means that the environment variable JAVA_HOME was not set in that machine. You can usually find on your system (if you're Unix) where the actual ant command lives by doing either

Having JAVA_HOME inconsistency issue with maven

喜夏-厌秋 提交于 2019-12-03 17:28:33
问题 I am on the verge of releasing a project but it seem JAVA_HOME is been inconsistent. Maybe it's been overridden somewhere else? I am using ubuntu 14.04 and I have openjdk-7, java-7-oracle, java-8-oracle. Default java was set using update-java-alternatives 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) mvn -version gives the following output Apache Maven 3.2.1

JAVA_HOME is not defined correctly on Ubuntu?

*爱你&永不变心* 提交于 2019-12-03 11:46:01
I am trying to install some software (Shibboleth) in Ubuntu 14.04. I already have Java 7 OpenJDK installed in /usr/lib/jvm/ , and I have these lines in /usr/environment JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64" export JAVA_HOME If I type echo $JAVA_HOME I correctly get /usr/lib/jvm/java-7-openjdk-amd64 . However, when I try to install Shibboleth I always get Error: JAVA_HOME is not defined correctly. Cannot execute java . Interestingly, if I type java command it works (it refers to /usr/lib/java which is a link to the right one). However, when I try to run bash bin/install.sh of Shibboleth

How to use gradle properties in build.gradle

限于喜欢 提交于 2019-12-03 11:10:48
问题 When I run this task: task tmpTask << { project.properties.each {println " $it"} } I see: org.gradle.java.home=/usr/lib/jvm/java-6-oracle But how to use this variable? I've tried both: task tmpTask << { println org.gradle.java.home println project.properties.org.gradle.java.home } But none of this works. First print gives error: Could not find property 'org' on task ':tmpTask'. while second fails with: Cannot get property 'gradle' on null object 回答1: project.properties is a Map<String, ?> So

JAVA_HOME environment variable and Java JDK fun

一个人想着一个人 提交于 2019-12-03 10:59:32
I wanted to get Java running at 1.6xxx - I changed the JAVA_HOME variable and pointed it to the directory C:\Program Files\Java\jdk1.6.0._16. I restart the PC - and I think I can check which version of Java my machine is pointing at - but it still points to the older version of Java e.g v1.5.0_16 Can you help me rejog my memory on correct setup for Java JDK? Jigar Joshi You need to reset your path variable to point to 1.6 something like Additionally, make sure the variable JAVA_HOME is also set with the above location. JAVA_HOME is used by other applications, such as Tomcat. Windows just

How do I change the JAVA_HOME for ant?

喜欢而已 提交于 2019-12-03 09:26:33
I'm doing java work on a class server where I don't have root. Whenever I try to compile using ant, it points to the wrong directory ( /usr/tomcat instead of /usr/tomcat/jre ). One of the things we were told to do when setting up our user accounts was to add export JAVA_HOME=/usr/tomcat/jre to the .bashrc file. I don't know if that was supposed to take care of the problem but it doesn't seem to. So, how can I change the JAVA_HOME property for ant but only for when I run ant? EDIT: echo $JAVA_HOME points to /usr/tomcat/jre echo $JAVA_HOME\bin points to /usr/tomcat/jrebin The problem is when I

Having JAVA_HOME inconsistency issue with maven

依然范特西╮ 提交于 2019-12-03 07:08:30
I am on the verge of releasing a project but it seem JAVA_HOME is been inconsistent. Maybe it's been overridden somewhere else? I am using ubuntu 14.04 and I have openjdk-7, java-7-oracle, java-8-oracle. Default java was set using update-java-alternatives 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) mvn -version gives the following output Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T17:37:52+00:00) Maven home: /usr/share/maven3 Java version: 1.8.0_25, vendor

weird problem with JAVA_HOME and maven dependencies

余生颓废 提交于 2019-12-03 05:27:39
I have JAVA_HOME variable set to C:\Program Files\Java\jre6\ when I run maven package on the project it tells me that it can't resolve dependency [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (default) on project roo: Execution default of goal o rg.codehaus.mojo:aspectj-maven-plugin:1.0:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.0 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.4.2 at specified path C:\Program Files\Java\jre6/../lib/tools.jar -> [Help 1] so it assumes that JAVA_HOME is

How to set JAVA_HOME in Mac permanently?

自闭症网瘾萝莉.ら 提交于 2019-12-03 02:36:52
问题 I am trying to set JAVA_HOME by entering export JAVA_HOME=/Library/Java/Home at terminal. It sets the JAVA_HOME for current session. How can I set it permanently? 回答1: I know it has been a while for this question, but I just wanted to share the following piece of information that I came across today. You can use /usr/libexec/java_home -v <version you want> to get the path you need for JAVA_HOME . For instance, to get the path to the 1.7 JDK you can run /usr/libexec/java_home -v 1.7 and it