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

"jar" not found #510

Closed
andrea5w opened this issue Sep 7, 2021 · 3 comments
Closed

"jar" not found #510

andrea5w opened this issue Sep 7, 2021 · 3 comments

Comments

@andrea5w
Copy link
Contributor

andrea5w commented Sep 7, 2021

Hello!!!

I am running configure on my (standard) Ubuntu machine, and when I run configure, the scripts stops with the following error:

checking for gcj... no
checking for guavac... no
checking for jikes... no
checking for javac... javac
checking if javac works... yes
checking if javac supports -h... yes
checking for javac... /usr/bin/javac
checking symlink for /usr/bin/javac... /etc/alternatives/javac
checking symlink for /etc/alternatives/javac... /usr/lib/jvm/jdk-14.0.2/bin/javac
checking jni headers... /usr/lib/jvm/jdk-14.0.2/include
checking for jar... no
configure: error: no acceptable jar program found in $PATH

The error goes away when I install a package like "default-jdk".

I suggest to adjust the configure script so that it does not terminate with an error message if "jar" is not found; this can be annoying if one wants to install Ipopt but does not need the java interface.

@svigerske
Copy link
Member

svigerske commented Sep 8, 2021

I even have comment on that in configure.ac:

Ipopt/configure.ac

Lines 413 to 422 in bae155b

if test "$enable_java" != no ; then
# the following macros can make configure stop with an error
# we could work around that, but having javac and no jar, java, or javadoc would be odd anyway
# look for jar: required to pack Java interface
AX_PROG_JAR
# look for more java to run tests and examples and do documentation
AX_PROG_JAVA
AX_PROG_JAVADOC
fi

So if passing --disable-java is not a viable option, we can look into adding more flexibility. Unfortunately, that would mean to not use the AX_PROG_JAR macro. (PS: ok, that macro has very little own logic anyway)

svigerske added a commit that referenced this issue Sep 8, 2021
- skip java interface check if can compile java, but cannot run java
- let make javadoc fail if javadoc is not found
- use @java@ in unittests
- skip check whether java works (only the test might fail)
@andrea5w
Copy link
Contributor Author

andrea5w commented Sep 8, 2021 via email

@svigerske
Copy link
Member

But I have already changed configure to only give a warning and disable the build of the java interface if jar is not around, see the commit that closed this issue. So now, the Java interface isn't build anymore if there is no javac or no jar and the test is skipped if there is no java.

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