Skip to content
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

jabba install 1.8 does not install javac #350

Closed
jamesbroadhead opened this issue Nov 28, 2018 · 4 comments
Closed

jabba install 1.8 does not install javac #350

jamesbroadhead opened this issue Nov 28, 2018 · 4 comments

Comments

@jamesbroadhead
Copy link

jamesbroadhead commented Nov 28, 2018

$ jabba use [email protected]
$ type javac
javac is /Users/jbo/.jabba/jdk/[email protected]/Contents/Home/bin/javac

$ jabba use 1.8.192

$ type java
java is /Users/jbo/.jabba/jdk/1.8.192/Contents/Home/bin/java
$ type javac
javac is /usr/bin/javac # note that this isn't inside the jabba dir
$ ls /Users/jbo/.jabba/jdk/1.8.192/Contents/Home/bin
ControlPanel  java    jcontrol  keytool  pack200     rmid         servertool  unpack200
_javaws       javaws  jjs       orbd     policytool  rmiregistry  tnameserv

This looks like only the JRE has been installed

@1ambda
Copy link

1ambda commented Dec 1, 2018

// https://github.com/shyiko/jabba/blob/master/index.json#L435

        "1.8.192": "dmg+https://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/jdk-8u192-macosx-x64.dmg",
        "1.8.191": "dmg+https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-macosx-x64.dmg",

The download link is correct. I tried the direct installation from oracle site and it works. (I am using OSX)
Seems internal installation process of jabba is broken.

People who wants to change jdk versions locally installed might use this bash function temporarily.

// for OSX
// usage: setjdk 1.8 

function setjdk() {
  if [ $# -ne 0 ]; then
  removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
  if [ -n "${JAVA_HOME+x}" ]; then
    removeFromPath $JAVA_HOME
  fi
  export JAVA_HOME=`/usr/libexec/java_home -v $@`
  export PATH=$JAVA_HOME/bin:$PATH
  fi
}
function removeFromPath() {
  export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
}

@shyiko
Copy link
Owner

shyiko commented Dec 18, 2018

Sorry guys, for some reason "Notifications" were set to "Not Watching" and so I wasn't getting any messages for over 3 weeks. Fixed in 0.11.1.

@bogste
Copy link

bogste commented Feb 11, 2019

Hi and thanks for fixing this in master!

Looks like for version 11.2 this hasn't propagated to package managers like Homebrew -- installing jabba using brew will have the "broken/JRE-installing" variant.

@shyiko
Copy link
Owner

shyiko commented Feb 12, 2019

#138 - homebrew is not currently supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants