Skip navigation
Brruce
Currently Being Moderated

Java Implementation

May 6, 2011 8:23 AM

I am just starting out with XMP. I have read through the documentation, downloaded and reviewed the SDK, and read through numerous forum entries. The API looks great, but I was wondering why only 1/2 the solution is provided for Java Developers? To me the more important (and technically challenging I think) is the XMPFiles piece. Parsing XML, while tedious, is comparatively straighforward.

 

Two questions:

1. Does Adobe plan to provide a Java implementation of XMPFiles any time soon?

2. Are there any open source OR at cost Java libraries that provide the XMPFiles capabilities?

 

Many Thanks,

Bruce.

 
Replies
  • Currently Being Moderated
    Aug 31, 2011 1:06 AM   in reply to Brruce

    It is only the XMP Core part of the tool kit that is has been converted to Java. To my knowledge there is no plan to do this. And given the complexity of the XMP Files part, I don't think it will happen anytime soon.

     

    I have no knowledge of any free or commercial Java versions of XMP Files.

     

    If you want to use the XMP Tool Kit with Java, you have to make a JNI. It's not too hard. Here is the basic steps, there are differences between the platforms:

     

    Mac:

    1. You need to make dynamic versions of the XMP Core and XMP Files. Duplicate the targets and make the required changes (5 or so I think)

    2. Create a Java JNI project where you basically map the functions you need to access.

    3. Create an Xcode projekt, where you include the C++ header you get from javah. Implement the C++ code to call the functions in the XMP Toolkit. You can choose the you make it  static link the dynamic XMP libs into the JNI. If you don't you need to make sure that your JVM also has access to the dynamic XMP libs (this makes it harder to distribute and maintain)

     

    PC:

    1. You need to make static versions of the XMP Core and XMP Files with settings a DLL, ie. all settings but the one that defines the final format need to match a DLL

    2. Create a Java JNI project where you basically map the functions you need to access (you can use the same project for both Mac og PC).

    3. Create a VS project, where you include the C++ header you get from javah. Implement the C++ code to call the functions in the XMP Toolkit. The JNI is a DLL but the XMP Core. Supplying all three as DLLs to the JVM is possible, but you will need to make some changes to the XMP Toolkit (or at least I had to when I tried, so I decided to not go that way - I think I read somewhere that someone had done this)

     

    It is also possible to create a Linux version, if you require this, You can use the Mac code with a few adjustments.

     

    Creatting 64-bit versions is possible, but on the PC you get a few warnings about indexs that will be chopped from 64-bit to 32-bit, so use these with caution.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2012 3:04 AM   in reply to T Schneider

    Hi T Schneider,

     

    I've got the same requirement as Brruce and about to start developing the JNI code... The only question I've got about your answer is concerning this sentence:

     

    You need to make dynamic versions of the XMP Core and XMP Files. Duplicate the targets and make the required changes (5 or so I think)

    What does that exactly mean?

    I guess I can figure out the rest.

     

    Regards,

    Adei

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2012 3:44 AM   in reply to amandaluniz_z

    Hi Adel,

     

    In XCode you duplicate the static release targets. Then you edit the build settings to make it build a dynamic library. If you are not sure which settings need to be change, create a dynamic lib from the template and compare the build settings.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 5, 2012 2:54 AM   in reply to T Schneider

    Hi Schneider,

     

    When trying to build it, I get the following error.... I needed to change the MacOS sdk as i'm in 10.6:

     

    i686-apple-darwin10-llvm-gcc-4.2: /Users/myuser/Projects/clients/the_client/XMP-Toolkit-SDK-5.1.2/build /xcode3/../../source/XMPCore/../../third-party/expat/lib/xmlparse.c: No such file or directory

    i686-apple-darwin10-llvm-gcc-4.2: warning: '-x c' after last input file has no effect

    i686-apple-darwin10-llvm-gcc-4.2: no input files

    Command /Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

    I guess it is because of the "../.." of the paths.... but I wonder if it's just me getting that error...

     

    Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 5, 2012 4:08 AM   in reply to amandaluniz_z

    Hi,

     

    I think your are missing something (hit: you have to install 3-party software yourself). Make sure that you can build and run the tests in the SDK Toolkit, before making changes. I can also see, that you are using v4.2 of gcc. I would consider using v4.0 and building against the OS X 10.5 SDK instead.

     

    -- Thomas

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2012 6:41 AM   in reply to T Schneider

    Has anyone succeeded in making the JNI library work? I need to do the same thing and would be happy to help or contribute as I can. I'd be happy to set up an open-source project to serve the result if that's appropriate.

     

    Cheers,

     

    Eliot

    RSI Content Solutions, rsicms.com

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2012 6:51 AM   in reply to ekimber

    Hi Eliot....

     

    I kind of got it working... Let me check the code out and I'll get back to you, ok?

     

    Adei

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2012 7:24 AM   in reply to amandaluniz_z

    That would be most helpful, thanks.

     

    Cheers,

     

    Eliot

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 14, 2012 11:41 AM   in reply to amandaluniz_z

    Hi Adei,

     

    Any update? I might be interested in using this if it exists.

     

    Regards,

    Peter

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points