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
精彩评论