Sonntag, September 05, 2010

some Java and Eclipse pitfalls on OS X

Could not compile Java code importing The error message is: Access restriction: Class is not accessible due to restriction on required library

fix: go to teh Java compiler sttings and open Errors/Warnings. Check the Deprecated and restricted API and change from Error to Warning.

Check downloaded files with ll -@ for Remove with sudo xattr -d

Some JNI libs need to be recompiled for Snow Leopard. Check with file for Mach-O 64-bit bundle x86_64.

Use System.out.println(System.getProperty("java.library.path")); in the line before the line before the class is loaded. Check if the library is in one of the paths listed. On OS X use /Library/Java/Extensions/.