Skip to content
Snippets Groups Projects
Commit 39d24ad8 authored by Louis-Philippe Véronneau's avatar Louis-Philippe Véronneau
Browse files

New upstream version 1.0.0

parent 51b9bb84
No related branches found
No related tags found
No related merge requests found
epl.html linguist-documentation
target
.cpcache/
# java.classpath Change Log
## 0.3.x series
## 0.2.x series
### Release [0.3.0] on 2018-May-06
* Fix [CLASSPATH-8]: empty classpath returned on Java 9.
Starting with Java 9, the default class loader is no longer an
instance of URLClassLoader, so `classpath` returned an empty sequence.
The strategy of using URLClassLoader started with release [0.2.0] to
accommodate Java application containers (see [CLASSPATH-1] and
[CLASSPATH-2]). After this change, application containers based on
URLClassLoader should still work as expected.
Latest development version is 0.2.4-SNAPSHOT, current Git `master` branch
On Java 9 without an application container, it appears that the
`java.class.path` system property is the only way to get the
classpath. While this is essentially a bugfix for Java 9
compatibility, it is a change in behavior, hence the version change
from 0.2 to 0.3.
## 0.2.x series
### Release [0.2.3] on 2015-Nov-06
......@@ -42,6 +59,7 @@ Latest development version is 0.2.4-SNAPSHOT, current Git `master` branch
[CLASSPATH-8]: http://dev.clojure.org/jira/browse/CLASSPATH-8
[CLASSPATH-7]: http://dev.clojure.org/jira/browse/CLASSPATH-7
[CLASSPATH-6]: http://dev.clojure.org/jira/browse/CLASSPATH-6
[CLASSPATH-5]: http://dev.clojure.org/jira/browse/CLASSPATH-5
......@@ -50,6 +68,7 @@ Latest development version is 0.2.4-SNAPSHOT, current Git `master` branch
[CLASSPATH-2]: http://dev.clojure.org/jira/browse/CLASSPATH-2
[CLASSPATH-1]: http://dev.clojure.org/jira/browse/CLASSPATH-1
[0.3.0]: https://github.com/clojure/java.classpath/tree/java.classpath-0.3.0
[0.2.3]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.3
[0.2.2]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.2
[0.2.1]: https://github.com/clojure/java.classpath/tree/java.classpath-0.2.1
......
......@@ -3,12 +3,10 @@ This is a [Clojure contrib] project.
Under the Clojure contrib [guidelines], this project cannot accept
pull requests. All patches must be submitted via [JIRA].
See [Contributing] and the [FAQ] on the Clojure development [wiki] for
See [Contributing] on the Clojure website for
more information on how to contribute.
[Clojure contrib]: http://dev.clojure.org/display/doc/Clojure+Contrib
[Contributing]: http://dev.clojure.org/display/community/Contributing
[FAQ]: http://dev.clojure.org/display/community/Contributing+FAQ
[Clojure contrib]: https://clojure.org/community/contrib_libs
[Contributing]: https://clojure.org/community/contributing
[JIRA]: http://dev.clojure.org/jira/browse/CLASSPATH
[guidelines]: http://dev.clojure.org/display/community/Guidelines+for+Clojure+Contrib+committers
[wiki]: http://dev.clojure.org/
[guidelines]: https://clojure.org/community/contrib_howto
......@@ -5,23 +5,23 @@ Examine the Java classpath from Clojure programs.
## Releases and Dependency Information
Latest stable release is 0.2.3
Latest stable release is 0.3.0
[Leiningen] dependency information:
[org.clojure/java.classpath "0.2.3"]
[org.clojure/java.classpath "0.3.0"]
[Maven] dependency information:
<dependency>
<groupId>org.clojure</groupId>
<artifactId>java.classpath</artifactId>
<version>0.2.3</version>
<version>0.3.0</version>
</dependency>
[Gradle] dependency information:
compile "org.clojure:java.classpath:0.2.3"
compile "org.clojure:java.classpath:0.3.0"
[Leiningen]: http://leiningen.org/
[Maven]: http://maven.apache.org/
......@@ -69,6 +69,11 @@ implementation, such as a Java application server, you can extend the
protocol `URLClasspath` to support it. Refer to the source for
details.
**Starting with version 0.3.0**, the `classpath` function will fall
back to the `java.class.path` system property if the parent
ClassLoader is not an instance of [URLClassLoader](https://docs.oracle.com/javase/9/docs/api/java/net/URLClassLoader.html),
which is true for Java 9 and later.
## Developer Information
......
{:paths ["src/main/clojure"]}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>java.classpath</artifactId>
<version>0.2.3</version>
<name>${project.artifactId}</name>
<version>1.0.0</version>
<name>java.classpath</name>
<parent>
<groupId>org.clojure</groupId>
<artifactId>pom.contrib</artifactId>
<version>0.1.2</version>
<version>0.2.2</version>
</parent>
<developers>
......@@ -20,6 +20,6 @@
<connection>scm:git:git@github.com:clojure/java.classpath.git</connection>
<developerConnection>scm:git:git@github.com:clojure/java.classpath.git</developerConnection>
<url>git@github.com:clojure/java.classpath.git</url>
<tag>java.classpath-0.2.3</tag>
<tag>java.classpath-1.0.0</tag>
</scm>
</project>
......@@ -69,7 +69,12 @@
(map io/as-file (get-urls loader)))
(defn classpath
"Returns a sequence of File objects of the elements on the classpath."
"Returns a sequence of File objects of the elements on the
classpath. Defaults to searching for instances of
java.net.URLClassLoader in the classloader hierarchy above
clojure.lang.RT/baseLoader or the given classloader. If no
URLClassloader can be found, as on Java 9, falls back to the
'java.class'path' system property."
([classloader]
(distinct
(mapcat
......@@ -77,7 +82,9 @@
(take-while
identity
(iterate #(.getParent ^ClassLoader %) classloader)))))
([] (classpath (clojure.lang.RT/baseLoader))))
([]
(or (seq (classpath (clojure.lang.RT/baseLoader)))
(system-classpath))))
(defn classpath-directories
"Returns a sequence of File objects for the directories on classpath."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment