I have a java project that uses JOGL and therefore needs to include different native libraries for different platforms. Now I want to set up the eclipse project to automatically chose the correct libraries. In the .classpath file you can specify one native location:
<classpathentry kind="lib" path="lib/jogl/jar/jogl.all.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="de.yogularm.desktop/lib/jogl/windows-amd64"/>
</attributes>
</classpathentry>
If multiply classpathentries specify a native location, Eclipse also tries to load the libraries for other platforms and fails.
How can I make eclipse chose the directory? I want to share the project and make setup for further developers as easy as possible.
You can create several .classpath files (.classpath_Windows, .classpath_Linux etc.) and then create symbolic link to required version (Win/Lin/Mac) named ".classpath"
The problem will appear whan you want to change any entry inside any .classpath_XXXXXXX - then you will have to update other .classpath files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With