Solved

allow my Java applet to be called by any html

Posted on 2004-04-06
6
269 Views
Last Modified: 2010-04-06
I have made a Java Applet and put it on my web server.

And I want people all over world are able to call this Applet. (ie: they can specifiy the code base in their html document which put in elsewhere and run my java applet)

What is the solution? I know they cannot use my URL as codebase since java has security restriction.

I also see the article below, but still don't know what is needed. How to setup the ion_10.zip ?

Or anyother solution?

Thanks
----------------------------------------------------------------------------------
<APPLET NAME="HELLO" CODE=com.rsi.ion.IONGraphicApplet.class
   ARCHIVE="ion_10.zip"
   CODEBASE="http://ion.fake.com/ion/classes/"
   WIDTH=350 HEIGHT=80
   ALT="ION Applet failed to load. Is Java enabled in your browser?">
Java virtual machine failed to start. Is Java enabled in your browser?
   <PARAM NAME="SERVER_NAME" VALUE="ion.fake.com">
</APPLET>
0
Comment
Question by:CYBERWORLD
  • 3
6 Comments
 
LVL 33

Expert Comment

by:shalomc
ID: 10773930
Create the applet as a java class and put it in the /ion/classes folder.
The codebase and code define together the URL of your applet.
The optional archive contains additional classes packed in a JAR file (or ZIP for that matter) that your applet uses.
If used, the archive must be accessible from the internet as well.


<APPLET NAME="HELLO" CODE="IONGraphicApplet.class"
   ARCHIVE="ion_10.zip"
   CODEBASE="http://ion.fake.com/ion/classes/"
   WIDTH=350 HEIGHT=80
   ALT="ION Applet failed to load. Is Java enabled in your browser?">
Java virtual machine failed to start. Is Java enabled in your browser?
   <PARAM NAME="SERVER_NAME" VALUE="ion.fake.com">
</APPLET>

ShalomC
0
 
LVL 33

Expert Comment

by:shalomc
ID: 10773940
PS
Your applet may be used in HTML pages regardless of the different URLs.


ShalomC
0
 
LVL 2

Author Comment

by:CYBERWORLD
ID: 10775439
where is the /ion/classes folder??

I am not the server admin, am i able to do so?

if my applet don't use jar or zip, do i need to create these files?

could you tell me more? thanks!
0
 
LVL 33

Accepted Solution

by:
shalomc earned 500 total points
ID: 10775641
You said that you have a web server, didn't you?
Since you want the applet to be available world wide, I assume that your web server is accessible from the Internet.
Place the CLASS file in the same folder where you have the HTML files.
The CODEBASE parameter will point to this folder.

If your applet is not dependant on any other Java code, you do not need any JAR nor ZIP files.

If you do not administer the web server, get the administrator to either give you proper authorization or place the file for you.

ShalomC
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

730 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