Results 1 to 5 of 5
  1. #1
    droidus is offline Senior Member
    Join Date
    Feb 2011
    Rep Power

    Default deploying java program

    how do i deploy a java program? it doesn't seem to load anything. here is my code:

    <APPLET CODE="test.class" alt="alt" WIDTH="400" HEIGHT="200">

    i have the index.html in a folder, as well as the test.class. in my java program, i have this:

    public static void main(String[] args) {


  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

    Default Re: deploying java program

    Please read the applet tutorials before trying to this as your post only demonstrates that you haven't done this yet. There you'll see that applets don't even have a main method but instead have init() among other things.

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

    Default Re: deploying java program

    Java programs that are designed to be run within a web browser (called "applets") are a special type of program - and what you have written isn't one.

    To make your program run you compile and run it from the command line. Go to whereever the .java file is and try:

    Java Code:
    javac -cp .
    java -cp . test
    The first line compiles and the second runs the program.


    The class (and source .java file) should be renamed to start with a capital letter - Test and - in order to follow Java coding conventions.

    There is a good page on how to get started with Java in Oracle's Tutorial.

  4. #4
    droidus is offline Senior Member
    Join Date
    Feb 2011
    Rep Power

    Default Re: deploying java program

    why would i have problems running a java applet (such as this: in firefox? it just shows that its loading. it works in IE for me.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: deploying java program

    Maybe you need to find a Firefox forum for that question.

    Have you enabled the Java plugin for Mozilla family in the Java control panel?

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 9
    Last Post: 01-17-2012, 09:31 AM
  2. Replies: 23
    Last Post: 06-15-2011, 06:40 PM
  3. Replies: 3
    Last Post: 10-28-2010, 03:42 PM
  4. Deploying java applications.
    By J-Live in forum New To Java
    Replies: 7
    Last Post: 11-24-2008, 08:08 AM
  5. Deploying a java application on an web or appp server.
    By CharanZ in forum Advanced Java
    Replies: 1
    Last Post: 10-29-2008, 11:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts