Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JDK compatibilty  RSS feed

 
kishan Jaiswal
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are ROCKIT JDK ,IBM JDK and our oracle JDK so is is there compatibility between this generated byte codes ?
for example if i compile my code on IBM JDK or ROCKIT JDK then will my oracle jdk execute that byte code ?
 
Mohamed Sanaulla
Bartender
Posts: 3174
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have OpenJDK as well which is the reference implementation for the Java language specifications. The different JDK flavours should follow the Java language specification in terms of supporting the language and the byte code format. So if your target platform has all the required libraries which are being used by your application then the compiled java code should run across the JVM platforms (for the same JDK version).

You might have seen that we can use OpenJDK and compile the code and run it on OracleJDK (though there are subtle differences between the two).

This is a most unlikely practical scenario where you develop and build against one JDK platform and deploy on another JDK platform. You should keep your development, test and production platforms similar so that you don't end up with surprises when your code goes into production.
 
kishan Jaiswal
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you trying to say that there is OPENJDK by which must be followed by IBM JDK,JROCKIT JDK,and ORACLE JDK ?
 
Tim Moores
Saloon Keeper
Posts: 3755
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any implementation that wants to call itself Java (like OpenJDK, JRockit, IBM) must pass Oracle's TCK - that guarantees wide-ranging compatibility. While I don't have experience with the latter two, IMO you're more likely to run into differences between operating systems (like developing on Windows or OS X and deploying on Linux) than differences between developing on, say, OpenJDK and deploying on JRockit.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!