Search code examples
javainstallationgroovysdkmanzscaler

SDKMAN local installation


For some reason beyond my comprehension, my (R&D) company is blocking sdk installation. If I visit sdk download link manually, I'll get

Sorry, you don't have permission to visit this site.
Website blocked
Not allowed to browse MCAS Unsanctioned Apps category
You tried to visit:http://dl.bintray.com/groovy/maven/apache-groovy-sdk-2.4.12.zip

Thus I downloaded from home then try to make use of the SDKMAN local installation, but failed no matter what I tried.

The following details just shows ways I've tried, and can be skipped:

$ sdk install groovy ~/Downloads/apache-groovy-sdk-2.4.12.zip
==== INTERNET NOT REACHABLE! ===================================================

 Some functionality is disabled or only partially available.
 If this persists, please enable the offline mode:

   $ sdk offline

================================================================================

Stop! groovy /Users/xxx/Downloads/apache-groovy-sdk-2.4.12.zip is not available while offline.

$ sdk install groovy 2.4.12 ~/Downloads/groovy-2.4.12
==== INTERNET NOT REACHABLE! ===================================================

 Some functionality is disabled or only partially available.
 If this persists, please enable the offline mode:

   $ sdk offline

================================================================================

Stop! groovy 2.4.12 is not available while offline.


$ sdk offline
Offline mode enabled.

$ sdk install groovy 2.4.12 ~/Downloads/apache-groovy-sdk-2.4.12
Stop! groovy 2.4.12 is not available while offline.

$ sdk install groovy ~/Downloads/apache-groovy-sdk-2.4.12.zip
Stop! groovy /Users/xxx/Downloads/apache-groovy-sdk-2.4.12.zip is not available while offline.

$ sdk install groovy ~/Downloads/apache-groovy-sdk-2.4.12
Stop! groovy /Users/xxx/Downloads/apache-groovy-sdk-2.4.12 is not available while offline.

I'm sure the zip file is there, and have UTSL to verify that with it's own checking:

 [[ -n /Users/xxx/Downloads/apache-groovy-sdk-2.4.12.zip ]] 

$ echo $?
0

So, how to make use of my downloaded .zip and use the SDKMAN for local installation?


Solution

  • This used to work in the past for me - not sure if it still applies.

    Simply extract the archive to the relevant sdkman folder and tell sdkman to use it as the default version.

    For example:

    $ unzip -d ~/.sdkman/candidats/groovy ~/Downloads/groovy-2.4.12.zip
    $ sdk default groovy 2.4.12 # sdk use ...