-
Notifications
You must be signed in to change notification settings - Fork 176
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
Method flip()Ljava/nio/ByteBuffer; does not exist in class java.nio.ByteBuffer #497
Comments
That's an odd error message. |
ABCL has worked in Doppio before, btw. I remember testing it. |
This problem also happens when you build the software with JDK 9 with target JDK 8, because in JDK9 ByteBuffer.flip() returns a ByteBuffer... It used to return a Buffer in JDK8. And then you try to run this on JDK8 you get exactly this error. Java-Workaround: Just cast your ByteBuffer to Buffer before calling flip()... i.e. Note: This is not really related to this project, I only use pure java. But I found this problem report and thought you might be interested in a workaround for this. |
Thanks for the tip; I didn't realized JDK9 had some breaking changes like that! It'd be nice to move to JDK9 someday. |
My understanding is that the "correct" way to generate .class files with JDK 9 javac that can be run under JDK 8 java is to not only pass -target 1.8, but to also to set an appropriate bootclasspath, eg. (if This way, you will also get an error at compilation time (rather than JDK 8 runtime) if your .java code is trying to use any JDK 9 APIs that don't exist in JDK 8 at all. If you're not doing this, then javac will warn you: What javac is trying to tell you with that warning is that the resulting class files might not work under JDK 8's java, because of the above two problems. |
Or, more simply, you could use: |
…ng to JDK 7 from JDK9+ compilers. Details: plasma-umass/doppio#497
This works around an issue with using JDK9 to build the project. plasma-umass/doppio#497 (comment)
修复当使用jdk9编译的class运行于jdk8时buf.clear()错误的问题 plasma-umass/doppio#497
Attempting to run ABCL triggers this error.
ABCL is from https://common-lisp.net/project/armedbear/
The text was updated successfully, but these errors were encountered: