javac找不到源文件 [英] javac no source files found
本文介绍了javac找不到源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在当前工作目录中有 .java
文件,但是javac报告:
I have the .java
file on the current working directory but javac reports:
javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options
我正在研究ubuntu。
I'm working on ubuntu.
推荐答案
从上面的评论中看起来你尝试过:
From your comment above, it looks like you tried:
你的Ubuntu系统上的 javac -cp .; lib.jar a.java
。 Unix系统上的 CLASSPATH
分隔符是:
,;
on Windows。
javac -cp .;lib.jar a.java
on your Ubuntu system. The CLASSPATH
separator is :
on Unix systems and ;
on Windows.
Ubuntu将命令视为;
, java -cp。
并因此给出了消息。
Ubuntu considered the command up to the ;
, java -cp .
and thus gave the message.
javac -cp。:lib.jar a.java
应该编译好。
这篇关于javac找不到源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文