Java 7 integration feature
The Java Virtual Machine, JVM, is the machine that gets the Java source code and transforms it into bytecode, the code that the computer can understand and execute.
That is true untill Java 6, the actual release, but with Java 7 Sun is moving to what Microsoft is doing with .NET: writing code in a specific language and then translate it into bytecode using the same machine. Microsoft .NET allows developers to write in C#, VB, J# or Delphi and then compile the code with the .NET framwork: it does not matter what language a developer is familiar with, .NET automatically translates it into bytecode.
Enable different languages inside the Java Virtual Machine
The effort of Java 7 is similar to .NET, moving to other popular languages like Ruby, Python, Groovy and Rhino. The main advantage is to have everything in the same environment, optimized to run all together. The main effort is to enable it.
Untill now Java is a statically type language that means that every type is known at compile time and no dynamicity is allowed. Java 7 can get in input whatever language without specifying the type and then transforms it into machine code. There are 3 options to solve this issue with Java:
- A generic object
- Reflection
- A language specific interpreter that runs at top of JVM
For different reasons, each solution has disadvantages. There could be problems because a more generic framework is needed to manage the different possibilities, or adding new layers means to slow down the machine itself.
Java 7 will introduce a new package, java.dyn, to refer directely to a JVM method: that's the secret to dynamically link to a not specified language. In this way it is possible to use the pointer link rather than names and to link them to language specific data.
The future of Java
Instead of copying all the possible qualities of every language, the future of Java is to allow the development of them inside the same JVM. Development can be enanched using different languages with particular carachteristics and then everything will be packaged into one box that makes everything working. It is quite complex to structure as well as powerful.
Bookmark/Search this post with: