Java without JVM

送分小仙女□ 提交于 2019-12-05 11:23:38

there are light weight java processors designed for use in small devices for example JOP

Do you want the Java VM alone without the API(STandard Library) ?

The JRE is composed by the JVM (Virtual MAchine) and the Standard Library, I have doubt that you can find a java implementation without the JVM ... You could find a compiler that compile java source code into native code(take a look at GCJ), but not a Java implementation without the VM.

Take a look at this wikipedia page to see some alternative Java implementations .

There's GCJ (GNU Compiler for Java), but the project has been deprecated since OpenJDK was open sourced.

As others have hinted, the "JVM" is the mechanism that knows how to load classes, interpret "bytecodes", and manage storage. It does not inherently include any of the java.lang... stuff, except that a few classes (String, Class, et al) are needed to represent classes and other basic data structures in the JVM.

As a result, Java without a JVM is just a bunch of meaningless bits.

There are (or were) compiled versions of Java that do/did not need the interpreter (though a reasonably compact interpreter is quite easy to build). A primitive class loader and some sort of storage management are still necessary, but class loading can be kept simple and for short-lived apps (or those that live with special restrictions) the storage manager need not do garbage collection.

As pstanton suggests, there are "lightweight" Java (or "Java-like") implementations that are suited for small devices.

IMHO, You need to re-exampine what it is you really want.

Java runtime consists of two main components

  • The JVM to run the code
  • The standard libraries which come with it.

You suggest you want to use Java, but you don't really have anything left without these.

For example, you cannot even write a "hello world" program without the libraries as String is a class in the JDK.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!