changeset 102:21dce019b8bb default tip

java on MSYS2
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 28 Jun 2025 13:10:57 -0600
parents b4ac64cb4bd2
children
files src/learn.html.luan
diffstat 1 files changed, 25 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/learn.html.luan	Fri Jun 27 22:53:30 2025 -0600
+++ b/src/learn.html.luan	Sat Jun 28 13:10:57 2025 -0600
@@ -216,9 +216,33 @@
 ~ $ 
 </code>
 
+<p>On <a href="https://www.msys2.org/">MSYS2</a>, this won't work initially because <code>java</code> isn't in your path.  So from MSYS2:
+
+<code block>
+~ $ cd '/c/Program Files/Java'
+/c/Program Files/Java $ ls
+jdk1.8.0_202  jre1.8.0_202
+/c/Program Files/Java $ cd jdk1.8.0_202/
+/c/Program Files/Java/jdk1.8.0_202 $ ls
+bin        javafx-src.zip  LICENSE      src.zip
+COPYRIGHT  jre             README.html  THIRDPARTYLICENSEREADME.txt
+include    lib             release      THIRDPARTYLICENSEREADME-JAVAFX.txt
+/c/Program Files/Java/jdk1.8.0_202 $
+</code>
+
+<p>In <code>~/.bash_profile</code>:
+
+<code block>
+export JAVA_HOME="/c/Program Files/Java/jdk1.8.0_202"
+PATH="$JAVA_HOME/bin:$PATH"
+export PATH
+</code>
+
+<p>Now open a new MSYS2 shell and Java should work.</p>
+
 <h3>Learn BeanShell</h3>
 
-<p>As with Bash, I will write my own <a href="beanshell.html">BeanShell tutorial</a>.  Read it.</p>
+<p>As with Bash, I wrote my own <a href="beanshell.html">BeanShell tutorial</a>.  Read it.</p>
 
 <h3>Learn Java</h3>