java-home

How to change JAVA.HOME for Eclipse/ANT

試著忘記壹切 提交于 2019-12-17 15:29:32
问题 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

How to change Java version used by TOMCAT?

心不动则不痛 提交于 2019-12-17 07:26:16
问题 I have Java 1.6 and Tomcat 5.5 installed on my system. But Tomcat 5.5 accesses Java 1.5 and hence as the outcome I get the error Bad version number in .class file while executing java code with JSP. How can I change the Tomcat version to Java 1.6? UPDATE I tried changing the JVM that the tomcat5w.exe is pointing to the version 1.6 and now I am out of the Bad version in .class file error. But now, I get the following error. exception org.apache.jasper.JasperException org.apache.jasper.servlet

Where is the Java SDK folder in my computer? Ubuntu 12.04

只愿长相守 提交于 2019-12-17 05:34:22
问题 I know it's installed because when I type: $java -version I get: OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) And when I type: $locate jdk I get: /home/arturo/Documents/2012a/sys/java/jre/glnxa64/jre/lib/servicetag/jdk_header.png /usr/share/app-install/desktop/openjdk-6-jre:openjdk-6-java.desktop /usr/share/app-install/desktop/openjdk-7-jre:openjdk-7-java.desktop /usr/share/app-install/icons/openjdk-6.png

Make $JAVA_HOME easily changable in Ubuntu [closed]

痴心易碎 提交于 2019-12-17 04:09:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . 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

“which java” in CentOS prints wrong java path

点点圈 提交于 2019-12-12 10:43:47
问题 I am not sure why " which java " and " whereis java " paths are not correct. I tried to edit ~/.bash_profile and /etc/environment but did not help. The desired path is what is seen in " echo $JAVA_HOME " below but the same is not reflected in " which java " Below is what I get in CentOS 6.4: which java /usr/bin/java 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) whereis java java: /usr

JAVA_HOME environment variable and Java JDK fun

喜你入骨 提交于 2019-12-12 07:47:41
问题 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? 回答1: 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

How do I change the JAVA_HOME for ant?

a 夏天 提交于 2019-12-12 07:39:29
问题 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

Setting JAVA_HOME for portable eclipse

时光总嘲笑我的痴心妄想 提交于 2019-12-11 08:36:49
问题 I am running Windows XP. I have a portable eclipse installed on a usb and when I tried installing the Android SDK it said "Java SE Development kit (JDK) not found" and told me to set the JAVA_HOME environment variable. The Java SDK is located in K:\EclipsePortable\JDK\bin K:\EclipsePortable\JRE\bin K:\EclipsePortable\JDK\jre\bin K:\EclipsePortable\App\Eclipse\JRE\bin I am using K:\EclipsePortable\JDK\ so I assume I set it to one of those two paths. How do i do this? Is this in eclipse or a

Reactnative $JAVA_HOME path error

依然范特西╮ 提交于 2019-12-11 08:26:31
问题 zzz@zzz-PC ~/AndroidStudioProjects/Example $ react-native run-android Scanning 555 folders for symlinks in /home/zzz/AndroidStudioProjects/Example/node_modules (16ms) Starting JS server... Building and installing the app on the device (cd android && ./gradlew installDebug)... ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-9-oracle Please set the JAVA_HOME variable in your environment to match the location of your Java installation. Could not install the app on the device,

How to correct JAVA_HOME which should point to a JDK not a JRE folder? [duplicate]

我们两清 提交于 2019-12-10 18:33:25
问题 This question already has answers here : JAVA_HOME should point to a JDK not a JRE (19 answers) Closed last year . I'm trying to run Catalina on Ubuntu Linux using the debug command. I'm getting the following error: JAVA_HOME should point to a JDK in order to run in debug mode. /bin/sh died with exit status 1 However, I have tried setting JAVA_HOME in the .bashrc to all of the following: export JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-i386/" export JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk