8000 Building experimental branch from source fails with "javac: invalid target release: 1.8" · Issue #433 · axoloti/axoloti · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Building experimental branch from source fails with "javac: invalid target release: 1.8" #433

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

Open
simonvanderveldt opened this issue Aug 1, 2018 · 2 comments

Comments

@simonvanderveldt
Copy link
Contributor
simonvanderveldt commented Aug 1, 2018

Just tried to build from source to try out the changes in the experimental branch to see if it helps with #3 but unfortunately the build fails. Since the Linux build script depends on openJDK 7 I'm using an Ubuntu 14.04 image as my starting point (I'm running the build in a container), a couple of minor things are missing from the build script like installing build-essential and unzip but with that fixed the majority of the build works until it fails with the message:

-do-compile:
    [javac] Compiling 738 source files to /root/axoloti/build/classes
    [javac] javac: invalid target release: 1.8
    [javac] Usage: javac <options> <source files>
    [javac] use -help for a list of possible options

I guess this means the build actually requires JDK 8 instead of 7? Or is this caused by something else?

[edit] Seems like the experimental branch needs JDK 8. So I guess the build script on that branch needs to be updated as well?

@simonvanderveldt simonvanderveldt changed the title Building from source fails with "javac: invalid target release: 1.8" Building experimental branch from source fails with "javac: invalid target release: 1.8" Aug 1, 2018
@zrnsm
Copy link
Contributor
zrnsm commented Aug 1, 2018

I think that the dependency on openjdk-7 is a mistake in the build script that just hasn't been changed. I'm on Bionic 18.04 which no longer has an openjdk-7 package. But apparently the script was not actually stopping at that point. We probably need a more sophisticated strategy for java versioning on Linux. We're basically having the user install something and then we're expecting ant to actually execute on the JVM we installed. But just starting ant will take whatever java is selected via the alternatives mechanism at least on an Ubuntu machine. Let me think about a better strategy for this.

Interestingly the netbeans project does declare a 1.8 source level:

javac.source=1.8

And then build.xml actually has a dependency on the netbeans project stuff:

<import file="nbproject/build-impl.xml"/>

We need to be more explicit in the command line build. I'm not a netbeans user myself, and I'd like to see us get to a point where we aren't depending on it unless someone decides to use it.

@simonvanderveldt
Copy link
Contributor Author

@nicolasmiller I made a quick PR to make the build script work again. We can keep this issues open for a more structural fix for managing the JDK version or create a new issue for that if you prefer that :)

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

No branches or pull requests

2 participants
0