mardi 30 septembre 2014

Interface between 2 java Applications - How to use path to second application


Vote count:

0




I am writing an interface between 2 java applications. Application 1 is built on top of an Eclipse RCP framework, and is the starting point of my interface. The code I am writing is built within a plugin and loaded via an update site into Application 1. (fairly happy with this part).


My issue then is how to reference the 2nd Application from within this plugin.


Currently, for development I have bundled all of the Application 2 JARs into a separate project, and then referenced this bundled project from my development plugins for Application 1. This works inside Eclipse, but has numerous problems when trying to include this as part of the update site. Not least of which is that the JARs don't belong to us, and therefore re-packaging and distributing them is a no-no.


In my deployed environment, I can assume that Application 2 will be installed on the client machine, along with the required JARs, but I don't necessarily know where they will be installed, or what version they will have.


So I see a number of options, but whether they are correct or not I don't have the experience in deploying Java applications to be able to tell.


Options:



  1. Update command line for Application 1 to specify the classpath for JARs for Application 2.

  2. Use Preferences window inside Application 1 (because this is based on Eclipse RCP), and create a customised ClassLoader for the JARs in Application 2.

  3. Create a cut-down version of the bundled JARs for Application 2 and deploy these through the update site (I have been trying this, but have hit the wall again, and can't help feeling there is a better way).


A secondary question for my plugin development is, How can I tell 'nicely' whether Application 2 is configured and installed ? so that I can gracefully exit my plugin, and perhaps give the user a nice message.



asked 27 secs ago







Interface between 2 java Applications - How to use path to second application

Aucun commentaire:

Enregistrer un commentaire