[OpenJDK 2D-Dev] Name clash when using the system libjpeg

Phil Race philip.race at oracle.com
Wed Apr 30 19:22:11 UTC 2014

On 4/30/2014 11:52 AM, Omair Majid wrote:
> In another thread, it was pointed out that j2 stands for "Java to". As
> in "Java to lcms".
Really ? That is not something that was obvious to me ..

>> Presumably libjavajpeg.so would also be just the 'stub' code that via JNI
>> interfaces to the exported interfaces of the system libjpeg ?
> Yes, exactly.
> If using the system libjpeg, this library would only contain JNI code. It
> would call into the system libjpeg for actual libjpeg-related
> functionality.
> If using the bundled libjpeg, the bundled libjpeg code gets built and
> included into libjavajpeg.so too. So both the stub JNI and libjpeg code
> are included in this libjavajpeg.so.
> Either way, there would be no libjpeg.so built. The JDK code will always
> System.load("javajpeg") which would do the right thing. Does this make
> sense?
> Thanks,
> Omair

Ah .. you are also proposing to change the name of the file even when we 
don't use
a system libjpeg.  I thought you were proposing this only in the case 
when an external
libjpeg was used so we don't load two .so's with the same name.
But I suppose the System.load would otherwise need to know what to do.
  Whilst I can't think what problem this would cause also this hasn't 
been an
issue in the last 20 years. So we can try this .. but you'll need to 
make sure you
catch all the APIs (inc splashscreen) that load this library.


More information about the 2d-dev mailing list