Skip to content

Commit 05d2963

Browse files
committed
v0.1.9
1 parent 4c883ed commit 05d2963

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "java-locator"
3-
version = "0.1.8"
3+
version = "0.1.9"
44
authors = ["aston <[email protected]>"]
55
description = "Locates a Java installation in the host."
66
keywords = ["java", "jni"]

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ The latter two commands should return something like:
6565

6666
> /usr/lib/jvm/java-11-openjdk-amd64/lib
6767
68+
## Available Features
69+
70+
* `build-binary`: Generates a `java-locator` executable
71+
* `locate-jdk-only`: Instructs `java-locator` to locate __only JDKs__.
72+
73+
In a system that has only JREs installed, `java-locator` will not find any Java installation if this feature is enabled.
74+
75+
This feature also solves issues when using JDK 8: In usual installations, the symlinks of the `java` executable in the `$PATH`
76+
lead to the `jre` directory that lies inside the JDK 8. When `$JAVA_HOME` is not defined in the system, `java-locator` attempts to locate the
77+
Java installation following the symlinks of the `java` executable. Having done that, it cannot locate development artifacts like `jni.h` headers,
78+
`javac` etc. With this feature enabled though, `java-locator` will locate development artifacts normally.
79+
6880
## License
6981

7082
At your option, under:

src/lib.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,17 @@ The latter two commands should return something like:
7878
7979
> /usr/lib/jvm/java-11-openjdk-amd64/lib
8080
81-
## Extra Features
81+
## Available Features
8282
83-
* `locate-jdk-only`: Attempts to locate the JDK by searching for the Java compiler,
84-
as opposed to searching for the runtime.
85-
This solves issues in JDK 8 where the JRE resides in a subdirectory and not in the JDK root,
86-
so development files are not found in JAVA_HOME as would be expected.
83+
* `build-binary`: Generates a `java-locator` executable
84+
* `locate-jdk-only`: Instructs `java-locator` to locate __only JDKs__.
85+
86+
In a system that has only JREs installed, `java-locator` will not find any Java installation if this feature is enabled.
87+
88+
This feature also solves issues when using JDK 8: In usual installations, the symlinks of the `java` executable in the `$PATH`
89+
lead to the `jre` directory that lies inside the JDK 8. When `$JAVA_HOME` is not defined in the system, `java-locator` attempts to locate the
90+
Java installation following the symlinks of the `java` executable. Having done that, it cannot locate development artifacts like `jni.h` headers,
91+
`javac` etc. With this feature enabled though, `java-locator` will locate development artifacts normally.
8792
8893
## License
8994

0 commit comments

Comments
 (0)