Solved

Netscape 6 - How to determine and locate the java vm

Posted on 2002-06-06
17
298 Views
Last Modified: 2013-11-18
We need to install some java class libraries onto a users system when they are using Netscape 6. Netscape 6 uses Sun's JRE plug-in. I'm using the new Netscape 6 XPI technology to register and detect the java class libraries.

The problem is that I need to be able to locate the "lib/ext" subdirectory of the installed Java VM that Netsape 6 is using so that I can install our classes. Manual installation is not an option. I don't see any functionality in the XPI documentation that allows me to locate this. Looking in the Windows registry is not a good option either as Linux wouldn't support these calls.

Basically there are 2 questions here:
1) How to determine which and where the Java VM is that Netscape 6 is using?
2) If there a way to access the "lib/ext" from the XPI install technology?

Cheers
James
0
Comment
Question by:jstarling
  • 9
  • 8
17 Comments
 
LVL 92

Expert Comment

by:objects
ID: 7060466
Why are you installing the jars, instead of simply having them downloaded by the VM when the applet is run?
0
 

Author Comment

by:jstarling
ID: 7060617
Very simply the libraries are far too large to download every time the user hits the site. I had worked out a scheme to install an XML parser, something that wasn't available until a few weeks ago with JRE 1.4. I was also able to add a non-swing table control that provided table support for Netscape 4 and IE 4,5 & 6. The XML parser is 800k compressed. With a slow connection this would have been unusable.

I was trying to avoid having a multiple versions of applets and will probably have to use the new XML parser that has only been just provided. If I can find out how Netscape knows which VM to use then I can change my script to place the files in the right location. I could even do it on a operating system basis. We are really only concerned with Windows and Linux.

Cheers
James
0
 

Author Comment

by:jstarling
ID: 7060626
Oh yeah, I forgot to mention, there are still applets that are downloaed with each visit. These applets are small. The simply hook into the installed XML and table library and use the classes.

Its actually pretty slick and was working great for 2 years. Sigh.

James
0
 
LVL 92

Expert Comment

by:objects
ID: 7060861
> download every time the user hits the site

They won't be downloaded each time. The plugin caches all jars, and only downloads if they have changed.
0
 

Author Comment

by:jstarling
ID: 7061936
That's not quite what I meant. I do know that the browser caches the applets during a single browser session. Once the browser is closed, re-opened and the site hit again then the large libraries would have to be downloaded again. On a slow connection that would mean another 7 minute wait before they could do anything with the site.

When the libraries are installed locally then the delay is only a few seconds.

I don't think there is a solution for this problem. It looks like a redesign issue.

There must be a way though to determine which VM Netscape is using though. After all, Netscape knows which one to load.
0
 
LVL 92

Expert Comment

by:objects
ID: 7063572
> the site hit again then the large libraries would
> have to be downloaded again.

No they would be loaded from cache.
Unless of course they have changed, which makes upgrades real easy.

> There must be a way though to determine which VM
> Netscape is using though

I'd say it's in the registry.
Though NS6 will always be running Sun's plugin (afaik).
0
 

Author Comment

by:jstarling
ID: 7063650
What does "afaik" mean by the way?

The large libraries are not downloaded and cached. This I know. Neither Internet Explorer nor Netscape will chache any java after a session unless you get the user to change their browser settings. This will not happen in the commmercial world.

Like I said earlier, I don't think there is a solution for installing java libraries into Netscape 6. It also looks like this will affect IE seeing as MS has dropped Java support so the VM will have to external.

Don't worry about it objects. Thanks for your thoughts.

James
0
 

Author Comment

by:jstarling
ID: 7063658
Oh yeah, I was looking for a non-registry setting fix. Windows and Linux are the target platforms. The earlier API allowed for operating system independant calls that would place the library in the right place. What registry setting is this in any event? I have searched and looked in the registry for the connection and cannot see it. I can have 2 or 3 VM's installed and Netscape will always use the one that I selected for to be used in the JRE installation. "How does it know?" is really the question.

I realize this may sound like fantasy but the installation of java libraries has been working for years. Both at my last company and this one, almost 4 years.

Thanks for all your help. I'm spending the weekend writing a simplistic XML pasrser that could do the trick. It could be fun actually...

James
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 92

Expert Comment

by:objects
ID: 7063675
> What does "afaik" mean by the way?

Sorry, "as far as I know"

>  Neither Internet Explorer nor Netscape
>  will chache any java

If the plugin is being used (as it will for NS6) then NS has nothing to do with it. The caching is handled by the plugin.
0
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 7063709
> writing a simplistic XML pasrser

This may help you:
http://www.javaworld.com/javatips/jw-javatip128.html
0
 
LVL 92

Expert Comment

by:objects
ID: 7063711
If the plugin is being used then I think NS/IE have nothing to do with, and knows nothing about which VM is used. This is handled by the plugin itself.
0
 

Author Comment

by:jstarling
ID: 7063721
Because the Netscape installer script does not provide a way to access the the external java plug-in I'm screwed. They used have an encouraged the installation of java plug-ins in the past and jerked out support for it now. This old way is very well documented.

The plug-in (library) is not being used in NS6 without a manual copy. This is not an option for any commercial web product or customer. Because its manually copied then Netscape doesn't know its there. Netscape simply loads the VM and our libraries are there in the "ext" directory. There is no way that I've found, and thus this post, to install the libraries with Netscape so that it puts them in the right place and can use them.

Netscape and IE will always download the java code if its a new session of the browser, i.e. the first time on that is this session. You may disagree but I certainly cannot rely on the cache to save my ass anyway.

Ahh, the bane of my frustration, the cache.

Thanks for the link I will check it tomorrow. If it helps I'll give you the points and an A ;-) this time just for your effort.

Cheers
James
0
 
LVL 92

Expert Comment

by:objects
ID: 7063730
> Netscape and IE will always download the java code if
> its a new session of the browser, i.e. the first
> time on that is this session. You may disagree but I
> certainly cannot rely on the cache to save my ass
> anyway.

Disagree with you here. If the plugin is being used then the browser does not perform the download, and it is instead performed by the plugin which has it's own cache (which I believe is always on).
I'm currently working on a project that uses a large jar and have had no problems downloading it from the server. The only time a download occurs is when the jar is updated on the server.


0
 

Author Comment

by:jstarling
ID: 7063834
Thus the problem. Its not a plug-in because Netscape doesn't install java plug-in's. What version of Netscape were you using? The current "plug-in" is a manually copied java library into the "ext" directory because that's the only way it can work. I cannot install a plug-in written in java for Netscape 6.

What am I missing? I have jar a file full of utility functions that I need installed into the "ext" directy of the Java VM that Netscape 6 is using. If I can get this library installed (basically on the client machine) then the applets would use the utility classes in the libraries. The applets that need the utility classes are currently in one jar file and the utility classes in another. I'm going to have to intergrate them in a simplistic form just to cut down the download time.

It would be great to have some sample code that would install a java jar file into Netscape 6 that is only downloaded when the version changes. Please please please

Thanks
James
0
 
LVL 92

Expert Comment

by:objects
ID: 7063853
Sorry I think we're using the term plugin to mean different things :)
When I refer to the Java plugin I am referring to the Sun Java Plugin which Netscape is using as it's VM. It has nothing to do with a Netscape plugin which I think you are referring to.

For more info:
http://java.sun.com/products/plugin/
0
 

Author Comment

by:jstarling
ID: 7067343
I give an A for effort just because all of the entries made me realize that we need to design. Thanks for the xml parser link. It may save us some time.

Cheers
James
0
 
LVL 92

Expert Comment

by:objects
ID: 7068613
James,

Good luck with it, and thanks for the points :-)

http://www.objects.com.au/staff/mick
Brainbench MVP for Java 1
http://www.brainbench.com
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now