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

Can't compile on Linux #6

Open
stefan-reich opened this issue Oct 8, 2021 · 1 comment
Open

Can't compile on Linux #6

stefan-reich opened this issue Oct 8, 2021 · 1 comment

Comments

@stefan-reich
Copy link

Hi, is it possible that opus-jni is meant for a very old JDK? I am trying to build it with JDK 16.

First, I had to do a workaround because javah has been retired long ago (it's now javac -h).

Then I get this error:

> Task :opus-jni-java:generateJniHeaders FAILED
[JNI | GEN | ERR] error: Class names, 'net.labymod.opus.OpusCodec', are only accepted if annotation processing is explicitly requested
[JNI | GEN | ERR] 1 error

Greetings

@jan-br
Copy link
Contributor

jan-br commented Oct 10, 2021

Hi,
yes this is quite an old project. And it was meant to be compatible with JDK 8.
This library was built under quite a bit of time pressure. So it is not really designed to be that future-proof.

I assume there are third party gradle plugins out there that can replace the java header file generation with JDK version safety.
If I find the time for it, I might look into it.
But for a quick fix you could just replace the javah command in your local repository of the project.
The error you sent in should also be easy to fix.
Try to replace in the generateJniHeaders task net.labymod.opus.OpusCodec with net.labymod.opus.OpusCodec.java.

Also, If you have the time for it, you could also prepare a PR to fix the whole thing more neatly. :)

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