-
Notifications
You must be signed in to change notification settings - Fork 6
Add OpenJDK internals doc #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… to either a jimage or exploded modules
|
|
||
| ## Create the Java Virtual Machine (JVM) | ||
|
|
||
| The JVM is created by invoking JNI_CreateJavaVM. In the HelloWorld demo that is explained [here](helloworld.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/JNI_CreateJavaVM/JNI_CreateJavaVM
| ## Create the Java Virtual Machine (JVM) | ||
|
|
||
| The JVM is created by invoking JNI_CreateJavaVM. In the HelloWorld demo that is explained [here](helloworld.md) | ||
| this made done in the `main.c` file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"... that is explained here this made done in the ..." has no sense.
Maybe:
"... that is explained here, this is done in the ..."
| Inside the `create_vm` function, a call is done to `Arguments::init_system_properties()` which will invoke `os::init_system_properties_values()` which will invoke `os::set_boot_path`, which is defined in [runtime/os.cpp](https://github.com/openjdk/mobile/src/hotspot/share/runtime/os.cpp). | ||
| In this function, `Arguments::set_boot_class_path` will be invoked with the detected location of the modules. | ||
| The detection of the modules happens in 2 phases: | ||
| 1. If there is a file located at `<JAVA_HOME>lib/modules`, that one is considered to be the jimage containing all boot modules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/<JAVA_HOME>lib/modules/<JAVA_HOME>/lib/modules (missing slash)
KolbyML
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over all this looks good, I hope information about AoT gets added to the documentation soon as well 😁
| 1. If there is a file located at `<JAVA_HOME>lib/modules`, that one is considered to be the jimage containing all boot modules. | ||
| 2. Otherwise, if there is a directory at `<JAVA_HOME>/modules/java.base`, that one is set as the boot_class_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should clarify the difference between exploaded and non-exploaded modules, if we want this to be more begineer friendly, should be fine either way though
Create a new documentation, explaining where the bootclasspath is set to either a jimage or exploded modules