java - Compiling any JavaFX project in NetBeans returns Unsupported major.minor version 52.0 -
i see number of similar questions
- netbeans 8.0 unsupported major.minor version 52.0 error
- unsupported major.minor version 52.0 error (duplicate)
- running jar compiled: unsupported major.minor version 52.0
- can't fix unsupported major.minor version 52.0 after fixing compatibility
but none same circumstances mine. i've tried solutions anyway (when relevant) , haven't helped.
i had created javafx fxml application in netbeans 8.0.2 , had manually upgrade jdk 1.7 1.8 features wanted. believe using 1.8.0_52 both jre , jdk , project compiling fine. computer notified me of update java 8. now:
mc@mc-desktop:~$ java -version java version "1.8.0_60" java(tm) se runtime environment (build 1.8.0_60-b27) java hotspot(tm) 64-bit server vm (build 25.60-b23, mixed mode) mc@mc-desktop:~$ javac -version javac 1.8.0_60
and java 8 fxml project gets above error message during compile-time, standard basic javafx fxml application
comes netbeans. java 7 fxml compile 7 missing important features. i've started new projects specifying 8 , i've started new project in 7 , upgraded 8: same result.
i've ensured source/binary format jdk 8, in sources category , java platform set jdk 1.8 in libraries category of project's properties. can find no other setting update. i've tried clean build each time change setting. error happens in ide-generated file jfx-impl.xml
large post in entirety, being on 4000 lines. post portion here. classpath="${javafx.ant.classpath}"
line 406, compiler reports error:
<target name="-check-ant-javafx-version" depends="-pre-check-ant-javafx-version, -set-endorsed-javafx-ant-classpath,-set-javafx-ant-classpath" if="do.check.ant-javafx.version"> <echo message="ant-javafx.jar.location = ${ant-javafx.jar.location}" level="verbose"/> <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/> <taskdef resource="com/sun/javafx/tools/ant/antlib.xml" uri="javafx:com.sun.javafx.tools.ant" classpath="${javafx.ant.classpath}"/> <condition property="have-fx-ant-init"> <typefound name="javafx:com.sun.javafx.tools.ant:init-ant"/> </condition> <property name="ant-javafx-version-already-checked-in-jfximpl" value="true"/> <echo message="have-fx-ant-init = ${have-fx-ant-init}" level="verbose"/> </target>
the error message is:
/home/chris/projects/java/fxmltimer/nbproject/jfx-impl.xml:3438: following error occurred while executing line: /home/chris/projects/java/fxmltimer/nbproject/jfx-impl.xml:406: java.lang.unsupportedclassversionerror: com/sun/javafx/tools/ant/permissions : unsupported major.minor version 52.0 @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclass(classloader.java:800) @ org.apache.tools.ant.antclassloader.defineclassfromdata(antclassloader.java:1136) @ org.apache.tools.ant.antclassloader.getclassfromstream(antclassloader.java:1307) @ org.apache.tools.ant.antclassloader.findclassincomponents(antclassloader.java:1362) @ org.apache.tools.ant.antclassloader.findclass(antclassloader.java:1323) @ org.apache.tools.ant.antclassloader.loadclass(antclassloader.java:1076) @ java.lang.classloader.loadclass(classloader.java:358) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:278) @ org.apache.tools.ant.taskdefs.definer.adddefinition(definer.java:579) @ org.apache.tools.ant.taskdefs.definer.execute(definer.java:237) @ org.apache.tools.ant.taskdefs.antlib.execute(antlib.java:180) @ org.apache.tools.ant.taskdefs.definer.loadantlib(definer.java:428) @ org.apache.tools.ant.taskdefs.definer.execute(definer.java:277) @ org.apache.tools.ant.unknownelement.execute(unknownelement.java:292) @ sun.reflect.generatedmethodaccessor169.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.apache.tools.ant.dispatch.dispatchutils.execute(dispatchutils.java:106) @ org.apache.tools.ant.task.perform(task.java:348) @ org.apache.tools.ant.target.execute(target.java:435) @ org.apache.tools.ant.target.performtasks(target.java:456) @ org.apache.tools.ant.project.executesortedtargets(project.java:1393) @ org.apache.tools.ant.helper.singlecheckexecutor.executetargets(singlecheckexecutor.java:38) @ org.apache.tools.ant.project.executetargets(project.java:1248) @ org.apache.tools.ant.taskdefs.ant.execute(ant.java:441) @ org.apache.tools.ant.taskdefs.calltarget.execute(calltarget.java:105) @ org.apache.tools.ant.unknownelement.execute(unknownelement.java:292) @ sun.reflect.generatedmethodaccessor169.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.apache.tools.ant.dispatch.dispatchutils.execute(dispatchutils.java:106) @ org.apache.tools.ant.task.perform(task.java:348) @ org.apache.tools.ant.target.execute(target.java:435) @ org.apache.tools.ant.target.performtasks(target.java:456) @ org.apache.tools.ant.project.executesortedtargets(project.java:1393) @ org.apache.tools.ant.project.executetarget(project.java:1364) @ org.apache.tools.ant.helper.defaultexecutor.executetargets(defaultexecutor.java:41) @ org.apache.tools.ant.project.executetargets(project.java:1248) @ org.apache.tools.ant.module.bridge.impl.bridgeimpl.run(bridgeimpl.java:286) @ org.apache.tools.ant.module.run.targetexecutor.run(targetexecutor.java:555) @ org.netbeans.core.execution.runclassthread.run(runclassthread.java:153) build failed (total time: 7 seconds)
does have idea i'm missing? there bug in netbeans or in 1.8.0_60 sdk or jre? time & consideration!
you have change netbeans_jdkhome in netbeans.conf file.
- close netbeans if running.
- find file c:\program files\netbeans 7.3\etc\netbeans.conf
- change value parameter "netbeans_jdkhome" desired jdk version
e.g.: netbeans_jdkhome="c:\program files\java\jdk1.7.0_21" - save file , start netbeans again.
source + more detailed information: https://joanpaon.wordpress.com/2013/06/11/how-to-change-netbeans-default-java-platform-2/
Comments
Post a Comment