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 208798 - Must recognize JavaFX SDK with ant-javafx.jar in lib/ directory or tools/ directory
Summary: Must recognize JavaFX SDK with ant-javafx.jar in lib/ directory or tools/ dir...
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Platform (show other bugs)
Version: 7.1.1
Hardware: PC Mac OS X
: P1 normal (vote)
Assignee: Petr Somol
URL:
Keywords:
: 209014 (view as bug list)
Depends on:
Blocks: 208800
  Show dependency tree
 
Reported: 2012-02-23 14:58 UTC by kcr
Modified: 2012-04-16 12:50 UTC (History)
4 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 kcr 2012-02-23 14:58:05 UTC
Starting with 7u4 the JavaFX SDK will be cobundled with the JDK and the JavaFX Runtime will be cobundled with the JRE. See: http://monaco.us.oracle.com/detail.jsf?cr=7146794

NetBeans 7.1.1 does not recognize the JavaFX platform when the JavaFX SDK is embedded in a JDK, because it cannot locate the ant-javafx.jar file.

The layout of the JDK is:

   JDKHOME/
      bin/
      lib/
      jre/
         lib/
      ...

There is no tools directory and we would need approval from the JDK team to create a new top-level directory, so our plan for the cobundle is to match the JDK and put the ant-javafx.jar file in the lib/ directory of the JDK. So when you create a JavaFX platform and point to the JDK as the JavaFX SDK (and the JRE as the JavaFX runtime), it treats it as an invalid JavaFX platform. If I manually create a JDKHOME/tools directory and sym-link the ant-javafx.jar file it works.

Netbeans will need to change its JavaFX platform detection logic to look for the ant-javafx.jar file in either the lib/ directory or the tools/ directory. The latter is needed for compatibility with JavaFX 2.0.3 and earlier. Also, it is probably too late to change the location of ant-javafx.jar for the Windows platform for 2.1 (but we will explore this option). As long as NetBeans looks for the jar file in either place, then it shouldn't matter.
Comment 1 Stepan Zebra 2012-02-23 15:14:24 UTC
So the current plan is to make release 7.1.2 (in April) with a fix for this?
Comment 2 kcr 2012-02-23 15:21:31 UTC
Note that even though the Mac OS X release for 7u4 / FX 2.1 is the driver for this bug, the changes should be platform-independent.
Comment 3 Anton Chechel 2012-02-27 10:51:48 UTC
Planned to 7.1.2
Comment 4 Petr Somol 2012-03-07 17:51:52 UTC
While working on this we discovered several issues that require clarification. Mac JDK 7u4 differs from Win JDK + FX SDK not only in directory structure but also in what parts of FX are or are not included. We need to clarify the following:

1) on Windows we were asked to include on classpath the following jars: jfxrt.jar, deploy.jar, javaws.jar and plugin.jar. The current Mac JDK 7u4 contains only jfxrt.jar. Is the rest going to be added for GA, or for a later JDK distribution ? 

2) Are the aforementioned jars (jfxrt.jar, deploy.jar, javaws.jar and plugin.jar) going to be included on boot classpath when they become part of JDK ?

3) Mac JDK 7u4 currently does not contain WebStart executable. Will it be added for 7u4 or for a later JDK distribution or not at all ? And just to make sure: will there be just one WebStart version included ? (i.e., does the FX WebStart replace the pre-FX WebStart in its original location ?)

4) How will all this look like on Linux ? The fixes we work on should be general enough and we need to know what to expect.
Comment 5 kcr 2012-03-08 00:27:49 UTC
Here are some of the answers to the above questions:

1) The deploy.jar, javaws.jar and plugin.jar will be part of the Plugin/JRE distribution starting in JRE 7u6. We can can provide you a pointer to a prototype of this.

2) It is not planned to have jfxrt.jar, deploy.jar, javaws.jar, or plugin.jar included on boot classpath.

3) The WebStart executable, javaws, will be part of the JRE in 7u6. Yes, there will be just one version of javaws.

4) For the JDK, it will eventually look the same on Linux as on Mac (in the 7u6 time frame, since Linux is only available as a beta for JavaFX 2.1, so it will not be cobundled with 7u4). For the JRE, I don't know what the plan is yet, so I will let the deployment team comment on this.

In case you haven't had a chance to test it yet, the JDK 7u4 / FX 2.1 cobundle is available at:

http://jre.us.oracle.com/java/re/jdk/7u4/promoted/latest/bundles/macosx-x64/

You need to use the .dmg installer (it is not yet part of the .tar.gz bundle).
Comment 6 kcr 2012-03-08 01:17:22 UTC
Starting with JavaFX b15, the ant-javafx.jar file is now in the lib directory on all platforms: Mac OS X, Linux, and Windows. So NB 7.1.2 should look in the "lib" directory first on all platforms; only if not found should it fall back to the old "tools" location.
Comment 7 kcr 2012-03-08 01:19:11 UTC
I should note that it is in both locations (the new lib directory and the old tools directory) on Windows which is why it will be important to look in "lib" first.
Comment 8 Petr Somol 2012-03-12 16:34:24 UTC
updated FX Project build script (work in progress):
http://hg.netbeans.org/jet-main/rev/bfa96fdf730e

The new script searches for FX artifacts first inside JDK according to the new FX placement in JDK directory structure, only then in locations defined explicitly in "FX platform". It also verifies the existence of artifacts before their use. On MacJDK7u4 it detects attempts to run as WebStart/in Browser and notifies that this is not supported.
Comment 9 Petr Somol 2012-03-12 16:35:42 UTC
*** Bug 209014 has been marked as a duplicate of this bug. ***
Comment 10 Petr Somol 2012-03-13 14:18:00 UTC
build script optimizations: http://hg.netbeans.org/jet-main/rev/59de3d15b3ea
Comment 11 Petr Somol 2012-03-14 12:16:04 UTC
build script fixes etc. http://hg.netbeans.org/jet-main/rev/ca10e00b2c11
Comment 13 Quality Engineering 2012-03-15 12:30:38 UTC
Integrated into 'main-golden', will be available in build *201203150400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bfa96fdf730e
User: Petr Somol <psomol@netbeans.org>
Log: #208798 jfx-impl.xml update to reflect changes in upcoming JDK/FXSDK versions on various platforms
Comment 14 Petr Somol 2012-03-15 18:48:24 UTC
improved platform autodetection:
http://hg.netbeans.org/jet-main/rev/c942da89352e
Comment 15 Petr Somol 2012-03-16 12:56:56 UTC
FX platform changes added to jet-main:
http://hg.netbeans.org/jet-main/rev/a6c46fd1c7de
http://hg.netbeans.org/jet-main/rev/eab4d41bdb1c
http://hg.netbeans.org/jet-main/rev/96908d0a20d0

Although not finalized and debugged yet, Mac support already works. Default FX platform is now auto-created for JDK7u4. Execution scripts warn about the missing WS and browser plugins.
Comment 16 Quality Engineering 2012-03-17 10:40:02 UTC
Integrated into 'main-golden', will be available in build *201203170400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ca10e00b2c11
User: Petr Somol <psomol@netbeans.org>
Log: #208798 jfx-impl fixes and improvements
Comment 17 Petr Somol 2012-03-20 16:15:32 UTC
extended scope of jdk/fxsdk artifacts search in jfx-impl in jet-main:
http://hg.netbeans.org/jet-main/rev/0dc213b355a5
Comment 18 Quality Engineering 2012-03-21 12:05:42 UTC
Integrated into 'main-golden', will be available in build *201203210400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0dc213b355a5
User: Petr Somol <psomol@netbeans.org>
Log: #208798 extended scope of search for FX components in jfx-impl
Comment 19 Petr Somol 2012-03-21 13:03:42 UTC
propagate jfx-impl to samples + minor update, 
in jet-main:
http://hg.netbeans.org/jet-main/rev/b18ff1c083bb
Comment 20 Quality Engineering 2012-03-23 10:35:21 UTC
Integrated into 'main-golden', will be available in build *201203230400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b18ff1c083bb
User: Petr Somol <psomol@netbeans.org>
Log: #208798 propagate jfx-impl to samples (+minor update)
Comment 21 Marian Mirilovic 2012-03-26 14:22:19 UTC
Petr, 
is it a part of the fix http://hg.netbeans.org/releases/rev/7b3964bdd2cb propagated into 7.1.2 ?
Comment 22 Petr Somol 2012-03-26 14:35:37 UTC
Marian, the changeset http://hg.netbeans.org/releases/rev/7b3964bdd2cb
is effectively the union of all the changesets reported here in Comments 8 to 19
that had been gradually pushed to trunk. It was not possible to transplant them one by one because they are relative to an already different code base from that in 7.1.1. The union changeset has been modified slightly to be applicable in 7.1 patches branch, but functionally it is equivalent.

I plan no more changes in this issue. Leaving it open for the moment only because verification/testing is still going on both within our and the FX team.
Comment 23 Marian Mirilovic 2012-03-26 14:42:00 UTC
(In reply to comment #22)
> Marian, the changeset http://hg.netbeans.org/releases/rev/7b3964bdd2cb
> is effectively the union of all the changesets reported here in Comments 8 to
> 19
> that had been gradually pushed to trunk. It was not possible to transplant them
> one by one because they are relative to an already different code base from
> that in 7.1.1. The union changeset has been modified slightly to be applicable
> in 7.1 patches branch, but functionally it is equivalent.
> 
> I plan no more changes in this issue. Leaving it open for the moment only
> because verification/testing is still going on both within our and the FX team.

Ok, so it's fixed .. please close it, we will verify and test it in 7.1.2 ;)
Comment 24 Stepan Zebra 2012-04-16 12:50:35 UTC
verified in 7.1.2