Solved

allow my Java applet to be called by any html

Posted on 2004-04-06
6
270 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
[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
  • 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

726 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