Solved

allow my Java applet to be called by any html

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WSDL Soap Error 12 261
XML problem with Internet Explorer 7 40
Owl Carousel 6 172
File names with & character 6 70
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
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…
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 the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

910 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

24 Experts available now in Live!

Get 1:1 Help Now