So guys I have a huuuuuge problem.
所以,我有一个huuuuuge问题。
I downloaded java jdk 1.8.0_45.
我下载了java jdk 1.8.0_45。
It was working fine , but because I was making a Runescape Private Server I had to put in my classpath and path in my environmental variables. I did that and when I tried to open java then it said :
它工作正常,但因为我正在制作一个Runescape私有服务器,我不得不在我的环境变量中放入我的类路径和路径。我这样做,当我试图打开java然后它说:
java is not recognized as an internal or external command
java不被识别为内部或外部命令
so I figured the classpath and path were wrong. But they weren't , I put them in like this.
所以我认为类路径和路径是错误的。但他们不是,我把它们放进去了。
C:\Program Files\Java\jdk1.8.0_45\bin
I checked the folders and that is exactly the correct classpath. I tried deleting the classpath and path after to restore it back to normal but that didn't work , it kept saying that java is not recognized. I restarted my pc and even did a system restore but nothing worked.
我检查了文件夹,这正是正确的类路径。我尝试删除类路径和路径后恢复正常,但这不起作用,它一直说java不被识别。我重新启动了我的电脑,甚至进行了系统还原,但没有任何效果。
NEED HELP.
2 个解决方案
#1
3
set JAVA_HOME=path\to\java-dir upto jdk
将JAVA_HOME = path \设置为\ java-dir up to jdk
set PATH=%PATH%;%JAVA_HOME%\bin
See https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
#2
0
go to system environment and set you path and class path properly, and it should work. If still have issues, restart the application.
转到系统环境并正确设置路径和类路径,它应该工作。如果仍有问题,请重新启动应用程序。
you can also open command prompt after you have set the path, and type in javac to see if the path is set properly or not.
您也可以在设置路径后打开命令提示符,并键入javac以查看路径是否设置正确。
#1
3
set JAVA_HOME=path\to\java-dir upto jdk
将JAVA_HOME = path \设置为\ java-dir up to jdk
set PATH=%PATH%;%JAVA_HOME%\bin
See https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
#2
0
go to system environment and set you path and class path properly, and it should work. If still have issues, restart the application.
转到系统环境并正确设置路径和类路径,它应该工作。如果仍有问题,请重新启动应用程序。
you can also open command prompt after you have set the path, and type in javac to see if the path is set properly or not.
您也可以在设置路径后打开命令提示符,并键入javac以查看路径是否设置正确。