Solved

Download a swing plugin

Posted on 2002-07-04
18
446 Views
Last Modified: 2013-11-23
I want to run a swing applet.
In the OBJECT tag of the html file the codebase is "http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab#Version=1,3,1,0".
I want to download the plugin from other location (so I don't need to wait a few minutes for each machine I test my applet), install it and then run my applet.
Furthermore I need to figure by myself, that the plugin is not installed!
I tried to download the plugin from http://java.sun.com/products/plugin/1.3.1/plugin-install.html but it didn't help.
0
Comment
Question by:s_lavie
  • 10
  • 8
18 Comments
 
LVL 92

Expert Comment

by:objects
ID: 7133096
> I want to download the plugin from other location

Just replace the URL with the location you want to go to for install.

> I need to figure by myself, that the plugin is not installed!

Just don't include a codebase to install from. If the necessary plugin does not exist then the noapplet html will be displayed.
0
 
LVL 2

Author Comment

by:s_lavie
ID: 7134825
objects,
> Just replace the URL with the location you want to go to for install
I want the automatic downloading to be excute, but from other URL.
Furthermore, I don't understand why the applet doesn't work, when I install the plugin from http://java.sun.com/products/plugin/1.3.1/plugin-install.html as the htmlconvertor decided (in the EMBED tag).
0
 
LVL 92

Expert Comment

by:objects
ID: 7136389
> as the htmlconvertor decided (in the EMBED tag).

As you're talking about the EMBED tag I'll assume you're talking about NS.

> I want the automatic downloading to be excute, but from other URL.

Is the new URL an autoinstall cab?

Also don't think autoinstall works for NS.

Post your tag.
0
 
LVL 2

Author Comment

by:s_lavie
ID: 7136987
I'm talking about both IE and NS (I know autoinstall works for IE and not for NS).

When I said the applet doesn't work, I didn't mean the autoinstall didn't work. I meant that after I installed the plugin from the url in the EMBED tag, the applet didn't work.

> Is the new URL an autoinstall cab?
How do I create an autoinstall cab (for IE)?
0
 
LVL 92

Expert Comment

by:objects
ID: 7136998
> I meant that after I installed the plugin from the url
> in the EMBED tag, the applet didn't work.

Haven't used the install process on NS.
Did it still not work after a restart?
And when you say didn't work, do you mean the tag was still failing to find the plugin?  If so, did you install a version of the plugin corresponding to the version requested by the tag?

> How do I create an autoinstall cab (for IE)?

You copy Sun's :)

0
 
LVL 2

Author Comment

by:s_lavie
ID: 7137275
What I did was as follows:
I went to the URL http://java.sun.com/products/plugin/1.3.1/plugin-install.html (from the EMBED tag), which moved me directly to http://java.sun.com/j2se/1.3/
There I downloaded J2SE v1.3.1_04 (which was the closest to v1.3.1, which I needed) - I chose "JRE for Windows (U.S. English only)".
I then installed it.
It is now the default Java runtime for the IE browser.
I restarted my computer.
Now, I run IE, and he asks me to download a Java plugin 1.3.1 (using the autoinstall from the OBJECT tag: http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab#Version=1,3,1,0).

When I look at IE objects (in C:\WINNT\Downloaded Program Files), I find two items JRE 1.3.1_04 (before the plugin installation there was none). Both have the same date and both have a "Damaged" status.

Why???
0
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 7137288
Sounds like the classid in your object tag is specifying it explicitly needs 1.3.1_0.
Try changing the classid to:
clsid:8AD9C840-044E-11D1-B3E9-00805F499D93

It corresponds to any version.

0
 
LVL 2

Author Comment

by:s_lavie
ID: 7137787

When I run the html converter 1.3, the classid is: E19F9331-3110-11d4-991C-005004D3B3DB.

How could I get the right classid without worry?

When I use the classid you gave me, I get the following exception:

java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)      
     at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)      
     at java.lang.SecurityManager.checkPermission(Unknown Source)      
     at java.lang.SecurityManager.checkExit(Unknown Source)      
     at javax.swing.JFrame.setDefaultCloseOperation(Unknown Source)

for setDefaultCloseOperation(3);     // exit

Which wasn't thrown when the plugin was downloaded via the autoinstall before...
(Removing that line, seems to work fine)
Is that mean I cannot exit the browser when the JFrame is closed?
0
 
LVL 2

Author Comment

by:s_lavie
ID: 7137814
Well, this is the classid in the default.tpl file (and in the ieonly.tpl as well).
Is this a bug or what?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 92

Expert Comment

by:objects
ID: 7139064
The new classid was added in later versions of htmlconverter.

> Is that mean I cannot exit the browser

There is no way to exit the browser using an applet.
exit() exits the JVM, and is not intended for use by an applet.
0
 
LVL 92

Expert Comment

by:objects
ID: 7139077
The new classid was added in later versions of htmlconverter.

> Is that mean I cannot exit the browser

There is no way to exit the browser using an applet.
exit() exits the JVM, and is not intended for use by an applet.
0
 
LVL 2

Author Comment

by:s_lavie
ID: 7140219
> The new classid was added in later versions of htmlconverter.

The one I used is htmlconv1_3.jar, which I found in java.sun web site.
Is there a later one? where do I find it?
0
 
LVL 92

Expert Comment

by:objects
ID: 7140228
Latest now comes with the JDK.
0
 
LVL 2

Author Comment

by:s_lavie
ID: 7140330
You mean 1.4?
0
 
LVL 92

Expert Comment

by:objects
ID: 7140334
Since about 1.3.1 I think.
0
 
LVL 92

Expert Comment

by:objects
ID: 7140348
0
 
LVL 2

Author Comment

by:s_lavie
ID: 7142637
objects,
I guess I'll use my current htmlconverter, and just change the classid to 8AD9C840-044E-11D1-B3E9-00805F499D93.
Thank you very much for your help.
I'm adding points to this question ;-)
0
 
LVL 92

Expert Comment

by:objects
ID: 7144714
Thanks :-)
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

758 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

20 Experts available now in Live!

Get 1:1 Help Now