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

Issues with building Java examples #30

Open
boonier opened this issue Apr 21, 2022 · 3 comments
Open

Issues with building Java examples #30

boonier opened this issue Apr 21, 2022 · 3 comments

Comments

@boonier
Copy link

boonier commented Apr 21, 2022

@kunstmusik I'm getting a build error when using the Ant method to build the examples on macOS Monterey (M1 silicon)

[javac] /Users/boonier/GIT/csoundAPI_examples/java/src/csoundapiexamples/Example1.java:18: error: package csnd6 does not exist
[javac] import csnd6.Csound;

Is the build config not finding the required Csound6 libs? The build.xml references the netbeans build config:

<import file="nbproject/build-impl.xml"/> in which I assume the class path is:

javac.classpath=\ ${libs.csnd6.classpath}

I assume this means the config though Netbeans, which I am not using.

I've got the usual symlinks in /Library/Java/Extensions for csnd6.jar and lib_jcsound6.jnilib

Any ideas?

many thanks

@boonier
Copy link
Author

boonier commented Apr 21, 2022

To add, I tried this on an intel based mac and got the same issues too, so my suspicions that it might be an incompatible build of Csound were quashed.

@kunstmusik
Copy link
Member

I think this is a Netbeans issue. The project is configured to use a global Library configured in Netbeans. If you open project properties you might see:

image

If so, then hit the + button to add Library, then create one called csnd6 and set it to point to the csnd6.jar on your system.

image

Afterwards, hit the Remove button for the older library entry:

image

At that point, you might get java.lang.UnsatisfiedLinkError (at least, that happened here). Perhaps it'd be best to update the examples to use maven or gradle and to use my csoundJNI library which is a bit easier to setup.

@boonier
Copy link
Author

boonier commented May 12, 2022

Thanks @kunstmusik, I'm a little out of the picture in regard to the Java ecosphere, so not too sure about how to go about the setup of this toolchain. When I get some time I'll dig in and have a look!

Your csoundJNI lib is what you use for Blue, right?

Thanks :)

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