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.
Summary: | Project is not compiled if java classes use fx classes | ||
---|---|---|---|
Product: | javafx | Reporter: | Alexandr Scherbatiy <sunflower> |
Component: | Unsupported | Assignee: | Andrey Yamkovoy <kaktus> |
Status: | VERIFIED WONTFIX | ||
Severity: | blocker | CC: | asotona, av-nb, dstrupl, pnejedly |
Priority: | P2 | Keywords: | RELNOTE |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Alexandr Scherbatiy
2008-04-22 11:14:10 UTC
Hmmm, an interesting issue. I wonder how this should work correctly. At the moment the build process uses following sequence: 1. compile all files in the projects using javac. Obviously, javac ignores .fx files 2. compile all files using javafxc (or java -classpath javafxc.jar... equivalent). All .java classes are ignored _because all corresponding .class files exist!_ Is there a way to build both .java and .fx files using one compiler in one step? Shall it be the goal? This case cannot be supported yet. One reason we chose javac as a base for javafxc was to eventually provide a single compiler for both languages, but it was made clear early on that this is a low-priority "nice to have someday" feature. Significant work still needs to be done in the compiler to support multiple concurrent contexts, as right now only a single set of FX or Java services can be used for any compiler context. There are also potential initialization issues haphazardly invoking FX objects from Java, as the two object models are different. We support the most common case, however: FX classes which have references Java project classes. This isn't an FX-specific bug, as what languages today can be used in a mixed-mode project: JRuby, Jython, PHP? NetBeans doesn't support this general scenario for any set of languages. I think a reasonable workaround for any of these cases is to break this project into two: a Java library and FX application, or an FX library and a Java application. If this isn't possible because both projects have dependencies on each other, then this hairball needs to be refactored, just like any other real project would (or should) be. Added: FXPLUGIN_PREVIEW_WAVED whiteboard. I'm closing this as WONTFIX. There are two solutions - one suggested by tball to use project dependencies and another one would be using of Java Scripting API verified Cleaning bugzilla categories .... |