Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compile and deploy Applets

 
Amanda Albert
Ranch Hand
Posts: 41
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't seem to deploy any Java applets. I am attempting to deploy the examples from the Java Tutorials - Deploying Applets; I see the html text, but where the applet is supposed to be, all I get is a frame with a red X.

I compiled the classes to a jar, per the instructions. So now my directory structure looks like this:

Under D:\Projects\Java\applet_ComponentArch_DynamicTreeDemo\build\classes:
  • directory appletComponentArch (contains the class files)
  • AppletPage.html
  • AppletPage_WithAppletTagNoJNLP.html
  • AppletPage_WithAppletTagUsingJNLP.html
  • dynamictree-applet.jnlp
  • DynamicTreeDemo.jar


  • I revised AppletPage_WithAppletTagNoJNLP.html by removing the external javascript references since I am on a standalone laptop and that was closest to how I wanted to deploy my personal application.

    I have set my JAVA_HOME environment variable, as well as adding %JAVA_HOME%\bin to the Path variable. I am able to run the applications using Eclipse's AppletViewer just fine. I'm using JDK and JRE 1.6.23.

    I also noticed that on my laptop, the Java icon does not show up in my system tray like it does when I run the tutorial examples on my Internet-connected machine. On my laptop, I have changed settings in the Java Control Panel to always Show the Console, and such. I'm running Windows XP 64-bit.

    What else could I be doing wrong?

    Amanda
     
    Ernest Friedman-Hill
    author and iconoclast
    Marshal
    Pie
    Posts: 24211
    35
    Chrome Eclipse IDE Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The page you're linking to includes some enormously funky stuff -- deploying an applet can be WAY simpler than that. Further, I'm concerned that by "removing the external javascript references" you may have broken the funky stuff and that's why the applets aren't loading -- in general, that Java "RIA" stuff isn't going to work without Internet access anyway.

    The HTML page that launches an applet can be as simple as



    so if you're not sure why things aren't working, it would be best to get something like this working first, and then move on to the fancier stuff. If you're not explicitly using any of the JNLP related features, there's no reason to overcomplicate things.
     
    Amanda Albert
    Ranch Hand
    Posts: 41
    Eclipse IDE
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for your response.

    I did make it simple, and I revised the applet tag just like you suggested.

    I think the problem may be that, according to some documentation I read on Oracle's website, there is no Java plug-in for 64-bit Windows. I going to try installing a 32-bit version of the latest JRE and run the 32-bit version of IE to see if that works.
     
    Amanda Albert
    Ranch Hand
    Posts: 41
    Eclipse IDE
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yep, it appears that the problem was my laptop is running 64-bit JRE, which doesn't include a Java plug-in for browsers. I'll mark this as resolved. But stay tuned for another thread from me :-).
     
    Ernest Friedman-Hill
    author and iconoclast
    Marshal
    Pie
    Posts: 24211
    35
    Chrome Eclipse IDE Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    There's a 64-bit plugin starting with JDK 1.6.0p12, so you may just need to update to a newer JDK.
     
    Amanda Albert
    Ranch Hand
    Posts: 41
    Eclipse IDE
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Interesting. I have JDK 6u23 64-bit installed on that machine. Is "JDK 1.6.0p12" newer than what I have?
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic