开发者

java -target compile

How do I compile a java program in a different version if I have 1.6 and I want i开发者_JAVA技巧t compiled in 1.5? Would it be like...

javac -target1.5 tileGen

But when I do that I get:

error: Class names, 'tileGen', are only accepted if annotation processing is exp licitly requested 1 error


The problem is that javac takes the name of a source file (ending in `.java) not the name of a class.

Try

javac -target 1.5 tileGen.java

instead.


Try adding .java to your class name

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜