Welcome!

Oracle Authors: Pat Romanski, Elizabeth White, TJ Randall, Suhas Uliyar, Carmen Gonzalez

Related Topics: Java, XML, Virtualization

Java: Article

Developer Viewpoint: Open-Source Not Java Itself...but "JRT"

Developer Viewpoint: Open-Source Not Java Itself...but "JRT"

There's been lots of debate this year over whether or not Sun should open source Java. I've talked at OSCon to quite a few Java guys, many long term Apache developers, who are disgruntled at Sun for not open sourcing Java. I totally share their frustration as Sun have done 95-99% of all the right things. Part of the frustration is there's only a little step further to go, we're all so close.

I think Sun's done a fantastic job of growing and protecting the Java platform. There's just one more step they need to take - to open source some Java source code - and we're all happy. However up to now I think the problem has been that no-one's managed to explain to Sun why they should do it or even what 'open sourcing Java' means in real practical terms.

Sun is clearly very concerned that any kind of move in this direction could undermine the Java platform, leading to fragmenting of the platform and brand etc. I guess this reluctance should be seen as a very good thing - they are being very careful and protecting Java. However sometimes a parent can smother a child and wrap it in too much cotton wool...

So here's hoping this proposal can help show why and how Sun could do it, making lots of open source hackers very happy and growing the Java platform even more, especially faced with stiff competition from .NET / Mono.

What's more I'm not even proposing it open sources Java but something a little different. Lets start out with a couple of use cases...


Use Case A

You're a developer in a large company or ISV or consultancy of some kind. You develop enterprise applications for your customers, using the right tools for the job etc. Now let's assume that you like Java and develop most of your enterprise software in Java due to the diversity of tools, technologies (open source and commercial) available and so forth. (So here we're talking about most of the developers in the Java community today.)

However increasingly you're finding that X per cent of the time you need to write or interface closely with some .NET / Mono code. e.g. you need to put some code inside Word/Excel/Access/InfoPath to write some rich client thingy. Or maybe you need to hack some existing .NET/Mono project etc.

The value of X might not be very big. I know many large companies where X will be zero. For some I know it'll be 5-10%. I know of some companies where this will be much higher - though in the circles I move it's not very big, but YMMV. (BTW you could argue Web services is a solution here, but really sometimes you just need to hack inside the .NET/Mono worlds).

Whatever the value of X, let's assume that for a reasonable amount of people it's gonna be greater than zero and a significant value. Now to build code that works on .NET / Mono today, there's only really one safe option - ditch Java, the language, the JVM, the tools, the frameworks, and jump wholesale into the .NET / Mono world using C# and VisualStudio and all that stuff MS is doing.

This means you've now 2 platforms and code bases to work on, 2 sets of build tools, libraries and so forth. This is not ideal. Indeed I can imagine many companies, to save having both .NET experts and Java experts and having 2 sets of tools and internal Java vs .NET wars, will try and just pick one and use that one tool for everything. I can therefore imagine quite a few of these developers just switching to .NET / Mono. Why might they do this?
  • They need to hack on windows-only technology like Office.
  • Using one platform saves money.
  • Moving to .NET is seen as an easier choice, since once you've made that choice you get everything you need from MS - no need to choose the best IDE, the best build tool, the best app server, Web app framework and all those things - just use what MS gives you. Some folks in technology just want an easy life, even if it's not the best tool for the job, it's an easy life and no one ever got sacked for choosing MS etc.
  • They may get their heads turned by some whizzy new rich client UI stuff that MS/.NET has (like InfoPath or neato Office stuff if MS were to innovate in Office again or, who knows, maybe some of this Longhorn stuff isn't just catchup-to-OS X, but might actually be new and innovative. At least now MS has an incentive to innovate.
  • VB looks easy to hack stuff together.
Maybe there are other reasons to switch. From the Java camp, who cares what the reasons are, people will switch.

So whats the (.)net result?
  • Java the platform loses users and grows less popular.
  • There's a clear pressure on developers to switch to .NET / Mono especially by their business who love Excel or whatnot.
  • For those users who don't switch completely, they now have 2 platforms to support which is a PITA and adds more cost and complexity to their job.
  • For users who do switch to the .NET/Mono they've just lost a lot of their choice, they've lost a lot of the benefits of the Java platform and open APIs and community and are now mostly vendor locked into MS with no plan B.
Clearly this is not good for Sun, the Java platform or the users in Use Case A. But its great for MS and Mono!


Use Case B

This one is pretty much the same as above, except you're a highly Linux/C focussed developer. You may work with lots of C code, work on open source Linux C projects or you may even be some kind of Linux distributor. Either way you'd like to use a language and tools that make your job easier yet work nicely in your C / GPL environment. Something that can fit right in, turn easily into shared libraries / DLLs or executables and be easily distributed to your users.

Java is not as easy as it might be at integrating into C code or Linux worlds or being easy to redistribute in typically Linux/GPL worlds. There's another option - Mono. This is welcoming the Linux platform and developers with open arms. Java could be a possible solution in this space (as a language, set of tools, standard APIs etc). However due to restrictions on licensing issues, Mono seems a much better option for Linux folks to use today - purely due to licensing restrictions rather than any technical issue.

The net result to Java for this situation? Linux/C based developers don't move to Java (or move away from Java) and move to Mono. A kinda knock on benefit for .NET as it looks like .NET is more popular thanks to Mono


Conclusions

So we've just described 2 massive communities of developers above and why the current licensing of Java is causing them pain and how its badly affecting the Java platform to the benefit of .NET / Mono.

For Use Case A, developers could stick on the Java platform. They could keep their investment in the Java tools, languages, frameworks and so forth. But for those times where they need to be inside .NET for neater Office integration or to work inside a .NET/Mono project, they could compile their Java code and any dependent code they use to .NET IL. Java is mostly bytecode which is easily translatable and the .NET CLR is very similar to the JVM so its not that hard to do.

Indeed IKVM does exactly this today. We can today use .NET as a platform on which to run Java code. The downside is, IKVM isn't allowed to use the rt.jar thats part of the JDK / JRE due to licence restrictions. So it must use GNU classpath, which is a little buggy and not totally compliant with its real, certified JVM / JRE equivalent code. It's pretty good - Eclipse works fine inside IKVM for example, but there are buggy areas. (e.g. Geronimo doesn't run yet inside IKVM due to IO / classloader bugs).

Now the users in Use Case A are not trying to subvert the Java brand or fool anyone into thinking that .NET / Mono is a Java platform. They just wan to get their job done and use one set of languages and tools, to save money, and have an easier life and try avoid being caught in the cross-fire of a developer mindshare war.

Hey, one of Java's goals is to write once run anywhere. Yet this clearly does not yet include running inside .NET / Mono. These should be valid platforms for folks to use Java on!

Similarly for users in Use Case B - developers could use the Java platform, yet turn all their Java code/libraries into shared libraries, DLLs, and executables. They can do this completely today with gcj. It works fine, however like above it must use GNU classpath which is buggy and incomplete.

Again the WORA vision is broken since C libraries are not considered to be a platform on which Java should run - which thanks to gcj it could be - it's just not really supported or possible, again due to licensing issues.


A Proposed Solution

So what should Sun do to help both of these massive communities of developers? Firstly its clearly Sun's fault as it's Sun licensing agreements which are the problem here. So here's what Sun can do to both protect the Java platform from fragmentation and to grow the Java platform into these 2 large areas of developers while still keeping a steely grip on the Java platform and brand...

Sun should set up an open source project called JRT. It's not Java, it's not a Java platform - it's something else, it's JRT. It's a bunch of Java source code for some java.* and javax.* APIs and implementation classes which are used to implement part of the JDK / JRE - basically the source code which when compiled to bytecode makes the rt.jar which goes into the JVM. Parts of this are already open sourced (XML parsers, DOM, SAX etc). So its already been done in part. We're just making a bigger chunk of this code open source.

Note it's not the JVM though - there's lots of C code for implementing that and there's all that really cool hotspot stuff too - I'm not proposing any of this is open sourced (yet) - though that could be kinda cool, the Mono guys could really help out and reuse that stuff.

So JRT is just an open sourced Java project - under a very liberal licence, say Apache 2.0 licenced so folks can use it inside GPL and BSD open source projects or inside commercial products if need be. Note that the JRT project also includes a few C header files for when JRT's Java code has to call out to native C functions that any VM must implement.

Now Sun is sole committer on JRT; they decide what goes into JRT when. However now that a huge bulk of the code for the JVM is out there now we all benefit because...
  • More eyeballs are now looking closely at the code.
  • Previous GNU-classpath developers can now work with Sun developers to help maintain and improve JRT.
  • Folks can easily submit patches.
  • This has no effect on the Java brand or platform, since JRT != Java, its just some java code for some of the java libraries.
  • Sun keeps the Java trademark, brand and compatibility tests so 'Java' is protected.
So far, nothing too earth shattering or risky for Sun. They're already done part of this (for XML). They've not open sourced Java, the JVM, or the platform. They've just open sourced some Java source code (and some C header files) that are used to create rt.jar.


Now what this now means is that the IKVM and the gcj guys can reuse JRT freely. They can redistribute JRT source code or compile it into some format and call it anything they like. (There would be restrictions, like you can't modify JRT and call it JRT, or you can't claim that you are a Java platform unless you pass Sun's TCK etc). Redistributing JRT doesn't affect the Java brand, since no one is saying it is Java - no one is allowed to say it is Java.

However now the IKVM & gcj guys don't have to try keep GNU classpath in sync with JRT; they can just share the code. This then means they can make .NET / Mono / gcj into a platform on which Java code can be run. Lets call this a JRT-platform. JRT-platform = a platform which your Java code is likely to run, but it might not. i.e. it's not a certified Java platform but it might be close.

Now developers have a choice; they can write their code in Java and deploy on any Java platform, or they could try their luck on a JRT platform too - that's their choice. Choice is good. JRT platforms are not necessarily a Java platform, so it's a little risky and there might be a few bugs and suchlike, but hey it might work. (It already does for Eclipse and so could well work for many projects). It doesn't have to work for everyone; so long as it works for some folks, we've all gained.

So far so good. We've already got Java platforms, officially sanctioned and certified platforms on which developers can have total confidence. Or there could be these new JRT platforms, which have specific close integration with .NET stuff or C or whatnot which could be used too. This is good - we've got more choice now and everyone's happy. There are other non-Java platforms developers can try if they want to and the GNU-classpath guys can just help fix and tune JRT instead. Win-win!


But wait. The IKVM or gcj guys could try certify their JRT platforms as fully fledged 'Java platforms.' This is by no means necessary; things would be OK if there were Java and JRT platforms, but the ideal would be for IKVM and gcj to both certify so that they become Java platforms too, passing any certification tests Sun comes up with to ensure developers have complete confidence that their stuff will run. This would be a truly great step and I think both these platforms could get there without too much work (since they're really close now and the JRT code is the missing link). IKVM for example is the work of mostly one person!

Think about that for a second. We could test and certify that .NET / Mono (with IKVM) and gcj would completely pass all of Sun's compatibility tests and so could then call themselves a fully fledged Java platform and JVM.

If we get there then
  • We have one really massive Java platform now; all of the JVMs available today plus .NET, Mono, Rotor, and gcj. That makes pretty much anything a possible Java platform (which may not use the Java VM but use another VM, like the CLR - who cares how it works so long as it's compatible).
  • Sun protects the Java brand still, defines the TCKs and for anyone who tries to pass off a non-compliant Java platform as a Java platform it can sue and protect us all from Java brand fragmentation.
  • Folks who don't have the resources to go the whole hog and certify as a Java platform, can be a 2nd class JRT-platform but still be useful to Java developers even though they are not a real, true, compliant Java platform.
  • We'd get more competition in the VMs; who knows the .NET VM migth one day run Java code better than Sun's? Or maybe Mono? Or vice versa - the Sun JVM might run .NET / Mono code better? e.g. Mono users could take advantage of hotspot. Competition is good!
  • Folks who are using C / gcj / .NET / Mono today could be tempted to use some of the great stuff available in the Java ecosystem inside their platform (since their platforms could now be certified as Java platforms). i.e. folks could start switching to not from Java.
  • We could end all these ports of Java open source projects to C# just to get clean integration with .NET / Mono, we could just use Java code to run on both platforms. (Or we could write a C# compiler for the JVM similarly, to reuse any C# open sourced code - of which there's little today but that might change in the future.)
This would be a win-win for Java, Sun, developers, and Mono/gcj too. We would all now standardize on one set of languages, tools, frameworks, IDEs, APIs yet when we needed to work closely with lots of C or lots of Mono / .NET stuff, we wouldn't have to switch platforms and tooling, we could stay on the Java platform (if they are certified, or use a JRT-platform with a little more work/risk).

From time to time we might switch APIs from java.something to System.whatnot when it makes sense to do so. But hey, healthy competition for APIs is a good thing. Use the right tool for the job and let's avoid unnecessary platform wars.

The only folks who could possibly be hurt by this are MS since they would not be locking anyone into .NET any more. However they're free to innovate and compete by building better APIs and tools to tempt folks to use MS-only stuff. This is fine and competition is healthy and we all win. Let's have an open playing field with no artificial barriers!

So please Sun, go for it. Make the first step and open source JRT. It's no biggie and doesn't affect the Java brand. There are many people in the open source world who'd bend over backwards to help you do it. We'd all love you for it! We'ld help you develop, support, document, and tune JRT for free. You'd keep ownership of the IPR and sole rights over it and I'm sure Apache or codehaus would happily host the project for nothing - it would't cost you a penny.

Once you've taken that first step, some of us could then try help turn .NET, Mono, and gcj into Java platforms - and then we'd all really win.

More Stories By James Strachan

James Strachan, technical director at IONA, is responsible for helping the Company provide open source offerings for organizations requiring secure, high-performance distributed systems and integration solutions. He is heavily involved in the open source community, and has co-founded several Apache projects, including ActiveMQ, Camel, Geronimo and ServiceMix. He also created the "Groovy" scripting language and additional open source projects such as dom4j, jaxen and Jelly. Prior to joining IONA, James spent more than 20 years in enterprise software development. Previously, James co-founded LogicBlaze, Inc., an enterprise open source company acquired by IONA. Prior to that, he founded SpiritSoft, Inc., a company providing enterprise Java middleware services.

Comments (6)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
SYS-CON Events announced today that AgilePoint, the leading provider of Microsoft-centric Business Process Management software, will exhibit at SYS-CON's 2nd International @ThingsExpo which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. AgilePoint is the leading provider of Microsoft-based Business Process Management (BPM) software products, has 1,300+ on-premise and cloud deployments in 25+ countries and provides the same advanced BPM feature set as J2EE vendors like IBM and Appian for the Microsoft .NET native environment. AgilePoint customer...
The Internet of Things (IoT) promises to evolve the way the world does business; however, understanding how to apply it to your company can be a mystery. Most people struggle with understanding the potential business uses or tend to get caught up in the technology, resulting in solutions that fail to meet even minimum business goals. In his session at Internet of @ThingsExpo, Jesse Shiah, CEO / President / Co-Founder of AgilePoint Inc., will show what is needed to leverage the IoT to transform your business. He will discuss opportunities and challenges ahead for the IoT from a market and tec...
SYS-CON Events announced today that Utimaco will exhibit at SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Utimaco is a leading manufacturer of hardware based security solutions that provide the root of trust to keep cryptographic keys safe, secure critical digital infrastructures and protect high value data assets. Only Utimaco delivers a general-purpose hardware security module (HSM) as a customizable platform to easily integrate into existing software solutions, embed business logic and build s...
One of the biggest challenges when developing connected devices is identifying user value and delivering it through successful user experiences. In his session at Internet of @ThingsExpo, Mike Kuniavsky, Principal Scientist, Innovation Services at PARC, will describe an IoT-specific approach to user experience design that combines approaches from interaction design, industrial design and service design to create experiences that go beyond simple connected gadgets to create lasting, multi-device experiences grounded in people’s real needs and desires.
Samsung VP Jacopo Lenzi, who headed the company's recent SmartThings acquisition under the auspices of Samsung's Open Innovaction Center (OIC), answered a few questions we had about the deal. This interview was in conjunction with our interview with SmartThings CEO Alex Hawkinson. IoT Journal: SmartThings was developed in an open, standards-agnostic platform, and will now be part of Samsung's Open Innovation Center. Can you elaborate on your commitment to keep the platform open? Jacopo Lenzi: Samsung recognizes that true, accelerated innovation cannot be driven from one source, but requires a...
The Internet of Things will greatly expand the opportunities for data collection and new business models driven off of that data. In her session at Internet of @ThingsExpo, Esmeralda Swartz, CMO of MetraTech, will discuss how for this to be effective you not only need to have infrastructure and operational models capable of utilizing this new phenomenon, but increasingly service providers will need to convince a skeptical public to participate. Get ready to show them the money! Speaker Bio: Esmeralda Swartz, CMO of MetraTech, has spent 16 years as a marketing, product management, and busin...
SYS-CON Events announced today that TeleStax, the main sponsor of Mobicents, will exhibit at Internet of @ThingsExpo, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. TeleStax provides Open Source Communications software and services that facilitate the shift from legacy SS7 based IN networks to IP based LTE and IMS networks hosted on private (on-premise), hybrid or public clouds. TeleStax products include Restcomm, JSLEE, SMSC Gateway, USSD Gateway, SS7 Resource Adaptors, SIP Servlets, Rich Multimedia Services, Presence Services/RCS, Diame...
Things are being built upon cloud foundations to transform organizations. This CEO Power Panel at 15th Cloud Expo, moderated by Roger Strukhoff, Cloud Expo and @ThingsExpo conference chair, will address the big issues involving these technologies and, more important, the results they will achieve. How important are public, private, and hybrid cloud to the enterprise? How does one define Big Data? And how is the IoT tying all this together?
We certainly live in interesting technological times. And no more interesting than the current competing IoT standards for connectivity. Various standards bodies, approaches, and ecosystems are vying for mindshare and positioning for a competitive edge. It is clear that when the dust settles, we will have new protocols, evolved protocols, that will change the way we interact with devices and infrastructure. We will also have evolved web protocols, like HTTP/2, that will be changing the very core of our infrastructures. At the same time, we have old approaches made new again like micro-services...
The only place to be June 9-11 is Cloud Expo & @ThingsExpo 2015 East at the Javits Center in New York City. Join us there as delegates from all over the world come to listen to and engage with speakers & sponsors from the leading Cloud Computing, IoT & Big Data companies. Cloud Expo & @ThingsExpo are the leading events covering the booming market of Cloud Computing, IoT & Big Data for the enterprise. Speakers from all over the world will be hand-picked for their ability to explore the economic strategies that utility/cloud computing provides. Whether public, private, or in a hybrid form, clo...
SYS-CON Events announces a new pavilion on the Cloud Expo floor where WebRTC converges with the Internet of Things. Pavilion will showcase WebRTC and the Internet of Things. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devices--computers, smartphones, tablets, and sensors – connected to the Internet by 2020. This number will continue to grow at a rapid pace for the next several decades.
SYS-CON Events announced today that Gridstore™, the leader in software-defined storage (SDS) purpose-built for Windows Servers and Hyper-V, will exhibit at SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Gridstore™ is the leader in software-defined storage purpose built for virtualization that is designed to accelerate applications in virtualized environments. Using its patented Server-Side Virtual Controller™ Technology (SVCT) to eliminate the I/O blender effect and accelerate applications Gridsto...
SYS-CON Events announced today that Red Hat, the world's leading provider of open source solutions, will exhibit at Internet of @ThingsExpo, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Red Hat is the world's leading provider of open source software solutions, using a community-powered approach to reliable and high-performing cloud, Linux, middleware, storage and virtualization technologies. Red Hat also offers award-winning support, training, and consulting services. As the connective hub in a global network of enterprises, partners, a...
As the Internet of Things unfolds, mobile and wearable devices are blurring the line between physical and digital, integrating ever more closely with our interests, our routines, our daily lives. Contextual computing and smart, sensor-equipped spaces bring the potential to walk through a world that recognizes us and responds accordingly. We become continuous transmitters and receivers of data. In his session at Internet of @ThingsExpo, Andrew Bolwell, Director of Innovation for HP’s Printing and Personal Systems Group, will discuss how key attributes of mobile technology – touch input, senso...
The Internet of Things (IoT) is making everything it touches smarter – smart devices, smart cars and smart cities. And lucky us, we’re just beginning to reap the benefits as we work toward a networked society. However, this technology-driven innovation is impacting more than just individuals. The IoT has an environmental impact as well, which brings us to the theme of this month’s #IoTuesday Twitter chat. The ability to remove inefficiencies through connected objects is driving change throughout every sector, including waste management. BigBelly Solar, located just outside of Boston, is trans...
Connected devices and the Internet of Things are getting significant momentum in 2014. In his session at Internet of @ThingsExpo, Jim Hunter, Chief Scientist & Technology Evangelist at Greenwave Systems, will examine three key elements that together will drive mass adoption of the IoT before the end of 2015. The first element is the recent advent of robust open source protocols (like AllJoyn and WebRTC) that facilitate M2M communication. The second is broad availability of flexible, cost-effective storage designed to handle the massive surge in back-end data in a world where timely analytics...
Internet of @ThingsExpo Silicon Valley announced on Thursday its first 12 all-star speakers and sessions for its upcoming event, which will take place November 4-6, 2014, at the Santa Clara Convention Center in California. @ThingsExpo, the first and largest IoT event in the world, debuted at the Javits Center in New York City in June 10-12, 2014 with over 6,000 delegates attending the conference. Among the first 12 announced world class speakers, IBM will present two highly popular IoT sessions, which will take place November 4-6, 2014 at the Santa Clara Convention Center in Santa Clara, Calif...
From a software development perspective IoT is about programming "things," about connecting them with each other or integrating them with existing applications. In his session at @ThingsExpo, Yakov Fain, co-founder of Farata Systems and SuranceBay, will show you how small IoT-enabled devices from multiple manufacturers can be integrated into the workflow of an enterprise application. This is a practical demo of building a framework and components in HTML/Java/Mobile technologies to serve as a platform that can integrate new devices as they become available on the market.
SYS-CON Events announced today that O'Reilly Media has been named “Media Sponsor” of SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. O'Reilly Media spreads the knowledge of innovators through its books, online services, magazines, and conferences. Since 1978, O'Reilly Media has been a chronicler and catalyst of cutting-edge development, homing in on the technology trends that really matter and spurring their adoption by amplifying "faint signals" from the alpha geeks who are creating the future. An...
The Transparent Cloud-computing Consortium (abbreviation: T-Cloud Consortium) will conduct research activities into changes in the computing model as a result of collaboration between "device" and "cloud" and the creation of new value and markets through organic data processing High speed and high quality networks, and dramatic improvements in computer processing capabilities, have greatly changed the nature of applications and made the storing and processing of data on the network commonplace.