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!
This is a question/comment regarding your update:
Thanks for the clarification. I do accept the fact that we don’t get a fully working solution.
But PLEASE tell us WHICH JVM we shall use on iOS and Android? Which JVM did Oracle use for their JavaFX demos on iPad?
The fact that Oracle is not providing a JVM (not a prototype either) is a bad signal.
Does Oracle understand the sentence “Write once, run anywhere”? Obviously not 🙁
As far as I understand OpenJDK works with Ubuntu for Android. I have not tried this, but OpenJDK is in Ubuntu. However I do not know how well it works when Ubuntu for Android are used as a Phone.
On the other hand the Ubuntu Phone product should work well with OpenJDK and porting OpenJFX once completely released to that platform should not be that hard, in fact I expect the Ubuntu developers top package OpenJFX for Ubuntu Phone.
The problem with iOS is that its an entirely proprietary platform. It does not matter if Oracle creates a JVM for this platform, you will not be allowed to sell Java applications to iOS users.
And the problem with Android is that its do not include all Linux functionality that OpenJDK requires in order to compile and run. This however is solvable and you have all the source-code you need in order to repackage OpenJDK to this OS. I would however avoid doing this. If you are really interested in this I would suggest either doing it yourself or get quotes from consulting companies that are able to do it. Perhaps you could then start a crowd-funding project.
“The fact that Oracle is not providing a JVM (not a prototype either) is a bad signal.”
Oracle have provided you with the full sourcecode of their JVM in their OpenJDK.
“Does Oracle understand the sentence “Write once, run anywhere”? Obviously not”
I do not agree here. Who have the responsibility to fulfill this motto? Are Sun/Oracle fully responsible? I dont think so. I think this responsibility should be shared, and porting OpenJDK to Android should be done by both the Android community and Oracle. Ubuntu, Fedora, SUSE, FreeBSD and a whole bunch of others OS development communities have fully functional OpenJDK packageing for their OS and this was not done by Oracle. Nor will the support for JavaFX on these platforms come from Oracle – but it WILL be there.
Personally i believe that javafx will make Java something that every OS must have. It will replace Flash, or replace is a weak word – it will KILL Flash. It will have all the features of Flash while still have all the awesomeness of JIT:ed performance and an extensive enterprise framework. Web developers will embrace Java stronger than they ever embraced Flash because of this. Because lets face it HTML5 + JavaScript failed at replacing Flash, and will continue to fail. At bloated text based markup language and a script language that transfer as bloated text-files and even when compiled to native code it fails to get even close to Java performance.
The thing with Java FX is not its ability to create desktop applications. It is it ability to create WEB applications as easy as you can develop desktop applications. And as important – with performance that is superior to any other web application technologies.
GWT and Vaadin have become the most popular tool for HTML5 + JavaScript development, as it hides all that nasty HTML5 and JavaScript crap so developers don’t have to deal with it. However those are known to have horrible performance and its not hard to understand why when looking at the architecture and file formats used.
And with Java FX replacing Flash for rich content that means that we are no longer in the hands of how a single corporation decide to provide us with proprietary binary blobs. We have OpenJDK and Open JFX which can be ported by the community to any operating system.
This in turn means that the future of a consumer OS (mobile or desktop) will depend on its support for Java. If Android developers do not port Java FX to Android, then they will start to lose market share to ubuntu.
Just like Wine and Flash is a necessity on any desktop operating system because Windows and Flash are what many developers use – Java will take this place both on the desktop and on mobile systems.
iOS and Android may have been able to compete in the void of operating systems that do not have Java, but once Ubuntu Phone is out there – consumers will simply buy the phones that they can use Java on.
Thanks for the detailed reply. Unfortunately, I still see things a little bit different 😉
> As far as I understand OpenJDK works with Ubuntu for Android.
I have tried Ubuntu in chroot. openJDK works indeed. Thats great, but that’s not the point! Can you convince your boss to use Java on mobile platforms by telling him about Ubuntu? Probably not. At least not today.
> The problem with iOS is that its an entirely proprietary platform. It does > not matter if Oracle creates a JVM for this platform, you will not be
> allowed to sell Java applications to iOS users.
I don’t get this. Being proprietary is not the point. Windows is proprietary, OS X is proprietary. There are no issues with the JVM. The real problem is AOT vs. JIT and Apple being so conservative.
> Oracle have provided you with the full sourcecode of their JVM in their > OpenJDK.
As I said. I understand that they don’t provide fully working solutions. But the JVM is such an important and fundamental part of the whole Java universe that I’d really expect more effort. As you pointed out yourself a JVM on iOS is problematic. With this in mind it’s even more important to guide the community. There must be a labs project at Oracle that does AOT or somehow manages to run on iOS. Otherwise the promising demos from 2011 were pointless. I believe they showed it for a reason. Maybe the management people changed their mind.
> I do not agree here. Who have the responsibility to fulfill this motto? Are Sun/Oracle fully
> responsible? I dont think so
Shared responsibility is great! Thats what is missing. They just told us that the are not going to provide a JVM not even a prototype.
> …OpenJDK packageing for their OS and this was not done by Oracle.
This is because on the desktop they have done exactly the right thing: pointing the direction! They did a great job on the desktop. But with mobile devices it is different. Again, you mentioned the reasons yourself. Mobile operating systems are different in so many respects. And integrating OpenJDK into a Linux distribution is really easy compared to porting it to iOS!
> It will replace Flash, or replace is a weak word – it will KILL Flash.
Come on! Killing a dead man is not difficult 🙂
> This in turn means that the future of a consumer OS (mobile or desktop) will depend on its support > for Java. If Android developers do not port Java FX to Android, then they will start to lose market
> share to ubuntu.
I’d really like to believe you. I’v tried Ubuntu for Phones on my Nexus 4. It’s promising. But it’s still not clear whether it will come with all features. At CeBIT they told me that it’s up to the partner companies to define the feature set. Let’s see whether it will run Java.
We all know that JavaFX as a lot potential. But Oracle is loosing many, many developers by ignoring the mobile market! I LOVE JAVA and JAVAFX! I really do! In my business we create lots of simulation code. Quite often people ask me which language to choose for ultimate portability of that code. Unfortunately, I have to tell them that plain C is still the best option for that kind of code. And this really hurts!
“Can you convince your boss to use Java on mobile platforms by telling him about Ubuntu? Probably not. At least not today.”
I am my boss. However Ubuntu Phone need a bit more testing, also OpenJFX are the main reason I would want OpenJDK and Ubuntu so that will have to wait. Of course different people are in different situations and that is why change takes time.
“I don’t get this. Being proprietary is not the point. Windows is proprietary, OS X is proprietary. There are no issues with the JVM. The real problem is AOT vs. JIT and Apple being so conservative.”
Being proprietary is part of the point. If Windows or OS X starts disabling Java or in other ways make it impossible to run then there are nothing Oracle can do about it. But with Linux/Android which is not proprietary this is not possible. The fact that Apple are being conservative would not have been an issue if iOS had not been a proprietary OS.
“As I said. I understand that they don’t provide fully working solutions. But the JVM is such an important and fundamental part of the whole Java universe that I’d really expect more effort. As you pointed out yourself a JVM on iOS is problematic. With this in mind it’s even more important to guide the community. There must be a labs project at Oracle that does AOT or somehow manages to run on iOS. Otherwise the promising demos from 2011 were pointless. I believe they showed it for a reason. Maybe the management people changed their mind.”
Or perhaps they ran a JVM on a rooted iOS system? I see no evidence that those demos was made with AOT which is something different than a JVM. There are several non-Oracle AOT solutions for Java Bytecode. But I would consider them OT.
“This is because on the desktop they have done exactly the right thing: pointing the direction! They did a great job on the desktop. But with mobile devices it is different. Again, you mentioned the reasons yourself. Mobile operating systems are different in so many respects. And integrating OpenJDK into a Linux distribution is really easy compared to porting it to iOS!”
I do not see the difference here as anything Oracle did. Red Hat and others did LOTS of work in order to get OpenJDK to build and run on Linux so do not accept that it would be really easy compared to porting it to iOS. Of course dist-specific packing was a bit easy once it worked on some linux dist. But OpenJDK was not in a state where it was easy to get working on ANY platform when Sun released it.
“Shared responsibility is great! Thats what is missing. They just told us that the are not going to provide a JVM not even a prototype.”
How is that missing? How is it shared responsibility to require Oracle to provide us with a prototype JVM for iOS/Android? Did the websites for community-funded projects disappear?
“> It will replace Flash, or replace is a weak word – it will KILL Flash.
Come on! Killing a dead man is not difficult”
Flash is far from dead and still used on many websites including youtube, and still the most popular tool for building rich web applications. No flash is as alive as ever and the only currently known project that can kill it is Java FX. Silverlight had potential, but something that only works in two operating systems can not compete against Flash.
“I’d really like to believe you. I’v tried Ubuntu for Phones on my Nexus 4. It’s promising. But it’s still not clear whether it will come with all features. At CeBIT they told me that it’s up to the partner companies to define the feature set. Let’s see whether it will run Java.”
I see no reason why it would not run Java. Being a complete desktop OS for mobiles is sort of its thing, and without Java how will you run Azureus, LibreOffice and the many other apps that require Java?
When they say its up to the partners to define the feature set i interpret that as the Ubuntu Phone-specific features and core packages. There will still be repositories and both supported and community packages in them.
“We all know that JavaFX as a lot potential. But Oracle is loosing many, many developers by ignoring the mobile market! I LOVE JAVA and JAVAFX! I really do! In my business we create lots of simulation code. Quite often people ask me which language to choose for ultimate portability of that code. Unfortunately, I have to tell them that plain C is still the best option for that kind of code. And this really hurts!”
C++ is currently supported on most platforms that have C but I agree that C/C++ is the best bet for ultimate portability. On the other hand it could be easier to code in Java or C# and use some code conversion tool. Take a look at Sharpen that converts Java to C# which covers a lot of platforms. While C/C++ is portable it also requires more work,
The mobile market is still small compared to the desktop market. While mobile games gets a lot of press, this market are very small compared to PC games, and browser games. A market that I think Java FX will come to dominate. The main competitors area Unity 3D (PC games) and Flash (Web games). Also there are the rich client market which is an important enterprise market. We really want enterprises to start writing theirs systems in Java and JavaFX provides a lot of nice features for that. Take a look att DataFX and RedFX… C# which have had some success in the enterprise market can not compete with Java FX when it comes to RAD GUI development. I am still a fan of Swing, but lets face it -> Swing had difficulties competing with Windows.Form. I myself could not find a good reason to think that Swing is better than Windows forms. But the new GUI toolkit in JavaFX looks promising and together with DataFX and RedFX i think that it have quite an edge over Windows.Form.
of new components types. One exaplme for this is the JGrid. Since JavaFX was out I wanted to port the JGrid to it. After some experiments and bad prototyps I think I found the right way to do it. The talks from
Sorry, but there are so many other HTML5 based mobile frameworks like ADF. My company has used so much frameworks… But we do not want to use JavaScript based apps any more. It’s really a pain! No threading, no layout managers, no professional code syntax ….
Sorry, there is absolutely NO interest in ADF. We need JavaFX for mobile. If Oracle do not want to see JavaFX on mobile, JavaFX will die. And please take a look at QT5…iOS and Android support is coming this year…
I totally agree on this. JavaScript is not an option for many use cases. And when it comes to Qt I don’t know why they do not use it, there are no speed penalty and it would simplify the Java codebase a lot.
Support for Android and iOS are planned for Qt5.
It’s almost May now. I have wondered when will JavaFX be fully open source? That means we can use openjdk&openjfx to support our JavaFX project in anywhere.