- ulrikh
- Medlem ●
- Göteborg
- 2008-03-07 22:46
När jag försöker skapa antingen ett web projekt eller ett java projekt får jag detta felet i Netbeans 6
java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:675) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124 ) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:213) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at sun.misc.Service$LazyIterator.next(Service.java:271) at javax.script.ScriptEngineManager.initEngines(ScriptEngineManager.java: 127) at javax.script.ScriptEngineManager.access$000(ScriptEngineManager.java:55) at javax.script.ScriptEngineManager$1.run(ScriptEngineManager.java:98) at java.security.AccessController.doPrivileged(Native Method) at javax.script.ScriptEngineManager.init(ScriptEngineManager.java:96) at javax.script.ScriptEngineManager.<init>(ScriptEngineManager.java:69) at org.netbeans.modules.templates.ScriptingCreateFromTemplateHandler.engi ne(ScriptingCreateFromTemplateHandler.java:125) at org.netbeans.modules.templates.ScriptingCreateFromTemplateHandler.acce pt(ScriptingCreateFromTemplateHandler.java:67) at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiData Object.java:694) at org.openide.loaders.DataObject$CreateAction.run(DataObject.java:1247) at org.openide.loaders.DataObjectPool$1WrapAtomicAction.run(DataObjectPool.java:238) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java :120) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:499 ) at org.openide.loaders.DataObjectPool.runAtomicAction(DataObjectPool.java :250) at org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:861) at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:793) at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:773) at org.netbeans.modules.web.project.api.WebProjectUtilities.createIndexJS P(WebProjectUtilities.java:354) at org.netbeans.modules.web.project.api.WebProjectUtilities.ensureWelcome Page(WebProjectUtilities.java:332) at org.netbeans.modules.web.project.ui.wizards.NewWebProjectWizardIterato r.instantiate(NewWebProjectWizardIterator.java:195) at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1023) at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.ja va:595) at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizar d.java:416) at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardI terImpl.java:253) at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(Template WizardIteratorWrapper.java:165) at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java :1384) at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:134 1) at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:119) at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1908) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Kanske borde tillägga att det funkar bra att skapa ett java projekt om jag inte väljer att automatiskt generera en Main fil.
Men om jag sedan lägger till en java klass till projektet får jag samma felmeddelande igen.
Någon som vet vad det kan bero på? Jag hade inte detta felet förra veckan...Sedan dess har jag installerat Java 6 Developers preview.