Coder Social home page Coder Social logo

jabba's Introduction

jabba Latest Version Build Status

Java Version Manager inspired by nvm (Node.js). Written in Go.

The goal is to provide unified pain-free experience of installing (and switching between different versions of) JDK regardless of the OS (macOS, Linux x86/x86_64/ARMv7+, Windows x86_64).

jabba install

... and from custom URLs.

Installation

macOS / Linux

(in bash/zsh/...)

export JABBA_VERSION=...
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh

(use the same command to upgrade)

The script modifies common shell rc files by default. To skip these provide the --skip-rc flag to install.sh like so:

export JABBA_VERSION=...
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash -s -- --skip-rc && . ~/.jabba/jabba.sh

Make sure to source jabba.sh in your environment if you skip it:

export JABBA_VERSION=...
[ -s "$JABBA_HOME/jabba.sh" ] && source "$JABBA_HOME/jabba.sh"

In fish command looks a little bit different - export JABBA_VERSION=... curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash; and . ~/.jabba/jabba.fish

If you don't have curl installed - replace curl -sL with wget -qO-.

If you are behind a proxy see - curl / wget manpage. Usually simple http_proxy=http://proxy-server:port https_proxy=http://proxy-server:port curl -sL ... is enough.

NOTE: The brew package is currently broken. We are working on a fix.

Docker

While you can use the same snippet as above, chances are you don't want jabba binary & shell integration script(s) to be included in the final Docker image, all you want is a JDK. Here is the Dockerfile showing how this can be done:

FROM buildpack-deps:jessie-curl

RUN curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | \
    JABBA_COMMAND="install 1.15.0 -o /jdk" bash

ENV JAVA_HOME /jdk
ENV PATH $JAVA_HOME/bin:$PATH

(when JABBA_COMMAND env variable is set install.sh downloads jabba binary, executes specified command and then deletes the binary)

$ docker build -t <image_name>:<image_tag> .
$ docker run -it --rm <image_name>:<image_tag> java -version

java version "1.15.0....

Windows 10

(in powershell)

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-Expression (
  Invoke-WebRequest https://github.com/shyiko/jabba/raw/master/install.ps1 -UseBasicParsing
).Content

(use the same command to upgrade)

Usage

# list available JDK's
jabba ls-remote
# you can use any valid semver range to narrow down the list
jabba ls-remote zulu@~1.8.60
jabba ls-remote "*@>=1.6.45 <1.9" --latest=minor

# install Oracle JDK
jabba install 1.15.0
# install Oracle Server JRE
jabba install [email protected]  
# install Adopt OpenJDK (Hotspot)
jabba install [email protected]
# install Adopt OpenJDK (Eclipse OpenJ9)
jabba install [email protected]
# install Zulu OpenJDK
jabba install [email protected]
jabba install zulu@~1.8.144 # same as "zulu@>=1.8.144 <1.9" 
# install IBM SDK, Java Technology Edition
jabba install [email protected]
# install GraalVM CE
jabba install [email protected]
# install OpenJDK
jabba install [email protected]
# install OpenJDK with Shenandoah GC
jabba install [email protected]

# install from custom URL
# (supported qualifiers: zip (since 0.3.0), tgz, tgx (since 0.10.0), dmg, bin, exe)
jabba install 1.8.0-custom=tgz+http://example.com/distribution.tar.gz
jabba install 1.8.0-custom=tgx+http://example.com/distribution.tar.xz
jabba install 1.8.0-custom=zip+file:///opt/distribution.zip

# uninstall JDK
jabba uninstall [email protected]

# link system JDK
jabba link [email protected] /Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk

# list all installed JDK's
jabba ls

# switch to a different version of JDK (it must be already `install`ed)
jabba use [email protected]
jabba use zulu@~1.6.97

echo "1.8" > .jabbarc
# switch to the JDK specified in .jabbarc (since 0.5.0)
jabba use

# set default java version on shell (since 0.2.0)
# this version will automatically be "jabba use"d every time you open up a new terminal
jabba alias default 1.8

.jabbarc has to be a valid YAML file. JDK version can be specified as jdk: 1.8 or simply as 1.8 (same as ~1.8, 1.8.x ">=1.8.0 <1.9.0" (mind the quotes)).

jsyk: jabba keeps everything under ~/.jabba (on Linux/Mac OS X) / %USERPROFILE%/.jabba (on Windows). If at any point of time you decide to uninstall jabba - just remove this directory.

For more information see jabba --help.

Development

PREREQUISITE: go1.8

git clone https://github.com/shyiko/jabba $GOPATH/src/github.com/shyiko/jabba 
cd $GOPATH/src/github.com/shyiko/jabba 
make fetch

go run jabba.go

# to test a change
make test # or "test-coverage" if you want to get a coverage breakdown

# to make a build
make build # or "build-release" (latter is cross-compiling jabba to different OSs/ARCHs)   

FAQ

Q: What if I already have java installed?

A: It's fine. You can switch between system JDK and jabba-provided one whenever you feel like it (jabba use ... / jabba deactivate). They are not gonna conflict with each other.

Q: How do I switch java globally?

A: jabba doesn't have this functionality built-in because the exact way varies greatly between the operation systems and usually involves elevated permissions. But. Here are the snippets that should work:

  • Windows

(in powershell as administrator)

# select jdk
jabba use ...

# modify global PATH & JAVA_HOME
$envRegKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\CurrentControlSet\Control\Session Manager\Environment', $true)
$envPath=$envRegKey.GetValue('Path', $null, "DoNotExpandEnvironmentNames").replace('%JAVA_HOME%\bin;', '')
[Environment]::SetEnvironmentVariable('JAVA_HOME', "$(jabba which $(jabba current))", 'Machine')
[Environment]::SetEnvironmentVariable('PATH', "%JAVA_HOME%\bin;$envPath", 'Machine')
  • Linux

(tested on Debian/Ubuntu)

# select jdk
jabba use ...

sudo update-alternatives --install /usr/bin/java java ${JAVA_HOME%*/}/bin/java 20000
sudo update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%*/}/bin/javac 20000

To switch between multiple GLOBAL alternatives use sudo update-alternatives --config java.

License

Apache License, Version 2.0

By using this software you agree to

This software is for educational purposes only.
Use it at your own risk.

jabba's People

Contributors

abhinav avatar alexaegis avatar balmungsan avatar bmarwell avatar brianrobt avatar carlosedp avatar deathnerd avatar drejmar avatar folusoogunlana avatar giltene avatar jvican avatar kelbyers avatar maksymrybak avatar marcelwgn avatar mikethebos avatar nelsg avatar petersoj avatar preetsin avatar proicons avatar rarspace01 avatar rbrisita avatar rtfpessoa avatar samihda avatar shyiko avatar svenruppert avatar twiggy avatar willcohen avatar zevg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jabba's Issues

Error when installing Zulu (and others) of Java versions in Windows

When I try to install Zulu, it´s show a erro:

PS C:\WINDOWS\system32> jabba install [email protected]
Downloading [email protected] (http://cdn.azul.com/zulu/bin/zulu8.25.0.1-jdk8.0.152-win_x64.zip)
79704848/-1
Extracting C:\Users\ivanq\AppData\Local\Temp\jabba-d-993552483 to D:\Desenvolvimento\Ferramentas.jabba\jdk\[email protected]

D:\Desenvolvimento\Ferramentas.jabba\jdk\[email protected]\bin\java.exe wasn't found. If you believe this is an error - plea
se create a ticket at https://github.com/shyiko/jabba/issue (specify OS and command that was used)

I think the problem is the downloaded zip format file isn´t the expected by the jabba exe (because of folder inside zip).

Support for traditional command prompt on Windows

Currently, jabba has a powershell wrapper that uses the --fd3 "hidden" option to write a temporary powershell script with export statements in it for PATH, JAVA_HOME and JAVA_HOME_BEFORE_JABBA.

It would be much awesome if, next to jabba.ps1, there would be a jabba.bat that can be used from the regular cmd.exe command prompt. Looking at it roughly, replace export with set and change the quoting (you would quote the whole, like so: set "WHAT=is this crazy batch stuff").

Raspberry Pi problem

Hi, jabba doesn't work on Raspberry Pi (Raspbian armv7l )

curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh

Installing v0.9.0...

/home/pi/.jabba/bin/jabba does not appear to be a valid binary.

Check your Internet connection / proxy settings and try again.

If the problem persists - please create a ticket at https://github.com/shyiko/jabba/issue.

When I read jabba binairie file :

cat .jabba/bin/jabba
Not Found

Cannot install Java 7 on MacOSx

MacOSx 10.12.5

MacBook-Pro:~ aruizca$ jabba install 1.7
Downloading 1.7.80 (http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-macosx-x64.dmg)
7073/7073
Mounting /var/folders/6z/tqx78p3d7x7ftzx_5h2jk8zm0000gn/T/jabba-d-056495298
hdiutil: mount failed - image not recognized

'hdiutil mount -mountpoint /var/folders/6z/tqx78p3d7x7ftzx_5h2jk8zm0000gn/T/jabba-i-540861753/jabba-d-056495298 /var/folders/6z/tqx78p3d7x7ftzx_5h2jk8zm0000gn/T/jabba-d-056495298' failed: exit status 1

Fish Shell Support

Will be there love for fish lovers ?
https://fishshell.com/

λ curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh                                                                           (~) 13:26:31
Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
fish: curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh
                                                                             ^
λ curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash; and . ~/.jabba/jabba.sh                                                                         (~) 13:26:31
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6335  100  6335    0     0   6801      0 --:--:-- --:--:-- --:--:--  6797
Installing v0.2.0...

Adding source string to /Users/zevg/.bash_profile

Installation completed
(if you have any problems please report them at https://github.com/shyiko/jabba/issue)
Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
~/.jabba/jabba.sh (line 13): [ ! -z "$(jabba alias default)" ] && jabba use default
                                                                ^
from sourcing file ~/.jabba/jabba.sh
    called on line 151 of file /usr/local/Cellar/fish/2.2.0/share/fish/config.fish

in function '.'
    called on standard input

source: Error while reading file '/Users/zevg/.jabba/jabba.sh'

current index for ls-remote corrupt?

I'm new to jabba but it seems like that the index (at least for windws) is corrupt. ls-remotes lists actual sdk as single numbers (without sdk@ prefix), i.e: 1.9.0

Error when executing 'jabba ls-remote'

This warning gets triggered when executing jabba ls-remote .

➜  ~ jabba ls-remote
Get https://github.com/shyiko/jabba/raw/master/index.json: x509: certificate signed by unknown authority

System:
macOS10.12 using zsh

Add option to specify Jabba storage directory

Hi!
I was getting acquainted with Jabba and found that currently there is no way to set Jabba directory - it will always stay ~/.jabba. I think it would be cool to let user set it to anything else:

  • It would allow perfectionists to keep their home clean
  • It would allow system-global Jabba installs. System administrator may install Jabba as /usr/local/share/jabba with some default set of Java versions, and end users would have an option to keep a local Jabba installation if needed and switch from one to another.

Allow switching to globally installed JDKs

I would like jabba to be able to switch to globally installed JDK versions. I happen to have a 1.7 and 1.8 installed globally (in /Library on macOS) and would really like them to be included in the list of jabba JVMs that can be switched to.

Can't install [email protected] on OS X 10.11.6

>  jabba install [email protected]
Downloading [email protected] (http://cdn.azul.com/zulu-pre/bin/zulu9.0.0.3-ea-jdk9.0.0-macosx_x64.zip)
107162597/107162597
Extracting /var/folders/7p/lgzy74_52pzcszdwllr3whyw0000gn/T/jabba-d-764245852 to /Users/inanc/.jabba/jdk/[email protected]/Contents/Home
-bash: exportommand not found
-bash: 49: command not found
-bash: 00m: command not found
-bash: 49: command not found
-bash: 00mPATHommand not found
-bash: 49: command not found
-bash: 00m=ommand not found
-bash: 49: command not found
-bash: 00m/Users/inanc/.jabba/jdk/[email protected]/Contents/Home/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:/usr/local/sbin:/usr/local/redis/bin:/bin:/usr/bin:/usr/sbin:/sbin:./bin:/Users/inanc/bin:/Users/inanc/dev/bin:/Users/inanc/ImageMagick-6.8.8/bino such file or directory
-bash: 49: command not found
-bash: 00m: command not found
-bash: 49: command not found
-bash: 00m: command not found
-bash: 49: command not found
-bash: 00mJAVA_HOMEommand not found
-bash: 49: command not found
-bash: 00m=ommand not found
-bash: 49: command not found
-bash: 00m/Users/inanc/.jabba/jdk/[email protected]/Contents/Homeo such file or directory
-bash: 49: command not found
-bash: 00m: command not found
-bash: 49: command not found
-bash: 00m: command not found
-bash: 49: command not found
-bash: 00mJAVA_HOME_BEFORE_JABBAommand not found
-bash: 49: command not found
-bash: 00m=ommand not found
-bash: 49: command not found
-bash: 00mommand not found
-bash: 49: command not found
-bash: 00m: command not found

doesnt it work for browsers?

I´m trying to switch the java version for use with windows browsers, but it doesnt work, is this software meant only for terminal use?

Licence?

Out of curiosity, what licence is this provided under?

Feature Request : Add option for Azul Zing

Hi @shyiko

I discovered jabba a few days ago and this is a fantastic tool - thanks 👍

However, I was wondering if you'd add support for Azul Zing JDK. I know that It requires license keys and stuff so perhaps it'd be sensible to just operate upon the downloaded version like,

jobba zing@xyz ~/path/to/zing/tar

Looking forward to your thoughts on this one.

Permission denied

When I try to use jabba, this error message is always displayed:

jabba:2: permission denied: /home/ngo/.jabba/bin/jabba
rm: remove regular empty file ‘/tmp/jabba-fd3.qAk9Ma’?

qAk9Ma string is always different.

I think installation fails, how can I fix it ?

Link: .jabba/jdk folder not created automatically

Trying to link an old existing jdk on Linux
jabba link [email protected] /home/davide/opt/jdk1.6.0_29
jabba fails complaining
symlink /home/davide/opt/jdk1.6.0_29 /home/davide/.jabba/jdk/[email protected]: no such file or directory
The missing folder is /home/davide/.jabba/jdk.
The issue disappears after running
mkdir -p /home/davide/.jabba/jdk

I guess it is an uncommon corner case, since on this host/user combo Jabba has never been used previously. It follows that the folder has not been created by means of other commands.

JAVA_HOME does not set in fish shell

The following is the output of fish shell:

tshen@tom-shen ~> jabba ls
[email protected]
tshen@tom-shen ~> jabba use [email protected]
tshen@tom-shen ~> echo $JAVA_HOME

tshen@tom-shen ~> which javac
/home/tshen/.jabba/jdk/[email protected]/bin/javac

The following is output of bash

tshen@tom-shen ~> bash
[tshen@tom-shen ~]$ jabba ls
[email protected]
[tshen@tom-shen ~]$ echo $JAVA_HOME

[tshen@tom-shen ~]$ jabba use [email protected]
[tshen@tom-shen ~]$ which javac
~/.jabba/jdk/[email protected]/bin/javac
[tshen@tom-shen ~]$ echo $JAVA_HOME
/home/tshen/.jabba/jdk/[email protected]

It's obvious that jabba does not set JAVA_HOME correctly in fish shell.

Bug?

I get this when I try to install and run...any ideas? OSX 10.10.5

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   259  100   259    0     0    733      0 --:--:-- --:--:-- --:--:--   733
Installing v...

Skipped update of /Users/myUser/.bashrc (source string already present)
Skipped update of /Users/myUser/.bash_profile (source string already present)
Skipped update of /Users/myUser/.profile (source string already present)
Skipped update of /Users/myUser/.zshrc (source string already present)

Installation completed
(if you have any problems please report them at https://github.com/shyiko/jabba/issue)
/Users/myUser/.jabba/bin/jabba: line 1: {error:Not Found}: command not found

myUser~ $ jabba ls
/Users/myUser/.jabba/bin/jabba: line 1: {error:Not Found}: command not found
myUser~ $ cat /Users/myUser/.jabba/bin/jabba
{"error":"Not Found"}

Jabba for Raspberry Pi

Can you build a release for Raspberry Pi (arm) please? The script installs an Intel 32 instead.
Thank you.

Installation instructions are dangerous for Linux/Mac

Like many other projects, the installation instructions for *nix users are dangerous. I suggest providing safer instructions or some other method that doesn't maintain the habit of running arbitrary code from the paste buffer. It could be as simple as first downloading and verifying the file before running it - and not pipe it to bash at all.

References:

https://blog.chef.io/2015/07/16/5-ways-to-deal-with-the-install-sh-curl-pipe-bash-problem/

https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/

https://github.com/ellotheth/pipethis

Java Oracle 1.8 installation

Hi,

In your example, you talk about the version 8 of Oracle JDK
Unfortunately, it does not seem to work.

Do you know why ? And if it could be downloadable with jabba
Which other JDK (Java 8) do you recommend between IBM, Zulu and Adopt ?

If the version 8 of Oracle is no more retrievable, maybe you could remove it from your documentation.

Thank you

Failing to install 1.8

When I run jabba install 1.8 I'm seeing:

Downloading 1.8.112 (http://download.oracle.com/otn-pub/java/jdk/8u102-b15/jdk-8u112-linux-x64.tar.gz)
7073/7073
Extracting /tmp/jabba-d-494731954 to /home/ubuntu/.jabba/jdk/1.8.112

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

'tar xzf /tmp/jabba-d-494731954 --strip-components=1 -C /home/ubuntu/.jabba/jdk/1.8.112' failed: exit status 2

When I visit that URL I see:

image

ibm will not be shown with ls-remote

jabba ls-remote
1.9.0-149
1.9.0-148
1.9.0-147
1.9.0-146
1.9.0-145
1.9.0-144
1.9.0-143
1.9.0-142
1.9.0-141
1.9.0-140
1.9.0-139
1.9.0-138
1.9.0-137
1.9.0-136
1.9.0-135
1.9.0-134
1.9.0-133
1.9.0-132
1.9.0-131
1.9.0-130
1.9.0-129
1.9.0-128
1.9.0-127
1.9.0-126
1.9.0-125
1.9.0-124
1.9.0-123
1.9.0-122
1.9.0-121
1.9.0-120
1.9.0-119
1.9.0-118
1.9.0-110
1.8.112
1.8.111
1.8.102
1.8.101
1.8.92
1.8.91
1.8.77
1.8.74
1.8.73
1.8.72
1.8.71
1.8.66
1.8.65
1.8.60
1.8.51
1.8.45
1.8.40
1.8.31
1.8.25
1.8.20
1.8.11
1.8.5
1.8.0
1.7.80
1.7.79
1.7.76
1.7.75
1.7.72
1.7.71
1.7.67
1.7.65
1.7.60
1.7.55
1.7.51
1.7.45
1.7.40
1.7.25
1.7.21
1.7.17
1.7.15
1.7.13
1.7.11
1.7.10
1.7.9
1.7.7
1.7.6
1.7.5
1.7.4
1.6.65
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

Typo in link in the after install message (--> HTTP404)

Installation completed
(if you have any problems please report them at https://github.com/shyiko/jabba/issue)

should be read as:

Installation completed
(if you have any problems please report them at https://github.com/shyiko/jabba/issues)

(note the plural s in issues)

file exist error.

➜ ~ jabba help
jabba:2: file exists: /tmp/jabba-fd3.SWJP3I
➜ ~ .jabba/bin/jabba ls
1.9.0-152
1.8.112
[email protected]
[email protected]

Can you examine this problem? I can execute directly the command from the bin folder. The command with full path, however, doesn't seem to work.

Thank you.

Link to "latest Java version"

Right now, if you set up any references to JVMs, you'll put the patch number in the location. For example,

  <!-- JDK toolchains -->
  <toolchain>
    <type>jdk</type>
    <provides>
      <version>1.8</version>
      <vendor>oracle</vendor>
    </provides>
    <configuration>
      <jdkHome>/Users/steven/.jabba/jdk/1.8.77/Contents/Home</jdkHome>
    </configuration>
  </toolchain>

It would be nice if Jabba could maintain a 1.8 jdk which is a symlink to the latest installed 1.8.x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.