• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Embedding a applet in my website

 
Greenhorn
Posts: 27
MyEclipse IDE Firefox Browser Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai
I want to embed an applet in my website(blog)[from blogspot]
As blogger doesn't support file upload, i want to know how to add a applet to my website. i.e where to upload the class files and how to embed

i tried this but it did not work

<span style="color: red; font-family: 'Comic Sans MS';">


<applet code="http://puzzle.dl.sourceforge.net/project/javaapp/banner.class" height="50" width="300">
</applet> </span>
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You didn't say what "did not work" really meant. Read this link: ItDoesntWorkIsUseless

Anyway I put your applet element into a trivial HTML file and opened it in my browser. The applet loaded and then it turned into a box which said "Error. Click for details." So I did, and the Java console opened and showed me the stack trace of the error. You should look in the Java console too.
 
gowtham potter
Greenhorn
Posts: 27
MyEclipse IDE Firefox Browser Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i too got the applet saying error click for details and in the java console found some glibberish plez explain
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

gowtham sundaar wrote:i too got the applet saying error click for details and in the java console found some glibberish plez explain



To a Java programmer, it's not gibberish, but what you're saying is that you're not one, correct?

Read this to understand how to modify your applet tag to point to an applet that's not located on your server:

http://download.oracle.com/javase/1.4.2/docs/guide/misc/applet.html
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi gowtham sundaar,

I found a way to post a applet to a blog from blospot. I was also searching for a solution and found one.

I developed my applet using Netbeans IDE and when I built it, netbeans generated 4 files: a html, a jar, a txt and a jnpl.

My main problem was also where to upload the files, and after doing some research on the internet I found that it is possible to post files to google sites creating a new site associated to your Google account, and a page for holding files. After that just upload the jar and the jnpl files. Then edit the the html file, changing the url for the jar and the jnpl files and ponting them to the google site upoloaded files urls. Run the html file on your dektop and see if it works. After that copy the content from the html file to your blog and post it.

Take a look to my Roman to Numeral applet at:

http://3hconsulting.blogspot.com/2010/11/creating-applet-for-roman-to-numeral.html

If you have any doubt or question please fell free to contact. I will update the content of my blog post adding some more details.

Hetul
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That may be all true, but gowtham's main problem is that he just didn't upload all the necessary classes. The applet would have worked just fine if all the classes were in place. I assume he is now looking for the programmer to help him diagnose that problem.
 
Hetul Himatlal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the error...
 
gowtham potter
Greenhorn
Posts: 27
MyEclipse IDE Firefox Browser Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<script>
var attributes = {
code: "JAppletRC",
archive: "https://sites.google.com/site/3hadvisory/files/RomanNumeral.jar?attredirects=0&d=1",
width: 275,
height: 175
};
var parameters = {jnlp_href:"https://sites.google.com/site/3hadvisory/files/launch.jnlp?attredirects=0&d=1"}; <!-- Applet Parameters -->
var version = "1.5"; <!-- Required Java Version -->
deployJava.runApplet(attributes, parameters, version);

</script></div>


Hetul Himatlal ,how do i launch a applet without the jnpl file,i.e with only the class file.
Anyway thanks! i will work it out
Thank YOU so much it works!!! at last
http://www.gowtham1.co.cc/2010/06/java-banner-applet.html
this link explained it all http://download.oracle.com/javase/1.4.2/docs/guide/misc/applet.html
i forgot to add codebase
 
gowtham potter
Greenhorn
Posts: 27
MyEclipse IDE Firefox Browser Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Applet Embedding

This explains it all
 
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic