Home » Newcomers » Newcomers » class file has wrong version 50.0, should be 49.0
class file has wrong version 50.0, should be 49.0 [message #263037] |
Tue, 12 August 2008 21:18  |
Eclipse User |
|
|
|
Originally posted by: johnstoner2.gmail.com
Eclipse is driving me nuts. If ant worked from the command line on this
box, I'd only use the editor.
However, it doesn't so I'm using ant by way of eclipse. It's painfully
confusing. I'm getting this output:
file: /Users/jstoner/Documents/workspace/jbp/build.xml
compile:
[javac] Compiling 15 source files to
/Users/jstoner/Documents/workspace/jbp/target
[javac]
/Users/jstoner/Documents/workspace/jbp/src/boogiepants/displ ay/Instrument.java:17:
cannot access com.illposed.osc.OSCPortOut
[javac] bad class file:
/Library/Java/Extensions/javaosc.jar(com/illposed/osc/OSCPor tOut.class)
[javac] class file has wrong version 50.0, should be 49.0
[javac] Please remove or make sure it appears in the correct
subdirectory of the classpath.
[javac] import com.illposed.osc.OSCPortOut;
[javac] ^
[javac] 1 error
Now, when I go to the OSC project, and look at Properties > Java Compiler,
I see all the options set to 1.5 (which I think is 49.0, right?) Whether I
choose to enable project specific settings that is what I see and what I
want.
But I still get the error.
When I go to my ant build.xml, I add
<property name="build.compiler" location="javac1.5" />
just to be sure I'm using the right compiler.
But I still get the error.
So, in eclipse, what really, really controls the compiler version? Is it
the build.xml, or is in the project properties, or is it something else?
|
|
| | | | | | |
Re: class file has wrong version 50.0, should be 49.0 [message #263121 is a reply to message #263115] |
Wed, 13 August 2008 21:47   |
Eclipse User |
|
|
|
John Stoner wrote:
> Yes. You're missing the point. When I remove it and rebuild, I get
> another 1.6 jar. No matter what my build.xml says, no matter how I
> configure the project, no matter how man times I choose the 1.5 options,
> it seems to want to make a 1.6 jar. Eclipse really seems to think I
> should build this project as 1.6.
> Asking again: can someone give me the exhaustive list of the ways to
> persuade Eclipse the 1.5 is the true way?
I'm a little puzzled that you think this is an Eclipse problem, since
you've said you're using Ant and javac, with a customized build.xml.
Not saying it's not, just saying it still seems like there's missing
information here.
Note that the properties you set for the Eclipse compiler don't
necessarily have anything at all to do with what's in your build.xml or
what build.xml tells javac. The Eclipse Java compiler is not javac;
Eclipse has its own compiler.
If you make a project that does not use a build.xml, and build it with
Eclipse, do you get the class versions you'd expect?
Can you figure out why Ant doesn't work outside of Eclipse on your
machine? That seems like a red flag to me.
|
|
|
Re: class file has wrong version 50.0, should be 49.0 [message #263127 is a reply to message #263121] |
Thu, 14 August 2008 01:05  |
Eclipse User |
|
|
|
Originally posted by: johnstoner2.gmail.com
Walter Harley wrote:
> Can you figure out why Ant doesn't work outside of Eclipse on your
> machine? That seems like a red flag to me.
OK, that makes sense. When I found I could invoke ant from within Eclipse,
I dispensed with the command line (I have other things to do than dick
around with ant.)
OK, just double-checked, and the issue with command-line ant is that it
looked for java in $JAVA_HOME/bin, not $JAVA_HOME/Commands, where it lives
on the Mac. Easy fix, but doesn't seem to solve this problem.
I think this is one for the ant forums. Thanks for the attention.
|
|
|
Goto Forum:
Current Time: Fri Sep 19 08:16:30 EDT 2025
Powered by FUDForum. Page generated in 0.09643 seconds
|