Skip to content

Commit

Permalink
feat(#5): update README
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Nov 22, 2023
1 parent 696d83f commit 329edf7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
In your Java application you may want to run another Java application.
In order to do this, you need to know where is the `bin/java` executable.
It's in the `JAVA_HOME` (environment variable), which is not always set.
Instead of looking for this place manually, just use this small one-class library.
Instead of looking for this place manually, just use this small one-class
library.

First, you add this to your `pom.xml`:

```xml

<dependency>
<groupId>com.yegor256</groupId>
<artifactId>jhome</artifactId>
Expand All @@ -34,10 +36,19 @@ Path p = new Jhome().path("bin/java");
```

The result is the location of `bin/java` inside `JAVA_HOME`.
Also, you can use `java()` and `javac()` methods in order to get the full path
to `java` and `javac` executables respectively:

```java
import com.yegor256.jhome;
Path java = new Jhome().java();
Path javac = new Jhome().javac();
```

## How to Contribute

Fork repository, make changes, send us a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).
Fork repository, make changes, send us
a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).
We will review your changes and apply them to the `master` branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:
Expand Down

0 comments on commit 329edf7

Please sign in to comment.