This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269752

Summary: javax.script.ScriptException: TypeError: app.setFallbackClass is not a function in <eval> at line number 89
Product: javafx Reporter: Martin Balin <mbalin>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal CC: WallaceJackson
Priority: P2    
Version: Dev   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Exception from build

Description Martin Balin 2017-02-06 08:33:37 UTC
Created attachment 163576 [details]
Exception from build

NetBeans 9 (dev) running on JDK9 as run time platform. 
1. Added new JavaFX project from template. 
2. Set project Java Platform to JDK9 and Sources to JDK9 as well.
3. Invoke Build action on project.
4. Following error occurs:
Detected JavaFX Ant API version 1.3
Launching <fx:jar> task from /home/martin/jdk-9-b151/lib/ant-javafx.jar
...
/home/martin/NetBeansProjects/JavaFXApplication6/nbproject/jfx-impl.xml:1658: 
javax.script.ScriptException: TypeError: app.setFallbackClass is not a function in <eval> at line number 89
	at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:469)
 at ...
Full log in attachement.
Comment 1 Martin Balin 2017-02-06 10:17:08 UTC
Also $PATH was pointing to JDK9/bin folder so JDK9 is used by JavaFX Ant tasks.
Comment 2 Martin Balin 2017-02-06 10:35:04 UTC
I verified various settings again and setting $PATH is not needed. --jdkhome is important.
Comment 3 Tomas Zezula 2017-02-06 13:20:09 UTC
Fixed jet-main 04ce0c02754e
Comment 4 Tomas Zezula 2017-02-06 13:24:42 UTC
Caused by an incompatible API change in the ant-javafx.jar.
The <fx:application> http://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference002.htm#CIAGCAFH no more have fallbackClass attribute.
Comment 5 Quality Engineering 2017-02-08 02:48:24 UTC
Integrated into 'main-silver', will be available in build *201702080002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/09e9760c25c5
User: Tomas Zezula <tzezula@netbeans.org>
Log: #269752:javax.script.ScriptException: TypeError: app.setFallbackClass is not a function in <eval> at line number 89