您可以在没有操作系统的计算机上运行JVM吗? [英] Can you run JVM on a computer with no operating system?
问题描述
我最近读到,java是由Java制成的,因此它可以在任何地方运行,例如在烤面包机上.因此,这个问题突然出现了,您可以在没有操作系统(例如磁盘或USB)的新计算机/笔记本电脑上运行Java虚拟机和Java程序吗?如果是这样,我的Windows上编写的Java程序也可以在No OS计算机上的JVM上运行吗?
I recently read that java was made so it can run about anywhere, like for example on a toaster. So this question popped in mind, can you run Java Virtual Machine and java programs on a fresh computer/laptop that has no operating system like from a disk or a USB ? If so, could a java program written on my windows run on the JVM on the No OS computer too ?
我尝试在Google上进行搜索,但找不到任何相关内容
I tried searching on google, but i could not find anything related
谢谢
推荐答案
Java规范不需要JVM可以在操作系统之上运行;这是规格中谨慎措辞背后的大部分原因. BEA的Project Bare Metal 是JVM的一项努力,可以直接在没有操作系统的硬件上运行,而 OSv 是一个正在开发的JVM,它将在管理程序上运行,但不需要传统的操作系统.
The Java specifications don't require the JVM to run on top of an OS; that's much of the reason behind the careful wording in the specs. BEA's Project Bare Metal was a JVM effort to run directly on hardware without an operating system, and OSv is a developing a JVM that will run on a hypervisor but without the need for a traditional OS.
此外,诸如智能卡中的嵌入式Java实现通常不使用运行时JVM.取而代之的是,JVM是一种提前编译器,可以将字节码转换为目标平台的机器代码.
Additionally, embedded Java implementations, such as in smart cards, generally don't use a runtime JVM. Instead, the JVM is an ahead-of-time compiler that translates bytecode into machine code for the target platform.
这篇关于您可以在没有操作系统的计算机上运行JVM吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!