Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / May 2004

Tip: Looking for answers? Try searching our database.

relative applet location causes problems on local disk

Thread view: 
Xah Lee - 22 Apr 2004 01:08 GMT
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_strip/moebius_strip_lg1.html

thanks.

Xah
xah@xahlee.org
http://xahlee.org/PageTwo_dir/more.html
Andrew Thompson - 22 Apr 2004 13:38 GMT
> 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..

Signature

Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Xah Lee - 03 May 2004 13:48 GMT
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
xah@xahlee.org
http://xahlee.org/PageTwo_dir/more.html


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.