`

the java_home environment variable is not defined correctly

    博客分类:
  • java
阅读更多
在启动tomcat中的startup.bat时,总是报以下错误
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

环境变量的路径没有问题,把jdk重装了,还是一样
设置环境变量:
右击我的电脑-->属性-->高级-->环境变量-->找到JAVA_HOME变量,把路径指向jdk的安装目录,如:
变量名:JAVA_HOME
变量值:C:\Program Files\Java\jdk1.6.0_02;

变量名:Path
变量值:C:\Program Files\Java\jdk1.6.0_02\bin;

变量名:classpath
变量值:.; 

修改完变量路径之后,若还报之前那个错误,那么再试试下面这个方法:
进入tomcat的bin目录下,打开catalina.bat,setclasspath.bat和startup.bat这三个文件,把这三个文件中设置JAVA_HOME路径的地方都重新改成使用的JDK的安装目录,修改完这里之后,我的问题就解决了。




紫色头发:http://zisetoufa.iteye.com/
分享到:
评论

相关推荐

    tomcat使用笔记

    tomcat 的使用笔记 Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,属于轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试JSP 程序的首选。...实际上Tomcat是Apache ...

    JAVA JDK和Tomcat环境变量配置

    当你写下improt java.util.*时,编译器面对import关键字时,知道你要引入java.util这个package中的类;但是编译器如何知道你把这个 package放在哪里了呢?所以你首先得告诉编译器这个package的所在位置;如何告诉它...

    双击startup.bat,启动不了tomcat

    双击startup.bat,启动不了tomcat,JAVA_HOME environment variable is not defined correctly 提供解决办法。很实用。相信能解决你的问题。

    Turbo C++ 3.0[DISK]

    installation will not work correctly if you do not use the same media type for the backup disks. To start the installation, change your current drive to the one that has the install program on ...

    Turbo C++ 3.00[DISK]

    installation will not work correctly if you do not use the same media type for the backup disks. To start the installation, change your current drive to the one that has the install program on ...

    8-07-14_MegaCLI for linux_windows

    LSIP200232921 (DFCT) MegaCLI displays version for PD in unclear format and the data is not aligned correctly LSIP200232954 (DFCT) Need to Support all the MFC default values in the command AdpSettings...

    微软内部资料-SQL性能优化3

    If the class is not confident in their understanding, review appendix A04_Locking and its accompanying PowerPoint® file. Transactions in SQL Server provide the ACID properties: Atomicity A ...

    Bloodshed Dev-C++

    * When creating a DLL, the created static lib respects now the project-defined output directory Version 4.9.8.0 * Changed position of compiler/linker parameters in Project Options. * Improved help ...

    python3.6.5参考手册 chm

    PYTHONMALLOC environment variable DTrace and SystemTap probing support Other Language Changes New Modules secrets Improved Modules array ast asyncio binascii cmath collections concurrent....

    Software Testing and Continuous Quality Improvement

    21 Level 3 — Defined. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Level 4 — Managed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22...

Global site tag (gtag.js) - Google Analytics