This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can't run applet: invalid bytecode


Kjetil Svalastog Matheussen wrote:

On Wed, 7 Feb 2007, Kjetil Svalastog Matheussen wrote:

I can't run the scribble applet again, and I'm running cvs.

In opera with jvm 5 I get the error "invalid bytecode",
In firefox with jvm 4 I get the error "Unsupported major.minor version 50.0"
(Do I really need hava 5? (50?))

Appletviewer refuses totally. I'm doing the exact same things as last

No, appletviewer works. Wrong options.

That has to do with the "javac -target <version>" used to compile your code (actually kawa in this case). Evidently you're using Java 6 to compile Kawa.


http://forum.java.sun.com/thread.jspa?threadID=5122605

If you're using the Ant build, a nice way to configure that (target attribute) for the <javac> task is by using ant.build.javac.target.

http://ant.apache.org/manual/CoreTasks/javac.html

target Generate class files for specific VM version (e.g., 1.1 or 1.2). Note that the default value depends on the JVM that is running Ant. In particular, if you use JDK 1.4+ the generated classes will not be usable for a 1.1 Java VM unless you explicitly set this attribute to the value 1.1 (which is the default value for JDK 1.1 to 1.3). We highly recommend to always specify this attribute.
A default value for this attribute can be provided using the magic ant.build.javac.target property.


http://ant.apache.org/manual/javacprops.html#target

By being on such a bleeding edge, you will need to upgrade to Ant 1.7.

Alternatively you could modify the build.xml. If you go that way, <PreSetDef> could be your friend (an Ant 1.6 feature that didn't exist when it was originally written).

http://ant.apache.org/manual/CoreTasks/presetdef.html

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]