?
Solved

Problem about downloading JAR file

Posted on 2003-02-20
8
Medium Priority
?
213 Views
Last Modified: 2010-03-31
Hi,

I met an infrequent problem about downloading jar file. Is there anybody can help me?

Similar code as belows:
<APPLET WIDTH="500" HEIGHT="350" NAME="MyApplet" codebase="http://x.x.x.x/">
<PARAM NAME="ARCHIVE" VALUE="Applet.jar">
<PARAM NAME="CODE" VALUE="Applet.class">
</APPLET>

The problem is it will translate the codebase by some DNS server, (right?)
but it can NOT connect the DNS server now because the WEB server here is in
an intranet. The jar file can be download finally after about 6-20 seconds,
researched by sniffer, the time wasted in connecting the DNS(fail and retry
several times).
Analysis: Cause IE can consider the x.x.x.x as an IP, why it doesn't consider
the codebase as an IP but an URL? I think the codebase tag is transacted by JVM
but not IE (right?). Should it possible to let the JVM consider the codebase
as an IP but not URL(need to translate by DNS)?

thx!
MJ
0
Comment
Question by:popxw
[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
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 7987304
Why are you not using the customary codebase="." (or some other relative url) btw?
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 7988047
This is what I found on w3.org regarding the applet tag;

"13.4 Including an applet: the APPLET element
APPLET is deprecated (with all its attributes) in favor of OBJECT.

See the Transitional DTD for the formal definition.

Attribute definitions

codebase = uri [CT]
This attribute specifies the base URI for the applet. If this attribute is not specified, then it defaults the same base URI as for the current document. Values for this attribute may only refer to subdirectories of the directory containing the current document. Note. While the restriction on subdirectories is a departure from common practice and the HTML 3.2 specification, the HTML Working Group has chosen to leave the restriction in this version of the specification for security reasons."

So, basically, it conforms with the standard sand box approach to applets. Can only retreive files from the current server.

My advice to you would be to create a signed applet, that then loads whatever classes you want from the remote jar. Or even better, host the jar on your own server!
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 7988084
Oh, and you need to specify the 'code' attribute to tell the browser which class to load, e.g. code="MyApplet.class".

You can try the 'archive' parameter to specify where to load the jar from, it might actually work loading from a different site...

The 'name' you specified is only to allow other applets to access that applet by name. It does not tell the browser which class to load for the applet.

You can find more information at;
http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.4

Based on your html code, try this;

<APPLET WIDTH="500" HEIGHT="350" CODE="MyApplet.class" NAME="MyApplet" ARCHIVE="http://x.x.x.x/">
<PARAM NAME="ARCHIVE" VALUE="Applet.jar">
<PARAM NAME="CODE" VALUE="Applet.class">
</APPLET>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:popxw
ID: 7990741
Hi, CEHJ

I've tried to use codebase=".", but the same result.

MJ
0
 

Author Comment

by:popxw
ID: 7991211
Hi, CEHJ

I've tried to use codebase=".", but the same result.

MJ
0
 

Expert Comment

by:CleanupPing
ID: 9059213
popxw:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 7

Expert Comment

by:tomboshell
ID: 9553603
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
SPLIT between CEHJ and orangehead911 because I am unsure of the results/solutions offered.  orangehead911 offered some good information and CEHJ tryed to get the questioner to format the codebase for the intranet.  If anyone has more information or clarifications then PLEASE contribute.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Thomas Boshell
EE Cleanup Volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9603121
PAQed, with points refunded (200)

Computer101
E-E Admin
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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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…
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

771 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