解决Error: JAVA_HOME is not defined correctly

问题重现:

Error: JAVA_HOME is not defined correctly.
We cannot execute :/usr/lib/jvm/java-7-oracle

问题分析:

  这是因为Java没有指定 JAVA_HOME 路径造成的。

解决办法:

  配置 JAVA_HOME 的环境,终端输入:

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
时间: 2024-12-29 11:30:33

解决Error: JAVA_HOME is not defined correctly的相关文章

JAVA_HOME is not defined correctly

这是个神奇的问题.系统运行着运行着,突然就挂了.各种Java包丢失. 1.检查maven配置 .bash_profile   2.检查运行调取文件  .mavenrc 运行 java -version ,没问题正常. 运行 mvn -version ,哦了 Error: JAVA_HOME is not defined correctly. We cannot execute Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/H

在idea启动tomcat出现The JAVA_HOME environment variable is not defined correctly的解决

情况:某套代码是用jdk 1.6编译,然后电脑的JAVA_HOME系统变量配的是jdk1.7的,在tomcat启动时报错 The JAVA_HOME environment variable is not defined correctly,中文意思是JAVA_HOME定义不正确,去系统变量看指向的是jdk 1.7,当然不正确了,那如何为这个tomcat单独指定一个JAVA_HOME? 方法: Tomcat的jre配置,原来是 改成jdk路径(也就是去掉jre) PS:在myeclipse里to

windows tomcat 启动报错TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly

问题描述: TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly 报错信息如下:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program;提示找不到java_home各jre

Hadoop启动报Error: JAVA_HOME is not set and could not be found解决办法

Hadoop安装完后,启动时报Error: JAVA_HOME is not set and could not be found.解决办法:        修改/etc/hadoop/hadoop-env.sh中设JAVA_HOME.        应当使用绝对路径.        export JAVA_HOME=$JAVA_HOME                  //错误,不能这么改        export JAVA_HOME=/usr/java/jdk1.6.0_45      

Tomcat the java_home environment variable is not defined correctly

今天打开idea运行Tomcat出现了报错,如下: 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 1.检查你的jdk 在cmd(本人使用Windows8)下输入 javac -version 和 java -version

The JAVA_HOME environment variable is not defined correctly的错误

The JAVA_HOME environment variable is not defined correctlyThis environment variable is needed to run this programNB: JAVA_HOME should point to a JDK not a JRE centos 7 安装maven 执行mvn -v  的时候报这个错误  发现是 java_home 的路径不对 which java  找到java 的执行目录 修改下 /etc

2个问题,解决tomcat启动一闪而过和运行tomcat/bin目录下的startup.bat时报错(the CATALINA_HOME environment variable is not defined correctly)

1.除手动使用开始菜单自启动或者程序启动TOMCAT时TOMCAT一闪而过,这时候是发生了错误,这时候我们打开BIN目录下的“startup.bat”文件,编辑,在结尾添加pause命名,这样在CMD下执行startup.bat时就会出错停止,这时候我们就知道是什么错误了. 2.运行tomcat/bin目录下的startup.bat时报错:the CATALINA_HOME environment variable is not defined correctly 碰到这个问题时的第一反应是添加

解决Please ensure that adb is correctly located at 'D:\java\sdk\platform-tools\adb.exe' and can be executed.

遇到问题描述: 运行android程序控制台输出 [2012-07-18 16:18:26 - ] The connection to adb is down, and a severe error has occured.    [2012-07-18 16:18:26 - ] You must restart adb and Eclipse.    [2012-07-18 16:18:26 - ] Please ensure that adb is correctly located at

JRE_HOME environment variable is not defined correctly This environment variableis needed to run this program

已经安装了JDK1.7 和对应JRE 安装了tomcat8 都是解压版 并设置了JAVA_HOME.JRE_HOME 但Tomcat在启动过程中找不到 错误: the JRE_HOME environment variable is not defined correctly This environment variableis needed to run this program 原因: startup.ba脚本调用了catalina.bat 所以需要更改catalina.bat中这部分值为