• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where to install a .dll to be used by an applet in NS6.2?

 
Dan Serfaty
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have an applet that needs to access Windows registry. In order to do that I have to install a .dll that is then loaded by my Java classes.
I am using the XPI API to install the .dll.
In Netscape 4.x I used to ask SoftUpdate to return the java bin folder (ie: JavaBinFolder = su.GetFolder("Netscape Java Bin") .
But in Netscape 6.2, now that it using the plug-in, I don't know where to put the file so it is loaded by the JVM. The only place I found so far that seems to work is Netscape main directory.
Is there a better place I can use?
Thanks mucho.
- Dan Serfaty
 
Tim Holloway
Saloon Keeper
Posts: 18362
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Possibly the JRE bin directory. If not, just leave it in the Netscape one, since you're tied to that product. Of course, the Windows\system directory is also fair game except that after seeing what a mess THAT made of things, newer versions of Windows aren't likely to let you just plop it in there.
The Windows Registry is one of those things that seemed cool when it first came out, but in practice has proven less than ideal. The information hiding it provides has been pretty well slapped silly by all the times we end up having to get users to run RegEdit by telephone direction , the hierachical structure has mostly meant that components are splattered all over the registry, and its monolithic structure makes it impossible to effectively backup and restore the complete installation of a critical application - you end up re-installing the whole #%%#@@! thing. Even the disk space efficiencies are no longer compelling now that he have big drives and more space-efficient filesystems.
But I don't expect that Microsoft will abandon it anytime soon!
 
Dan Serfaty
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim,
thanks for your answer. Actually, you're right putting stuff in the windows area won't be ok anyways since it won't work for users with limited privileges.
I guess I could try the plug-in bin directory. Do you know how I can get the path to that plug-in with the XPI API?
Thanks much.
- Dan
 
Dan Serfaty
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One little update: I have at least one instance of a machine where putting the .dll in Netscape's main directory does not work.
It is not found by the JVM, which says that it can't find the dll in the java.library.path.
If anyone knows anything about that, I'm still listening..
- Dan
 
Dennis Lee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If you use java plug-in, the dll needs to be put under JRE directory where you install the plug-in. Hope it will help you.
 
Dennis Lee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not the ....\jre\bin directory, but ....\jre directory. Recenetly I am also develop such source. I have passed testing.
Do you know how to let the browser download the dll from server automatically?
 
Dan Serfaty
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dennis,
Actually I found out that It was a problem in my code, so at least I can load the dll now.
The thing I don't want to put the dll in either Netscape or the JRE directory because you never know if the user has limited privileges or not, which might be the case with NT, Win2k and XP.
I tend to think the solution would be to put the dll under Document Settings\username\Application Data\MyApp\... or something equivalent, and load the dll using Runtime.load() instead of Runtime.loadLibrary().
As for your question, if you want to install the dll within Netscape you have to use the XPI API (Cross Platform Install API), which replaces SoftUpdate in Netscape 6.
Basically, you create a zipped file which extention is xpi and which contains a file named install.js. install.js is written using Javascript and performs the installation using XPI.
Here's where you can find more info on XPI:
The API documentation:
http://developer.netscape.com:80/docs/manuals/xpinstall/xpinstall.pdf
Some tutorials:
http://www.xulplanet.com/tutorials/xultu/index.shtml
http://developer.netscape.com/docs/articles/2001/browser_xpi.html
And more generally, go to http://developer.netscape.com and make a search on XPI.
I hope this helps.
- Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic