# How to include an java applet in a rhtml page

**URL:** <https://www.ruby-forum.com/t/how-to-include-an-java-applet-in-a-rhtml-page/123137>\
**Category:** Rails\
**Created:** [December 14, 2007, 10:14am UTC](https://www.ruby-forum.com/t/how-to-include-an-java-applet-in-a-rhtml-page/123137 "2007-12-14T10:14:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abraham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6a8cbe/32.png) [@abraham](https://www.ruby-forum.com/u/abraham)\
**Post date:** [December 14, 2007, 10:14am UTC](https://www.ruby-forum.com/t/how-to-include-an-java-applet-in-a-rhtml-page/123137/1 "2007-12-14T10:14:55Z")

</div>

Hi

Im quite new to rails and was wondering how to include a java applet in  
a rhtml file? Is it the same as in HTML?

for example:

Thank You!

---

<div class="post-metadata">

**Author:** ![abraham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6a8cbe/32.png) [@abraham](https://www.ruby-forum.com/u/abraham)\
**Post date:** [December 14, 2007, 1:16pm UTC](https://www.ruby-forum.com/t/how-to-include-an-java-applet-in-a-rhtml-page/123137/2 "2007-12-14T13:16:55Z")

</div>

That should do it. The rhtml file is basically a html file which is  
interpreted/parsed by erb before being sent to the client. So  
everything you can do in a html file you can do in an rhtml file.

On Dec 14, 10:14 am, Peet V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![abraham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6a8cbe/32.png) [@abraham](https://www.ruby-forum.com/u/abraham)\
**Post date:** [December 15, 2007, 1:35pm UTC](https://www.ruby-forum.com/t/how-to-include-an-java-applet-in-a-rhtml-page/123137/3 "2007-12-15T13:35:54Z")

</div>

On Dec 14, 8:14 pm, Peet V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi
> 
> Im quite new to rails and was wondering how to include a javaappletin  
> a rhtml file? Is it the same as in HTML?
> 
> for example: \<appletcode=“World.class”  
> archive=“\*.jar”

Servers do not work like the local file-system.  
(not that \*.jar would work in a generic application,  
launched off the local FS).

You need to mention each jar specifically, separated  
by a ‘,’.

–  
Andrew T.  
[PhySci.org](http://PhySci.org)

---

<div class="post-metadata">

**Author:** ![abraham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6a8cbe/32.png) [@abraham](https://www.ruby-forum.com/u/abraham)\
**Post date:** [December 18, 2007, 8:18am UTC](https://www.ruby-forum.com/t/how-to-include-an-java-applet-in-a-rhtml-page/123137/4 "2007-12-18T08:18:34Z")

</div>

Andrew T. wrote:

> On Dec 14, 8:14 pm, Peet V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > Hi
> > 
> > Im quite new to rails and was wondering how to include a javaappletin  
> > a rhtml file? Is it the same as in HTML?
> > 
> > for example: \<appletcode=“World.class”  
> > archive=“\*.jar”
> 
> Servers do not work like the local file-system.  
> (not that \*.jar would work in a generic application,  
> launched off the local FS).
> 
> You need to mention each jar specifically, separated  
> by a ‘,’.
> 
> –  
> Andrew T.  
> [PhySci.org](http://PhySci.org)

Hi

That still doesnt work…it says World.class cannot be found…when I  
change the file from rhtml to html it works fine…my world.class file  
is located in the “public” folder…

Musnt I include it in rails format for example something like \<%  
applet…

Thx a lot for the help!

---

<div class="post-metadata">

**Author:** ![abraham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6a8cbe/32.png) [@abraham](https://www.ruby-forum.com/u/abraham)\
**Post date:** [December 19, 2007, 12:57am UTC](https://www.ruby-forum.com/t/how-to-include-an-java-applet-in-a-rhtml-page/123137/5 "2007-12-19T00:57:57Z")

</div>

On Dec 18, 6:18 pm, Peet V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Andrew T. wrote:
> 
> > On Dec 14, 8:14 pm, Peet V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > …
> > 
> > > Im quite new to rails and was wondering how to include a javaappletin  
> > > a rhtml file? Is it the same as in HTML?
> 
> > > for example: \<appletcode=“World.class”  
> > > archive=“\*.jar”  
> > > …  
> > > You need to mention each jar specifically, separated  
> > > by a ‘,’.  
> > > …  
> > > That still doesnt work…it says World.class cannot be found…when I  
> > > change the file from rhtml to html it works fine…

I am only in a position to comment on HTML. But I suppose that  
answers your second question. “Is it the same as in HTML?”  
No - apparently not.

Between you and me, if an ‘rhtml’ file can include a link  
‘just like HTML’, I would launch the applet using JWS.  
Here is an example. [http://www.physci.org/jws/#jtest](http://www.physci.org/jws/#jtest)

–  
Andrew T.  
[PhySci.org](http://PhySci.org)
