salt-formulas/salt-formula-java

Path not properly set

gazoo4 opened this issue · 0 comments

Copy/pasting the pillar from the README:

java:
  environment:
    enabled: true
    version: '8'
    platform: oracle-java
    development: true

Doesn't deploy the tarball correctly:

vagrant@debian-9:~$ java
-bash: java: command not found
vagrant@debian-9:~$ javac
-bash: javac: command not found

Because it results in the following folder structure:

vagrant@debian-9:~$ echo ${PATH}
<...>:/usr/lib/java/bin:<...>
vagrant@debian-9:~$ ls -l /usr/lib/java/bin
ls: cannot access '/usr/lib/java/bin': No such file or directory
vagrant@debian-9:~$ ls -l /usr/lib/java/
total 4
drwxr-xr-x 7 uucp 143 4096 Jul  7 08:09 jdk1.8.0_181
vagrant@debian-9:~$ ls -l /usr/lib/java
lrwxrwxrwx 1 root root 32 Jul 30 08:19 /usr/lib/java -> /etc/alternatives/java-home-link
vagrant@debian-9:~$ ls -l /etc/alternatives/java-home-link
lrwxrwxrwx 1 root root 25 Jul 30 08:19 /etc/alternatives/java-home-link -> /usr/share/java/8u181-b13
vagrant@debian-9:~$ ls -l /usr/share/java/8u181-b13
total 4
drwxr-xr-x 7 uucp 143 4096 Jul  7 08:09 jdk1.8.0_181
vagrant@debian-9:~$