Зависит ли JVM от архитектуры процессора?

740
Foo

Из того, что я понимаю, JVM должен общаться с операционной системой, а также генерирует команды машинного кода для процессора. Если мое понимание верно, когда я пытаюсь загрузить JRE, как он не спрашивает меня, какой процессор у меня есть? Все, что меня спрашивает, это ОС и размер моего процессора в битах.

1
[Как работает виртуальная машина Java (JVM)] (http://www.codeproject.com/Articles/30422/How-the-Java-Virtual-Machine-JVM-Works) DavidPostill 9 лет назад 0
Это для стандартизированных машин x86 / 64, да, но вы * можете * загрузить [JVM из Oracle для процессоров ARM] (http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/index. HTML). Breakthrough 9 лет назад 0
@DavidPostill Вы родственник j posttell отсюда https://tools.ietf.org/html/rfc791 У меня когда-то был вопрос, на который мог ответить только он, но, к сожалению, он умер в 1998 году и уже умер после того, как я подумал о вопрос. barlop 9 лет назад 0
@ barlop не так далеко, насколько я знаю: / DavidPostill 9 лет назад 0

1 ответ на вопрос

2
barlop

The JVM isn't that relevant to your question, as this is essentially a deeper question that doesn't just apply to the JVM, but to any program on your computer. The JVM is just a program on your computer like any other.

When you download any program(whether a game, a word processor, a nintendo emulator, a JVM), when you run that executable, that native EXE, and all those including the JVM and the nintendo emulators are native executables, it runs on your processor.. But when you go to download the program, then to get the correct download, you only need to know whether you want the 32bit download or the 64bit download and you might need to know the OS.

Other specifics about the processor don't matter.

So, there's clearly some compatibility between different processors that we find in PCs.

It boils down to processors supporting the x86 architecture, and processors supporting the x86-64 architecture. http://en.wikipedia.org/wiki/X86 and http://en.wikipedia.org/wiki/X86-64

There are even some uncommon processors are built to be able to run Windows e.g. if you look at this page the VIA Eden processor, it says "compatibility with standard x86 operating systems "

The Raspberry Pi is 32bit. however it is an example of a little computer that isn't x86. It uses an ARM processor. Linux has versions for the raspberry pi.

Похожие вопросы