We’ve been making progress in getting JavaFX open sourced. I wanted to take a few minutes to include this information on fxexperience (since many of you aren’t watching the mailing list). Oh, and you might want to read this one, there is some big news at the end of the post ;-)

Late last year at JavaOne our Executive VP Hasan Risvi announced at JavaOne that we would be open sourcing all of JavaFX by the end of 2012. We didn’t quite make that (actually, it was a pleasant surprise to me as the announcement was made as much as to everybody else in the audience!). We quickly got into gear and started the substantial effort that goes into open sourcing each project. We have a lot of code. The following projects have already been open sourced as of this writing:

Project Name Release Date LOC* Description
apps/ConferenceScheduleApp Oct 22, 2012 11,052 Conference schedule application shown at JavaOne 2012
apps/Modena Nov 27, 2012 2,578 Experimental application as a playground for prototyping a new look and feel for JavaFX
apps/ModenaTest Jan 23, 2013 289 Simple test app for Modena
decora-compiler Nov 06, 2012 20,032 Build-time tool for compiling .jsl files into fragment shaders
decora-d3d Feb 07, 2013 45 D3D specific decora implementation
decora-es2 Feb 07, 2013 45 OpenGL ES 2.0 specific decora implementation
decora-jsw Feb 07, 2013 9,891 Java2D Software decora implementation
decora-prism Feb 07, 2013 1,033 Prism-based base classes for implementations of decora
decora-prism-ps Feb 07, 2013 4,157 Pixel shader / prism based implementation of decora
decora-prism-sw Feb 07, 2013 529 Software / prism based implementation of decora
decora-sse Feb 07, 2013 5,378 Native SSE implementation of decora (java half)
decora-sse-native Feb 07, 2013 7,733 Native SSE implementation of decora (native half)
deploy Dec 18, 2012 13,356 JavaFXPackager and launcher deployment tools
javafx-anim Dec 18, 2012 17,622 Animation APIs and implementation
javafx-annotation-processor Dec 18, 2012 1,569 Builder-generator annotation processor (build-time only)
javafx-beans Feb 05, 2013 100,041 Beans, Properties, and Collections
javafx-beans-dt Dec 12, 2011 6,443 Design-time API for Beans (not shipped yet, but used by SceneBuilder)
javafx-common Dec 18, 2012 7,758 APIs common to all of FX (events and utils)
javafx-concurrent Dec 23, 2011 8,368 Worker, Task, Service, and related concurrency APIs
javafx-designtime Dec 12, 2011 683 Design time implementations (not shipped)
javafx-embed-swing Feb 04, 2013 2,224 Swing embedding APIs
javafx-embed-swt Feb 04, 2013 1,990 SWT embedding APIs
javafx-fxml Sep 20, 2012 11,302 FXML API and implementation
javafx-geom Dec 18, 2012 32,180 Internal geometry classes used by prism
javafx-logging Dec 18, 2012 378 Internal logging helper
javafx-sg-common Dec 18, 2012 4,344 Internal interfaces for scene graph peers
javafx-sg-prism Dec 18, 2012 10,537 Prism scene graph peers
javafx-ui-charts Feb 23, 2012 9,316 Charting APIs
javafx-ui-controls Nov 10, 2011 154,214 UI Control APIs
javafx-util-converter Dec 29, 2011 2,902 String converter APIs
pisces Dec 18, 2012 3,735 2D software rasterizer
test-stub-toolkit Dec 23, 2011 4,855 Stubs for testing
tests/bigapps Feb 10, 2012 468 Start of a big-apps test based on Ensemble
tests/functional/SceneGraphTests Dec 17, 2012 57,090 Functional tests for the Scene Graph
tests/tools Feb 03, 2012 28,918 JemmyFX for functional testing of JavaFX apps

* LOC is just a simple wc -l on the Java files (and in the case of javafx-sse-native the .cc & .h files). This is not comprehensive, doesn’t include build files, etc. But it does include tests.

An additional 7 projects should come out within the next two weeks (glass, image I/O, and much of prism), representing another 138,034 lines of code. We’ll follow that by releasing the remainder of prism, web, and media sources within the next one-to-two months. At that point we will ALMOST be fully open source. The only remaining nugget is javafx-font, and we’re working on the OpenJFX list on a plan to replace this in the open source with direct calls to the native operating system.

We’re also going to open source our iOS and Android implementations over the next couple months. We THANK YOU for filling out the survey forms we posted last month, these were of great value. A majority of you said you’d contribute to an iOS / Android port (either via bug reports or direct code contributions) and we’re working hard to be setup so that when the code is opened you’ll be able to start in on it. One aspect of this is fixing up our build / test setup so that it is trivial for people to build and test fixes on JavaFX (including us!). I’ve prioritized fixing the build / test system now so that we will be in a position to accept contributions at a more rapid pace. The first bits and pieces for iOS should be out next week, with the rest of iOS and Android coming out at about the same time as the rest of prism (there is some timing dependency there). Both our ports are based on an as-yet unreleased version of JavaSE Embedded for iOS/Android.

There have been some question about licensing on iOS as Apple doesn’t allow for GPL licensed applications in their app store. OpenJFX and OpenJDK are both licensed with the same GPLv2 with Classpath Extension. My understanding (and I’m not a lawyer) is that this means that if you take OpenJFX + OpenJDK (minus any binary stubs released under a different license), then you can safely combine this with your application and release your application under your own license as a single application co-bundle. You can do the same with the GA release of JavaFX + JavaSE. The difference is that we do not yet have iOS / Android on our official release roadmap, so that for the time being, the only way to use JavaFX on iOS is via OpenJDK / OpenJFX. I can imagine this would make open source guys smile (open source goes where closed source does not!). This is also why we’ve been prioritizing open source so highly for the last little while — when OpenJFX can be built without any binary stubs, then there is nothing stopping you from taking OpenJFX with iOS port + OpenJDK and creating commercial applications that can be sold in the iOS app store.

I am looking forward to seeing what you all will do with this contribution, and hope to be running many Java apps on my phone / iPad in the near future.

Update 2/19/2013: The response to this post has been incredible! I got a ton of positive feedback, both here and in the press. It’s great that there is so much interest. In reading all the feedback and media coverage, I’ve realized that I there are a few things I should clarify. I mentioned “We’re also going to open source our iOS and Android implementations over the next couple months.” It turns out that that statement can be read in a bunch of different ways, and deserves a clarification. I’ve made the same points previously on the openjfx-dev mailing list, but not everybody reading this blog is also reading the mailing list and so some context is missing.

A few years ago at JavaOne 2011 we showed a demo of JavaFX running on Android and iOS devices. This was a proof-of-concept which has two essential elements. The first is a port of the Windowing / Graphics layer of JavaFX (Glass & Prism) to use iOS & Android APIs. This is what we are open-sourcing, nothing more nor less. We are not providing a JVM for these platforms, nor am I aware of any such plan, so it’s not in any way a complete solution. Nor do we have a plan for releasing these ports in any release. We’re just opening up JavaFX code to the Java community for further experimentation.

Speaking of which, there are a ton of things that we continue to look toward the community for help with in the core platform which apply to all our target platforms including desktop and embedded (such as the Raspberry PI). There are a lot of areas that need more work, such as support for X on Raspberry PI, a Windows 8 Metro port, more controls (formatted text anyone?), performance optimizations, 3D, printing, internationalization, camera and video recording and much more. If you want to pitch in on any of these projects visit JIRA or our openjfx-dev mailing list!

I also received some questions about my statements regarding the GPL and Apple. I told you I wasn’t a lawyer and I wasn’t kidding! Law is complicated so it’s probably just best to disregard any statements I might make on the subject.

Lastly, cross-platform development for these mobile platforms isn’t a first for Oracle — check out what my colleagues over in Oracle’s Java Tools and Frameworks group released a few weeks ago with Oracle ADF Mobile. You may have seen the announcement at this past JavaOne. You write your logic in Java and use HTML5 for the UI. The best part is that if you use JDeveloper you have an environment with declarative binding to datasources and the whole bit. So far, they’ve released it on iOS and Android – and it’s fully supported. Oracle is basing most of its mobile application development going forward on ADF Mobile and customers are already having success like the folks at ECSTeam. You can download it and try it out for free.

I hope to see you on the dev list and can’t wait to see what we can do together in this community!