Enums in hackJVM

Post Reply
kellpete
Posts: 2
Joined: Sun Nov 02, 2008 3:13 pm

Enums in hackJVM

Post by kellpete »

Hi

Is it true that under non-native mode, you can't use enums???
When I run the code below in non-native mode, i get:
INFO: new exception: java.lang.LinkageError, msg: not found: LuckyClover$abc.class
failure to think: ojvm.data.JavaException null

but in native, it runs smoothly.

Thanks, Peter

public class LuckyClover {
Random r = new Random();
Dest[] corners;
//HashSet<InnerClassTest> hashTest = new HashSet<InnerClassTest>();
class InnerClassTest {
int x = 0;
}
public enum abc {A, B, C;};
InnerClassTest ff = new InnerClassTest();

public Object think(double dx, double dy, double x, double y, boolean moving, int terrain,
int ourID, int ourType, double hp, double maxHP, double range, double time,
double[] objX, double[] objY, int[] objID, int[] objFaction, int[] objType, int[][] incomingRadio) {

if (moving) return null;
// Test hashSet class
//hashTest.add(new InnerClassTest());
//etest count = etest.ONE;
abc alpha;
alpha = abc.A;
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

hi peter, unfortunately the HVM mode doesn't really support java 1.5. enums won't work.
Post Reply