• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 465
  • Last Modified:

Download a swing plugin

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
s_lavie
Asked:
s_lavie
  • 10
  • 8
1 Solution
 
objectsCommented:
> 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
 
s_lavieAuthor Commented:
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
 
objectsCommented:
> 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
s_lavieAuthor Commented:
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
 
objectsCommented:
> 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
 
s_lavieAuthor Commented:
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
 
objectsCommented:
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
 
s_lavieAuthor Commented:

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
 
s_lavieAuthor Commented:
Well, this is the classid in the default.tpl file (and in the ieonly.tpl as well).
Is this a bug or what?
0
 
objectsCommented:
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
 
objectsCommented:
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
 
s_lavieAuthor Commented:
> 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
 
objectsCommented:
Latest now comes with the JDK.
0
 
s_lavieAuthor Commented:
You mean 1.4?
0
 
objectsCommented:
Since about 1.3.1 I think.
0
 
objectsCommented:
0
 
s_lavieAuthor Commented:
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
 
objectsCommented:
Thanks :-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 10
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now