-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5/21/14, 4:51 PM, Alexander Hansen wrote:
> Anybody happen to know what the best way to handle builds against 
> Oracle's JDKs?  They don't use a framework, there's not an
> unversioned link anywhere so using hardcoded paths is fragile, and
> the preferred method of @rpath is problematic because of those
> hardcoded paths--in particular I'm thinking about libjvm.dylib,
> which typically has the following:

Is there anything that actually links against libjvm.dylib?  There
shouldn't be...

The JNI interface/header hasn't changed since at least 1.5 (other than
adding a #define at the top for eg JNI_VERSION_1_8.  When building JNI
libraries, you should be allowing undefined symbols so that you only
make a .jnilib/.so with no references to libjvm.dylib.

The only reason you should care about which JDK you're pointing at,
for building purposes, is:

1) Newer versions make jar files that are incompatible with older
   ones, so if you want your jar to be loadable in a 1.6 JVM,
   you should build it with a 1.6 or older JVM.  Alternatively,
   sometimes it's OK to pass "-target 1.6" to a newer javac and
   it will build a jar file compatible with the 1.6 JVM, but that
   can be problematic if the code uses class libraries that have
   changed in the newer JDK.
2) The code itself is using a particular flavor of java source
   (ie, it is using source code constructs that only work with JDK
   6 or higher).

If you're only building a JNI module against jni.h, you should be able
to use literally any JDK that's on supported versions of OSX at this
point, and it'll load.  The companion java code that comes with most
JNI modules, however, is still subject to the rules above, but you
shouldn't have to worry about library paths at build time.  Just
finding an appropriate javac.

- -- 
Benjamin Reed a.k.a. Ranger Rick a.k.a. Raccoon Fink
Open Source and Mac OS X development

Blog: http://me.raccoonfink.com/
Music: http://music.raccoonfink.com/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iD8DBQFTfRqEUu+jZtP2Zf4RAkJZAJ48uwrlsqB82t+bdLfwinHiVgtgtACgiuS7
m4BpW8VoLZSzw7vtSdN4UIs=
=VC/b
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to