JNI or netbeans problem?

package nativeloader;

import java.util.*;

publicclass Main{

//Native method declaration

nativebyte[] loadFile(String name);

//Load the library

static{

System.loadLibrary("nativelib");

}

/** Creates a new instance of Main */

public Main(){

}

/**

* @param args the command line arguments

*/

publicstaticvoid main(String[] args){

// TODO code application logic here

}

}

bad class file: C:\JMSMaster\build\classes\Main.class

class file has wrong version 50.0, should be 49.0

Please remove or make sure it appears in the correct subdirectory of the classpa

th.

com.sun.tools.javac.util.Abort

at com.sun.tools.javac.comp.Check.completionError(Check.java:169)

at com.sun.tools.javadoc.DocEnv.loadClass(DocEnv.java:149)

at com.sun.tools.javadoc.RootDocImpl.<init>(RootDocImpl.java:77)

at com.sun.tools.javadoc.JavadocTool.getRootDocImpl(JavadocTool.java:156

)

at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:330)

at com.sun.tools.javadoc.Start.begin(Start.java:128)

at com.sun.tools.javadoc.Main.execute(Main.java:66)

at com.sun.tools.javah.Main.main(Main.java:147)

javadoc: error - fatal error

2 errors

that error appears when i do: javah -jni Main.class.

what could be the problem? i am compiling Main class through Netbeans.

[2217 byte] By [Aldricha] at [2007-11-27 3:38:12]
# 1

> class file has wrong version 50.0, should be 49.0

This is saying that you have compiled using Java 6, and are trying to execute it using Java 5

If you want that to work, you need to use the -target option on the compile command - and don't use any new features introduced in Java 6.

Otherwise, compile and execute using the same Java version.

ChuckBinga at 2007-7-12 8:41:30 > top of Java-index,Java Essentials,Java Programming...