相关疑难解决方法(0)

从命令行列出所有环境变量?

我想知道是否可以从Windows的命令提示符列出所有环境变量.

相当于PowerShell gci env:(或ls env:dir env:)的东西.

windows command-line prompt environment-variables

885
推荐指数
9
解决办法
127万
查看次数

如何在Windows 7上设置java_home?

我在控制面板的"系统"中找到了环境变量,并创建了两个新变量,一个用于用户变量,另一个用于系统变量.两者都被命名为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 java-home system-variable windows-7

415
推荐指数
12
解决办法
153万
查看次数