0

There is a question about deploy the jacob.dll. As we know jacob.dll is default set to put under the path C:\Windows\System32, is there any possible to change the default path like put it under another location?

The reason for asking this is because I create an Applet with jacob and a 3rd party dll, trying to provide it for client use. But the problem is, if they need to access the web page embedded with this Applet, they must put these native libraries into the default location(C:\Windows\System32) in the first place.I know if provide an .exe for client to install can solve this problem, but instead I thought is there any possible to change the location like put these native libraries on server(?) and make Applet to call these native libraries?

Lilly White
  • 175
  • 1
  • 3
  • 10
  • First, is your server running 32 bit windows? Second, is `jacob.dll` re-entrant? If both, then maybe... but you'll need an Applet to Server RPC mechanism. And the COM object that you're bridging would be on the server. And, I'm guessing you want to actually run on the client system. – Elliott Frisch Dec 11 '13 at 06:51
  • I don't really understand what is "jacob.dll re-entrant" mean, is that means reload jacob.dll into Applet? and Remote Procedure Call(RPC)---> is this the"RPC" you mentioned? – Lilly White Dec 11 '13 at 08:20
  • No. Jacob.dll re-entrant means can it work if you have two or more users? Yes for RPC. – Elliott Frisch Dec 11 '13 at 08:24
  • For deploying Java desktop apps., the best option is usually to install the app. using [Java Web Start](http://stackoverflow.com/tags/java-web-start/info). JWS works on Windows, OS X & *nix. Note that deploying with JWS makes 'access to natives' a whole lot simpler. – Andrew Thompson Dec 11 '13 at 08:51

1 Answers1

0

The solution is quite easy:

You can provide the jacob.dll (and your 3rd party dll for that matter) as part of your applet - so there is no local installation in any directory necessary. Jacob itself provides a quite nice applet example for that:

Download the jacob source from here and have a look at the applet example:

jacob-1.XX\samples\com\jacob\samples\applet 

There is a readme.txt file exactly describing what you must do - it even supplies an example applet calling some native activeX component to demonstrate its feasibility. It doesn't get easier than that...

Update:

To deploy an applet using an jnlp file have a look here.

Lonzak
  • 9,334
  • 5
  • 57
  • 88
  • Out of curiosity: Does the example show how to deploy an applet using JNLP? It is a far superior way of providing natives to applets, but it has only been possible since the 'plug-in 2 architecture' JREs introduced around 1.6.0_10. – Andrew Thompson Dec 13 '13 at 04:33
  • I've already read the readme.txt file in the jacob source,but as mentioned by 1st floor, is this still possible right now? (JRE 1.7.0) and one more thing is HOW TO create the XML file of JNLP? – Lilly White Dec 13 '13 at 07:16
  • and how can html use JNLP file? – Lilly White Dec 13 '13 at 08:57
  • @AndrewThompson as stated in the readme: "Both JavaWebStart and Applets support JNLP (Applets since 1.6.0_10 aka plugin2)." – Lonzak Dec 16 '13 at 07:58
  • @user1755066 Is it possible with 1.7.0? Yes, but you may have to change/add minor things (signing your Applet etc). Now its the time to try it out for yourself ;-) – Lonzak Dec 16 '13 at 08:02