Solved

allow my Java applet to be called by any html

Posted on 2004-04-06
6
265 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 32

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 32

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 32

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now