-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusage.html
More file actions
487 lines (458 loc) · 22.7 KB
/
usage.html
File metadata and controls
487 lines (458 loc) · 22.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<!DOCTYPE html>
<html class=" js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths" lang="en"><!--<![endif]--><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Usage - SDKMAN! the Software Development Kit Manager</title>
<link href="https://sdkman.io/assets//img/favicon.ico" type="image/x-ico" rel="icon">
<link rel="stylesheet" type="text/css" href="assets/files/bootstrap.css">
<link rel="stylesheet" type="text/css" href="assets/files/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="assets/files/style.css">
</head>
<body style="">
<div id="fork-me">
<a href="https://github.com/sdkman-native/sdkman-native-cli">
<img style="position: fixed; top: -14px; right: -14px; border: 0; z-index: 100" src="assets/img/forkme_right_red_aa0000.png" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png">
</a>
</div>
<div id="st-container" class="st-container st-effect-9">
<div class="st-pusher">
<div class="st-content">
<div class="st-content-inner">
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a
href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div>
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"></span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<img class="sdk-logo" src="assets/img/sdk-man-small-pattern.png">
</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class=""><a href="install.html">Install</a></li>
<li class=""><a href="jdks.html">JDKs</a></li>
<li class=""><a href="sdks.html">SDKs</a></li>
<li class=""><a href="usage.html">Usage</a></li>
<li class=""><a href="vendors.html">Vendors</a></li>
</ul>
</div>
</div>
</div>
<div id="content" class="page-1">
<div class="row">
<div class="row-fluid">
<div class="col-lg-3">
<ul class="nav-sidebar">
<li class="active"><a href="usage.html"><strong>Usage</strong></a></li>
<li><a href="#installdefault" class="anchor-link">Install Latest Stable</a></li>
<li><a href="#installspecific" class="anchor-link">Install Specific Version</a>
</li>
<li><a href="#localversion" class="anchor-link">Install Local Version</a></li>
<li><a href="#remove" class="anchor-link">Remove Version</a></li>
<li><a href="#listcandidates" class="anchor-link">List Candidates</a></li>
<li><a href="#listversions" class="anchor-link">List Versions</a></li>
<li><a href="#use" class="anchor-link">Use Version</a></li>
<li><a href="#default" class="anchor-link">Default Version</a></li>
<li><a href="#current" class="anchor-link">Current Version</a></li>
<li><a href="#upgrade" class="anchor-link">Upgrade Versions</a></li>
<li><a href="#version" class="anchor-link">Version</a></li>
<li><a href="#broadcast" class="anchor-link">Broadcast Messages</a></li>
<li><a href="#offline" class="anchor-link">Offline Mode</a></li>
<li><a href="#selfupdate" class="anchor-link">Self-Update</a></li>
<li><a href="#update" class="anchor-link">Update</a></li>
<li><a href="#flush" class="anchor-link">Flush</a></li>
<li><a href="#help" class="anchor-link">Help</a></li>
<li><a href="#config" class="anchor-link">Configuration</a></li>
</ul>
<br></div>
<div class="col-lg-8 col-lg-pull-0">
<h1><a name="main"></a><i class="fa fa-laptop"></i>Usage</h1>
<br>
<article>
<h2>Installing an SDK</h2><a name="installdefault"></a><h4>Latest Stable</h4>
<p>
Install the <strong>latest stable</strong> version of your SDK of choice
(say, Java JDK) by running the following command:
</p><pre><code>$ sdk install java</code></pre>
You will see something like the following output:
<pre> <code>
Downloading: java 8u111
In progress...
######################################################################## 100.0%
Installing: java 8u111
Done installing!
</code>
</pre>
Now you will be prompted if you want this version to be set as
<strong>default.</strong>
<pre><code>Do you want java 8u111 to be set as default? (Y/n):</code></pre>
Answering <em>yes</em> (or <em>hitting enter</em>) will ensure that all
subsequent shells opened will have this version of the SDK in use by default.
<pre><code>Setting java 8u111 as default.</code></pre>
<p></p><a name="installspecific"></a><h4>Specific Version</h4>
<p>
Need a <strong>specific</strong> version of an SDK? Simply qualify the
version you require:
</p><pre><code>$ sdk install scala 2.12.1</code></pre>
All subsequent steps same as above.
<p></p><a name="localversion"></a><h4>Install Local Version(s)</h4>
<p>
Using a snapshot version? Already have a local installation? Setup a local version by specifying the path to the local installation:
</p><pre><code>$ sdk install groovy 3.0.0-SNAPSHOT /path/to/groovy-3.0.0-SNAPSHOT</code></pre>
<pre><code>$ sdk install java 10-zulu /Library/Java/JavaVirtualMachines/zulu-10.jdk/Contents/Home</code></pre>
Note that the local version name (<em>3.0.0-SNAPSHOT</em> and
<em>10-zulu</em> in the examples above) must be a unique name
which is not already in the list of available version names.
<p></p>
</article>
<br>
<article>
<a name="remove"></a>
<h2>Remove Version</h2>
<p>
Remove an installed version.
</p><pre><code>$ sdk uninstall scala 2.11.6</code></pre>
Note that removing a local version will not remove the local installation.
<p></p>
</article>
<br>
<article>
<a name="listcandidates"></a>
<h2>List Candidates</h2>
<p>
To get a listing of available Candidates:
</p><pre><code>$ sdk list</code></pre>
This will render a searchable alphabetic list with name, current stable default
version, website URL, description and easy install command for each Candidate.
The output is piped to <code>less</code> so standard keyboard shortcuts may be
used with <code>q</code> to exit.
<pre><code>
================================================================================
Available Candidates
================================================================================
q-quit /-search down
j-down ?-search up
k-up h-help
--------------------------------------------------------------------------------
Groovy (2.4.5) http://www.groovy-lang.org/
Groovy is a powerful, optionally typed and dynamic language, with static-typing
and static compilation capabilities, for the Java platform aimed at multiplying
developers’ productivity thanks to a concise, familiar and easy to learn syntax.
It integrates smoothly with any Java program, and immediately delivers to your
application powerful features, including scripting capabilities, Domain-Specific
Language authoring, runtime and compile-time meta-programming and functional
programming.
$ sdk install groovy
--------------------------------------------------------------------------------
Scala (2.11.7) http://www.scala-lang.org/
...
</code>
</pre>
<p></p>
</article>
<br>
<article>
<a name="listversions"></a>
<h2>List Versions</h2>
<p>
To get a listing of Candidate Versions:
</p><pre><code>$ sdk list groovy</code></pre>
This will result in a list view showing the available, local, installed and
current versions of the SDK.
<pre><code>
================================================================================
Available Groovy Versions
================================================================================
> * 2.4.4 2.3.1 2.0.8 1.8.3
2.4.3 2.3.0 2.0.7 1.8.2
2.4.2 2.2.2 2.0.6 1.8.1
2.4.1 2.2.1 2.0.5 1.8.0
2.4.0 2.2.0 2.0.4 1.7.9
2.3.9 2.1.9 2.0.3 1.7.8
2.3.8 2.1.8 2.0.2 1.7.7
2.3.7 2.1.7 2.0.1 1.7.6
2.3.6 2.1.6 2.0.0 1.7.5
2.3.5 2.1.5 1.8.9 1.7.4
2.3.4 2.1.4 1.8.8 1.7.3
2.3.3 2.1.3 1.8.7 1.7.2
2.3.2 2.1.2 1.8.6 1.7.11
2.3.11 2.1.1 1.8.5 1.7.10
2.3.10 2.1.0 1.8.4 1.7.1
================================================================================
+ - local version
* - installed
> - currently in use
================================================================================
</code>
</pre>
<p></p>
</article>
<br>
<article>
<a name="use"></a>
<h2>Use Version</h2>
<p>
Choose to use a given version in the current terminal:
</p><pre><code>$ sdk use scala 2.12.1</code></pre>
It is important to realise that this will switch the candidate version <strong>for
the current shell only</strong>. To make this change permanent, use the <a href="#default">default</a> command instead.
<p></p>
</article>
<br>
<article>
<a name="default"></a>
<h2>Default Version</h2>
<p>
Chose to make a given version the default:
</p><pre><code>$ sdk default scala 2.11.6</code></pre>
This will ensure that all subsequent shells will start with version 2.11.6 in
use.
<p></p>
</article>
<br>
<article>
<a name="current"></a>
<h2>Current Version(s)</h2>
<p>
To see what is currently in use for a Candidate:
</p><pre><code>
$ sdk current java
Using java version 8u111
</code></pre>
To see what is currently in use for <strong>all</strong> Candidates:
<pre><code>
$ sdk current
Using:
groovy: 2.4.7
java: 8u111
scala: 2.12.1
</code></pre>
<p></p>
</article>
<br>
<article>
<a name="upgrade"></a>
<h2>Upgrade Version(s)</h2>
<p>
To see what is currently out of date for a Candidate on your system:
</p><pre><code>
$ sdk upgrade springboot
Upgrade:
springboot (1.2.4.RELEASE, 1.2.3.RELEASE < 1.2.5.RELEASE)
</code></pre>
To see what is outdated for <strong>all</strong> Candidates:
<pre><code>
$ sdk upgrade
Upgrade:
gradle (2.3, 1.11, 2.4, 2.5 < 2.6)
grails (2.5.1 < 3.0.4)
springboot (1.2.4.RELEASE, 1.2.3.RELEASE < 1.2.5.RELEASE)
</code></pre>
<p></p>
</article>
<br>
<article>
<a name="version"></a>
<h2>SDKMAN! Version</h2>
<p>
Display the current version of SDKMAN!:
</p><pre><code>$ sdk version</code></pre>
<p></p>
</article>
<br>
<article>
<a name="broadcast"></a>
<h2>Broadcast Messages</h2>
<p>
Get the latest SDK release notifications on the command line:
</p><pre><code>
$ sdk broadcast
==== BROADCAST =================================================================
* 06/12/16: Scala 2.12.1 released on SDKMAN! #scala
* 23/11/16: Gradle 3.2.1 released on SDKMAN! #gradle
* 22/11/16: Ceylon 1.3.1 released on SDKMAN! #ceylonlang
================================================================================
</code></pre>
It is also worth mentioning that whenever an SDK version is released on
SDKMAN!, a notification will appear when next using the CLI.
Every new broadcast is also pushed to Twitter.
<p></p>
</article>
<br>
<article>
<a name="offline"></a>
<h2>Offline Mode</h2>
<p>
Initially called <em>Aeroplane Mode</em>, this allows SDKMAN! to function
when working offline. It has a parameter that can be passed
to<em>enable</em> or <em>disable</em> the offline mode.
</p><pre><code>
$ sdk offline enable
Forced offline mode enabled.
$ sdk offline disable
Online mode re-enabled!
</code></pre>
When operating in <strong>offline</strong> mode, most commands will still work
even though they will operate in a scaled down capacity. An example is the list
command, which will only display the currently installed and active version(s):
<pre><code>
$ sdk list
------------------------------------------------------------
Offline Mode: only showing installed groovy versions
------------------------------------------------------------
> 2.4.4
* 2.4.3
------------------------------------------------------------
* - installed
> - currently in use
------------------------------------------------------------
</code></pre>
The offline mode will also be disabled/enabled automatically when the internet
becomes available/unavailable. Naturally, commands that require internet
connectivity will not function but give a warning.
<p></p>
</article>
<br>
<article>
<a name="selfupdate"></a>
<h2>Self-Update</h2>
<p>
Installs a new version of SDKMAN! if available.
</p><pre><code>$ sdk selfupdate</code></pre>
If no new version is available an appropriate message will be displayed.
Re-installation may be forced by passing the force parameter to the command:
<pre><code>$ sdk selfupdate force</code></pre>
Automatic daily checks for new versions of SDKMAN! will also be performed on the
behalf of the user.
<p></p>
</article>
<br>
<article>
<a name="update"></a>
<h2>Update</h2>
<p>
Periodically SDKMAN! requires a refresh to become aware of new (or removed)
candidates.
When candidate metadata has potentially grown stale, a warning is displayed
with instruction
on how to update. By simply running the following command, the candidate
cache will be refreshed and new candidates will become available for
installation:
</p><pre><code>
WARNING: SDKMAN is out-of-date and requires an update.
$ sdk update
Adding new candidates(s): kotlin
</code></pre>
<p></p>
</article>
<br>
<article>
<a name="flush"></a>
<h2>Flush</h2>
<p>
From time to time it may be necessary to flush SDKMAN!'s local
state.The flush command helps with this and allows for the following to be
performed:
</p><h4>Broadcast</h4>
<pre><code>$ sdk flush broadcast</code></pre>
Clears out the Broadcast cache, downloading the latest available news on next
command invocation.
<h4>Archives</h4>
<pre><code>$ sdk flush archives</code></pre>
Cleans the cache containing all downloaded SDK binaries. This can take up a lot
of space so is worth clearing out from time to time!
<h4>Temporary Folder</h4>
<pre><code>$ sdk flush temp</code></pre>
Clears out the staging work folder used when installing new versions of
candidates and SDKMAN! itself.
<p></p>
</article>
<br>
<article>
<a name="help"></a>
<h2>Help</h2>
<p>
You can get basic help by running the following command:
</p><pre><code>$ sdk help</code></pre>
This should yield something like:
<pre><code>
Usage: sdk <command></command> <candidate> [version]
sdk offline <enable|disable>
commands:
install or i <candidate> [version]
uninstall or rm <candidate> <version>
list or ls <candidate>
use or u <candidate> [version]
default or d <candidate> [version]
current or c [candidate]
upgrade or ug [candidate]
version or v
broadcast or b
help or h
offline <enable|disable>
selfupdate [force]
flush <candidates|broadcast|archives|temp>
candidate : ...
version : where optional, defaults to latest stable if not provided
eg: sdk install groovy
</candidates|broadcast|archives|temp></enable|disable></candidate></candidate></candidate></version></candidate></candidate></enable|disable></candidate></code></pre>
<p></p>
<hr class="divider">
</article>
<article>
<a name="config"></a>
<h2>Configuration</h2>
<p>
Although configuration is limited, the list of configurable items will grow
as required. Configuration can be found in the
<code>~/.sdkman/etc/config</code> file. Currently the following is
configurable:
</p><pre><code>
# make sdkman non-interactive, preferred for CI environments
sdkman_auto_answer=true|false
# perform automatic selfupdates
sdkman_auto_selfupdate=true|false
# disables SSL certificate verification
# https://github.com/sdkman/sdkman-cli/issues/327
# HERE BE DRAGONS....
sdkman_insecure_ssl=true|false
# configure curl timeouts
sdkman_curl_connect_timeout=5
sdkman_curl_continue=true
sdkman_curl_max_time=10
# subscribe to the beta channel
sdkman_beta_channel=true
# enable verbose debugging
sdkman_debug_mode=true|false
# enable colour mode
sdkman_colour_enable=true|false
</code> </pre>
<p></p>
</article>
<br></div>
</div>
</div>
</div>
<footer id="footer">
<div class="row">
<div class="clearfix">© 2012 - 2020 SDKMAN! is Open Source Software licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache 2</a></div>
<div class="clearfix">Logos and additional Design by <a href="https://github.com/dmesu">Daida
Medina</a></div>
</div>
</footer>
</div>
</div>
</div>
</div>
</div>
<script src="assets/files/jquery-1.10.2.min.js.download" defer=""></script>
<script src="assets/files/bootstrap.js.download" defer=""></script>
<script src="assets/files/sidebarEffects.js.download" defer=""></script>
<script src="assets/files/modernizr-2.6.2.min.js.download" defer=""></script>
</body></html>