Skip to content
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

Remove java cross-comp options, include debuginfo #144

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

staticlibs
Copy link

When compiling Java part with JDK 11 (or later), the current javac options -source 1.8 and -tatget 1.8 are ineffective. Resulting bytecode format is compatible with JDK 8, but cannot be run on JDK 8 because it is compiled against the bootstrap classpath of JDK 11 and depends on methods not available in JDK 8.

This change removes these cross-compilation flags. It is assumed, that official release binaries are always built with JDK 8. For users/packagers, who is going to build the driver from source, a CMake configure-time warning about JDK 8 compatibility is added.

Additionally Java debuginfo is added to the JAR (-g flag). It does not affect the performance and the JAR size increase is minor (less than 10KB).

Fixes: #143

When compiling Java part with JDK 11 (or later), the current javac
options `-source 1.8` and `-tatget 1.8` are ineffective. Resulting
bytecode format is compatible with JDK 8, but cannot be run on JDk 8
because it is compiled against the bootstrap classpath of JDK 11 and
depends on methods not available in JDK 8.

This change removes these cross-compilation flags. It is assumed, that
official release binaries are always built with JDK 8. For
users/packagers, who is going to build the driver from source, a
CMake configure-time warning about JDK 8 compatibility is added.

Additionally Java debuginfo is added to the JAR (`-g` flag). It does
not affect the performance and the JAR size increase is minor (less
than 10KB).

Fixes: duckdb#143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JDBC driver built with JDK 11 cannot be used with JDK 8
1 participant