Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > relative applet location causes problems on local disk

Reply
Thread Tools

relative applet location causes problems on local disk

 
 
Xah Lee
Guest
Posts: n/a
 
      04-22-2004
i have a java applet, where the html file contains the line:
<APPLET ARCHIVE="../a/live.jar" CODE="Live.class" WIDTH=650 HEIGHT=650
ALIGN=LEFT>
where the jar archive location is specified by relative path outside
the dir html is in.

everything works fine except it doesn't work if it is on my local
disk. (gives errer related to permission or applet not found)

On local disk, it works if i move the live.jar under the dir html is
in. (and change the archive location accordingly)

does anyone know what's wrong with this?

if run under Mac's Safari browser, it works in local disk as well.

here's the applet in question.
http://xahlee.org/surface/moebius_st...strip_lg1.html

thanks.

Xah
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://xahlee.org/PageTwo_dir/more.html
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      04-22-2004
On 21 Apr 2004 17:08:35 -0700, Xah Lee wrote:

> i have a java applet, where the html file contains the line:
> <APPLET ARCHIVE="../a/live.jar" CODE="Live.class" WIDTH=650 HEIGHT=650
> ALIGN=LEFT>


I suspect you need to set the
'codebase' higher up the chain,

codebase='..'
code='Live.class'
archive='a/live.jar'

BTW - it would not coincidentally
be rge same applet I am using fo this page
would it?
<http://www.1point1c.org/model/index.jsp>

LiveGraphics3D?

What's your URL?

And while we are here, please do not cross-post
<http://www.physci.org/codes/javafaq.jsp#xpost>
and avoid invalid groups like
'comp.lang.java.misc' (Yes, yes, I know your
server carries it, that does not make it valid)

F'Ups set to c.l.j.programmer, since I think
this problem has far more to do with basic
applet parameters than anything 3D..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Xah Lee
Guest
Posts: n/a
 
      05-03-2004
the problem is solved by changing the line

<APPLET ARCHIVE="../a/live.jar" CODE="Live.class" WIDTH=650 HEIGHT=650>

to

<APPLET CODEBASE="../" ARCHIVE="live.jar" CODE="Live.class" WIDTH=650 HEIGHT=650>

and moving the live.jar one dir up.

note that the following doesn't work:
<APPLET CODEBASE="../a/" ARCHIVE="live.jar" CODE="Live.class" WIDTH=650 HEIGHT=650>

my guess is that browers has some security issue of accessing local files.

PS Thanks Andrew Thompson for help. (Yes, LiveGraphics3D)

Xah
(E-Mail Removed)
http://xahlee.org/PageTwo_dir/more.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying all ID's in relative location... Mel Javascript 1 04-03-2007 05:37 PM
Location, location, location =?Utf-8?B?VHJhY2V5?= Wireless Networking 2 02-17-2007 08:37 PM
Relative Location for Inherits Property =?Utf-8?B?VG9ueSBBYmF0ZQ==?= ASP .Net 10 11-10-2005 04:06 PM
Postback causes 100=Continue, causes double download prompt? Xavier Osa ASP .Net 0 01-09-2004 11:17 AM
Relative location of images Gary HTML 2 07-03-2003 11:05 PM



Advertisments