Create account / Log in

Incompatible custom code

Issues with the Vassal engine.

Moderators: Tim M, uckelman

Incompatible custom code

Postby greenknight » December 3rd, 2017, 5:44 pm

After compiling and adding my .class files, I get this:

(this is my first go at adding custom classes)

"The Custom Code In This Module Should Be Recompiled

This module contains custom Java code (neno.AutoFleetSpawn) which was not compiled to be Java 5 compatible. As a result, this module will not run on all versions of Java which VASSAL itself supports.

Please check whether there is an updated version of this module. If not, please contact the maintainer of this module and request that it be fixed."

I have Java 8 and I've used Netbeans 8.2.

DO I really have to get Java 5 and compile using that?
greenknight
 
Posts: 48
Joined: November 18th, 2015, 9:46 pm

Re: Incompatible custom code

Postby uckelman » December 3rd, 2017, 7:15 pm

Thus spake greenknight:
> After compiling and adding my .class files, I get this:
>
> (this is my first go at adding custom classes)
>
> "The Custom Code In This Module Should Be Recompiled
>
> This module contains custom Java code (neno.AutoFleetSpawn) which was
> not compiled to be Java 5 compatible. As a result, this module will not
> run on all versions of Java which VASSAL itself supports.
>
> Please check whether there is an updated version of this module. If not,
> please contact the maintainer of this module and request that it be
> fixed."
>
> I have Java 8 and I've used Netbeans 8.2.
>
> DO I really have to get Java 5 and compile using that?

No. You need to compile with the '-source 5 -target 5' flags, to produce
class files which are compatible with Java 5.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 7986
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Incompatible custom code

Postby greenknight » December 4th, 2017, 1:59 pm

uckelman wrote:Thus spake greenknight:
> After compiling and adding my .class files, I get this:
>
> (this is my first go at adding custom classes)
>
> "The Custom Code In This Module Should Be Recompiled
>
> This module contains custom Java code (neno.AutoFleetSpawn) which was
> not compiled to be Java 5 compatible. As a result, this module will not
> run on all versions of Java which VASSAL itself supports.
>
> Please check whether there is an updated version of this module. If not,
> please contact the maintainer of this module and request that it be
> fixed."
>
> I have Java 8 and I've used Netbeans 8.2.
>
> DO I really have to get Java 5 and compile using that?

No. You need to compile with the '-source 5 -target 5' flags, to produce
class files which are compatible with Java 5.

--
J.


Ok, thanks.

Was kind of hoping Netbeans could arrange this for me, but it refuses to go older than 1.6.
greenknight
 
Posts: 48
Joined: November 18th, 2015, 9:46 pm


Return to Technical Support & Bugs

Who is online

Users browsing this forum: Bing [Bot] and 3 guests