I am currently using the Windows 10 20H1 (build 19041.153) with WSL2 enabled.
I have already configured git in WSL2 and managed to clone the repository to my C:/ drive. I have the oracle Java 8 installed on Windows and what I want to achieve is to run "make" command and "make && make install" in the WSL2, but use Java 8 from Windows - without installing it on WSL2.
Also, I would like to use IntelliJ IDEA on Windows and build the project there after executing "make". Is that possible?
I have created 2 symbolic links in WSL2 with the following:
sudo ln -s /mnt/c/Program\ Files\/Java/jre1.8.0_191/bin/java.exe /bin/java
sudo ln -s /mnt/c/Program\ Files\/Java/jre1.8.0_191/bin/javac.exe /bin/javac
The first one works fine, so that when I type in:
java -version
In WSL2 I get:
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
but the
javac -version
provided me with:
Command 'javac' not found,
Any hints? Also, during "make && make install" I get an error:
make -s -f src/bios/script/Makefile realclean
make -s -f src/bios/script/Makefile packages
make -s -f src/bios/script/Makefile eclipse_classpath
make -s -f src/bios/script/Makefile codegeneration
make -s -f src/bios/script/Makefile everything
/bin/sh: 1: javac: not found
src/bios/script/Makefile:417: recipe for target 'everything' failed
make[1]: *** [everything] Error 127
src/bios/script/Makefile:249: recipe for target 'all' failed
make: *** [all] Error 2
I did not edit the files .profile or .bashrc - is that important?