简体   繁体   English

如何在 windows 命令提示符下运行 java 程序

[英]How to run java programs in windows command prompt

I am not able to run java programmes even after setting the paths in "Environment variables" in the "Advanced System Settings" in windows 10. Plz help!!!我无法运行 java 程序,即使在 windows 10 的“高级系统设置”中的“环境变量”中设置路径后。请帮助! enter image description here在此处输入图像描述

You have to go into the directory where the class is saved, before you run the command.在运行命令之前,您必须将 go 放入保存 class 的目录中。 For example you hava the class saved in "Users/Bony/java/project/..." you have to type in the command promp "cd Users/Bony/java/project/..." (cd = change directory + path) and then try to run the java class.例如,您拥有保存在“Users/Bony/java/project/...”中的 class,您必须输入命令提示符“cd Users/Bony/java/project/...”(cd = 更改目录 + 路径) 然后尝试运行 java class。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM