?
Solved

Download a swing plugin

Posted on 2002-07-04
18
Medium Priority
?
460 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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 learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
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
Course of the Month11 days, 14 hours left to enroll

752 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