开发者

java -target compile

开发者 https://www.devze.com 2023-01-07 00:15 出处:网络
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...

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

精彩评论

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