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 237718 - Cannot debug JavaFX 8 application only
Summary: Cannot debug JavaFX 8 application only
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 237035 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-28 14:00 UTC by ajeh
Modified: 2013-11-20 17:05 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ajeh 2013-10-28 14:00:36 UTC
Product Version = NetBeans IDE 7.4 (Build 201310111528)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_40
Runtime = Java HotSpot(TM) Client VM 24.0-b56

When NetBeans launches debug of this JavaFX application that uses JDK 8, it pops up a window titled 'JavaFX launcher' with the following message:

This application requires a newer version of the Java runtime. Please download and install the latest Java runtime from java.com. Then restart the application.
and a button 'Install now'. 

This application runs fine, the issue is only when I attempt to debug. 

There are 2 JDKs on this machine: 1.7 and 1.8 and the project properties configured to use 1.8.

To reproduce, create a new JavaFX project, change platform from default 1.7 to 1.8, run - it will run - then debug and you will get the window described above.
Comment 1 Jiri Kovalsky 2013-10-28 14:58:15 UTC
JDK 8 is not released yet hence its support in NetBeans 7.4 is also not complete. Downgrading to P2 but we can fix this in NetBeans 7.4.1.
Comment 2 ajeh 2013-11-01 13:37:31 UTC
When JDK 1.8 only is installed in the same configuration, debug works fine.
Comment 3 Martin Entlicher 2013-11-06 12:46:21 UTC
Reproduced. The message has absolutely no sense in the first place. The message is displayed even when run on JDK 1.8 explicitly, like:
/JDK/jdk1.8.0_109/bin/java -classpath /tmp/NetBeansProjects/JavaFXApplication1/dist/JavaFXApplication1.jar:/JDK/jdk1.8.0_109/jre/lib/javaws.jar:/JDK/jdk1.8.0_109/jre/lib/deploy.jar:/JDK/jdk1.8.0_109/jre/lib/plugin.jar:/tmp/NetBeansProjects/JavaFXApplication1/build/classes com.javafx.main.Main

The problem is not the version of Java runtime, but the way the application is launched.

When the application's main class (javafxapplication1.JavaFXApplication1) is executed instead of 'com.javafx.main.Main', it works.
However, it's probably not a good solution as the JavaFX application does not have to have a main class.

The correct solution seems to be to run the application via -jar dist/JavaFXApplication1.jar. This is called on Run and needs to be called on Debug as well.
Comment 4 Martin Entlicher 2013-11-06 15:34:21 UTC
Fixed by changeset:   266957:c77de60273f2
http://hg.netbeans.org/core-main/rev/c77de60273f2

Please verify in the next nightly build. IMHO this should go into a 7.4 patch.
Comment 5 Martin Entlicher 2013-11-06 15:39:33 UTC
*** Bug 237035 has been marked as a duplicate of this bug. ***
Comment 6 Jiri Kovalsky 2013-11-13 12:16:58 UTC
Product Version: NetBeans IDE Dev (Build 201311130002)
Java: 1.7.0_40-ea; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-ea-b36
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/dev
Cache directory: /home/cesilko/.cache/netbeans/dev

Works fine for me. Waiting 24 hours for reporter's confirmation. Then will be considered as VERIFIED.
Comment 7 Jiri Kovalsky 2013-11-14 13:20:05 UTC
Verifying. Please integrate the fix to release74_fixes branch. Thank you.
Comment 8 Martin Entlicher 2013-11-14 21:40:09 UTC
Integrated into releases74 branch:
http://hg.netbeans.org/releases/rev/885ce99c4194
http://hg.netbeans.org/releases/rev/378bdf0cf66d
Comment 9 Jiri Kovalsky 2013-11-20 14:47:55 UTC
Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/7.4
Cache directory: /home/cesilko/.cache/netbeans/7.4

Verified in NetBeans IDE 7.4.1.
Comment 10 ajeh 2013-11-20 17:05:43 UTC
Works in

Product Version: NetBeans IDE Dev (Build 201311180002)
Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b57
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b115
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
User directory: D:\Users\amalmygn\AppData\Roaming\NetBeans\dev
Cache directory: D:\Users\amalmygn\AppData\Local\NetBeans\Cache\dev