如何在没有JVM的情况下运行Java程序? [英] How to run java program without JVM?

查看:308
本文介绍了如何在没有JVM的情况下运行Java程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的java程序,可以只打印Hello World.可以不使用安装在机器中的JVM进行打印吗?但是编译器在那里.

I have simple java programm that will just print Hello World.Can it be possible to print without using JVM installed in a machine ?But compiler is there.

推荐答案

您可以使用以下方法将Java字节码编译为机器代码: http://en.wikipedia.org/wiki/GNU_Compiler_for_Java

You can compile Java Byte Code to Machine Code using something like this: http://en.wikipedia.org/wiki/GNU_Compiler_for_Java

或者您也可以使用许多Java到C/C ++转换器中的任何一个来制作C/C ++版本并进行编译. (在Google上搜索"Java C Converter")

Or you can use any of the MANY Java to C/C++ converters out there to make a C/C++ version, and compile that. (Search Google for "Java C Converter")

警告::我从未尝试过其中的任何一种,包括链接的GNU编译器,因此我无法对其使用或质量作任何证明.

Warning: I have never tried any of these, including the linked GNU Compiler, so I cannot make any attestations to their usefulness or quality.

这篇关于如何在没有JVM的情况下运行Java程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆