2

I have a java class that contains an instruction to do something in a hosting platform.

java Foo.class

I believe that an instance of the JVM is created/instantiated after running "java" command. Did I understand it right? "java" command is an independent program or a process, but an instantiated JVM is another process...

DaeYoung
  • 1,161
  • 6
  • 27
  • 59

2 Answers2

2

java (java.exe in Windows) is an application, it is a wrapper over jvm library (jvm.dll in Windows). We can say java.exe is a JVM launcher.

Evgeniy Dorofeev
  • 133,369
  • 30
  • 199
  • 275
1

The term "java command" is a little misleading. What you're launching is a program or application. In unix/linux that's a binary with the execute bit set, in windows it's a file with an *.exe extension, in OSX it could be a binary or an *.app

In all those cases what's happening is the OS launches a process called "java" that is the JVM.

Alex Fitzpatrick
  • 643
  • 5
  • 10