Skip to content

Commit

Permalink
improved readme
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jan 28, 2015
1 parent 3333de9 commit 8704123
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,32 @@ Automatically change `JAVA_HOME` based on current directory `pom.xml`

For now, only Ubuntu and OSX are supported.

### Usage

```sh
git clone https://github.com/caarlos0/jvm.git ~/.jvm

# for bash
echo "source ~/.jvm/jvm.sh" >> .bashrc

# for zsh
echo "source ~/.jvm/jvm.sh" >> .zshrc
```

Then, just `cd` to a java project folder. If the `pom.xml` has a
`<java.version>1.7</java.version>`, for example, jvm will try to
set JDK7 to your PATH.

If you don't have and don't want to have this in your project's pom,
you can also do this:

```sh
echo 7 >> .java-version
```


### TODO

- Add support for more platforms (maybe via some config file);
- Better documentation;
- Tests;
- Maybe use update-java-alternatives on ubuntu and /usr/libexec/java_home on mac

0 comments on commit 8704123

Please sign in to comment.