tags:

views:

38

answers:

2

How do I compile a java program in a different version if I have 1.6 and I want it 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

+4  A: 

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.

Simon Nickerson
Oh WHOOPS! Rookie mistake. Haha!
Dan
Thanks you and digitalsanctum
Dan
No problem. It's one of the least helpful error messages I've come across!
Simon Nickerson
+1  A: 

Try adding .java to your class name

digitalsanctum