[英]javac: file not found in Ubuntu Java
Getting errors in Ubuntu while running command ./run1.sh 在运行命令./run1.sh时在Ubuntu中获取错误
javac: file not found: edge.java
Usage: javac <options> <source files>
use -help for a list of possible options
Error: Could not find or load main class median_degree
In run1.sh file 在run1.sh文件中
javac -cp .:libs/java-json.jar:./src edge.java ./src median_degree.java
java -cp .:libs/java-json.jar:./src median_degree
File Structure 档案结构
Can anyone help on how to write script file for this? 谁能帮忙编写脚本文件吗? I have tried lots options but none of them is working. 我尝试了很多选择,但是都没有用。 Thank you 谢谢
Try this: 尝试这个:
javac -cp .:libs/java-json.jar ./src/edge.java ./src/median_degree.java
as the source files are not part of the class path and needs to be supplied as source files using the full path. 因为源文件不是类路径的一部分,因此需要使用完整路径作为源文件提供。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.