-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.sql.* classes not available from the boot classpath #1
Comments
Filed with Clojure as http://dev.clojure.org/jira/browse/CLJ-2077 |
I can't comment on why -Xbootclasspath/a is being used but I'm curious why clojure.instant uses java.sql.Timestamp. I would think the java.time API (in the java.base) would be a better choice. |
@AlanBateman because this predates the existence of java.time, which was added in Java 8. Clojure currently supports back to Java 6. |
@AlanBateman: |
Okay, I just wanted to make you aware of java.time in case it was overlooked. It may be that clojure.instant could use that in the future. As regards the startup impact then has anyone profiled this to see if there are any opportunities? If Clojure is compiled to JDK 6 then I assume version 50.0 class files with stack maps, is that right? Just wondering if the verification is being done by type inference rather than type checking. In any case, if it is common to deploy it with -Xbootclasspath/a then the only types that you depend on being visible are the types in the java.base module. Yes, this is an incompatible change and stems from the effort to improve the security of the platform by moving non-core modules from the boot loader to the platform class loader (platform class loader replaced was used to be called the "extension" class loader). |
Clojure compiled code does not currently use stackmaps. |
Not all of the java standard library is available to the boot classloader, which prevents Clojure from loading if put on the boot classpath. This manifests as a failure to load
clojure.instant
, since it importsjava.sql.Timestamp
. This can be recreated with:This prevents Leiningen from working at all with Java 9, since the lein uberjar is loaded from the boot classpath to reduce startup time. See technomancy/leiningen#2149
The text was updated successfully, but these errors were encountered: