使用java -version后确认jdk安装无误
以及eclipse是可以编译运行程序的
但是使用javac命令却失败
另外这是C盘下java文件里的文件,明显没有Jdk
重新梳理一下问题:1、电脑里现在没有JDK文件夹只有JRE文件夹。2、Eclipse可以编译运行程序。3、由于没有jdk文件夹,无法设置环境变量,javac命令无效。
所以谁能告诉我我电脑里发生了什么?别叫我去百度一下重新下载安装jdk 谢谢。
认证0级讲师
Make sure you installed jdk and not jre?
The last step you opened is obviously jre.
Find the directory of your installed jdk and set the environment variables JAVA_HOME and PATH.
Put the directory where javac is located in the system environment variable path, and then reopen a cmd and use it again. Eclipse can use javac because it has a function of finding the directory where the system's jdk is located.
Make sure you installed jdk and not jre?
The last step you opened is obviously jre.
Find the directory of your installed jdk and set the environment variables JAVA_HOME and PATH.
Put the directory where javac is located in the system environment variable path, and then reopen a cmd and use it again. Eclipse can use javac because it has a function of finding the directory where the system's jdk is located.