Solved

Download a swing plugin

Posted on 2002-07-04
18
457 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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
 
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 156
runtime exception 2 62
restrict decimal places for double datatype 10 44
maven not picking latest jar instead picking old jar from .m2 12 72
In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

740 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