Skip to content

Commit

Permalink
Merge branch 'masesgroup:master' into 214-update-documentation-to-des…
Browse files Browse the repository at this point in the history
…cribe-how-to-write-a-good-code
  • Loading branch information
masesdevelopers authored Oct 9, 2023
2 parents 923d9f9 + 9e938f0 commit 3a6fedf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions docs/articles/usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,28 @@ <h3 id="jvm-identification">JVM identification</h3>
}
}
</code></pre>
<p><strong>IMPORTANT NOTE</strong>: <code>pathToJVM</code> shall be escaped</p>
<ol>
<li><code>string pathToJVM = &quot;C:\\Program Files\\Eclipse Adoptium\\jdk-11.0.18.10-hotspot\\bin\\server\\jvm.dll&quot;;</code></li>
<li><code>string pathToJVM = @&quot;C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\bin\server\jvm.dll&quot;;</code></li>
</ol>
<h3 id="special-initialization-conditions">Special initialization conditions</h3>
<p><a href="https://www.jcobridge.com/">JCOBridge</a> try to identify a suitable JRE/JDK installation within the system using some standard mechanism of JRE/JDK: <code>JAVA_HOME</code> environment variable or Windows registry if available.
However it is possible, on Windows operating systems, that the library raises an <strong>InvalidOperationException: Missing Java Key in registry: Couldn't find Java installed on the machine</strong>.
This means that neither <code>JAVA_HOME</code> nor Windows registry contains information about a default installed JRE/JDK: some vendors may not setup them.
If the developer/user encounter this condition can do the following steps:</p>
<ol>
<li>On a command prompt execute <code>set | findstr JAVA_HOME</code> and verify the result;</li>
<li>If something was reported maybe the <code>JAVA_HOME</code> environment variable is not set at system level, but at a different level like user level which is not visible from the JNet process that raised the exception;</li>
<li>Try to set <code>JAVA_HOME</code> at system level e.g. <code>JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\</code>;</li>
<li>Try to set <code>JCOBRIDGE_JVMPath</code> at system level e.g. <code>JCOBRIDGE_JVMPath=C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\</code>.</li>
</ol>
<p><strong>IMPORTANT NOTES</strong>:</p>
<ul>
<li>One of <code>JCOBRIDGE_JVMPath</code> or <code>JAVA_HOME</code> environment variables or Windows registry (on Windows OSes) shall be available</li>
<li><code>JCOBRIDGE_JVMPath</code> environment variable takes precedence over <code>JAVA_HOME</code> and Windows registry: you can set <code>JCOBRIDGE_JVMPath</code> to <code>C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\bin\server\jvm.dll</code> and avoid to override <code>JVMPath</code> in your code</li>
<li>After first initialization steps, <code>JVMPath</code> takes precedence over <code>JCOBRIDGE_JVMPath</code>/<code>JAVA_HOME</code> environment variables or Windows registry</li>
</ul>
</article>
</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -63396,7 +63396,7 @@
"output": {
".html": {
"relative_path": "articles/usage.html",
"hash": "1keo81AGnIB06pspoHlWxRGooYftvW/QYWUATG6xX6o="
"hash": "dyMnYAytqlHpKY28VBfBluH0Ma1alHb1ZXtirNzZAns="
}
},
"is_incremental": false,
Expand Down

0 comments on commit 3a6fedf

Please sign in to comment.