Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

368
Visualizações
Is the Classloader part of the JVM or in the JRE?

I am relatively new to java, so forgive me if this question might seem "Silly". I know that the JVM (Java Virtual Machine) is contained within the JRE (Java Runtime Environment) but I am not sure if the classloader and Execution Engine are part of the JVM.

Most sources that I have read did not specify this. Instead, when describing the components of the JVM they only discuss the 5 components of the Runtime Data Area (i.e. Heap, JVM Stack, Method Area, PC Registers and Native Method Stack). Although my common sense tells that for it to be a complete Virtual Machine it needs the input, Memory & processing, I still need to verify the exact locations of these components.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Based on Classloader wikipedia there are 3 types of classloaders in JRE:

  1. Bootstrap class loader

This class loader, which is part of the core JVM, is written in native code

  1. Extensions class loader

It is implemented by the sun.misc.Launcher$ExtClassLoader class

  1. System class loader

This is implemented by the sun.misc.Launcher$AppClassLoader class

So i think in conclusion: first one is in JVM the other 2 is in JRE libraries.

  • also there are some user defined classloaders which are located in different places (e.g. tomcat, etc)
over 4 years ago · Santiago Trujillo Relatório

0

I don't think it is possible to make a clear distinction.

JRE is the name for a kind of Java distribution, which (incidentally) Oracle don't provide anymore.

JVM (Java virtual machine) is a more abstract term. It refers to "a thing that executes Java programs". In practical terms, it consists of a core written in native code and a large amount of Java code. But there is no clear line drawn between the virtual machine and the libraries that support the virtual machine and other that are "part of Java" that the virtual machine runs.

The java.lang.Classloader class is a good example of this. Some of it is written in Java. Other parts are native code methods which are provided by the JVM native code core. All other classloader classes extend the ClassLoader. Some are part of the standard library, and others may come from third party libraries or frameworks, or may be implemented by the application itself.

Then there is the bootstrap classloader which is entirely written in native code, and shares code with the native code methods of ClassLoader.

In short, I don't think it is possible to get a clear answer. And I don't think attempting or succeeding in drawing a hard line around the JVM would actually achieve anything.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda