我在控制面板的"系统"中找到了环境变量,并创建了两个新变量,一个用于用户变量,另一个用于系统变量.两者都被命名为JAVA_HOME,两者都指向
C:\太阳\ SDK\JDK\BIN
但由于某种原因,我在运行Java命令时仍会遇到以下错误...
BUILD FAILED
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:161: The following error occurred while executing this line:
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:141: The following error occurred while executing this line:
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:137: Please set java.home to a JDK installation
Total time: 1 second
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish>lib\ant\bin\ant -f setup.xml
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
Buildfile: setup.xml
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
我想检查环境中是否存在JAVA_HOME所以我编写了下面的脚本 a.bat
if "%JAVA_HOME%" == ""
(
echo Enter path to JAVA_HOME:
set /p javahome=
)
if not "%JAVA_HOME%" == ""
(
echo %JAVA_HOME%
)
Run Code Online (Sandbox Code Playgroud)
它显示"命令的语法不正确"我哪里出错了?
我想在我的PHP应用程序中使用弹性搜索.
运行 service install命令后,我得到了错误.
C:\elasticsearch-0.90.10\bin>service install
JAVA_HOME points to an invalid Java installation (no java.exe found in "C:\Progr
am Files (x86)\Java\jdk1.7.0_25\bin"). Existing...
Run Code Online (Sandbox Code Playgroud)