facebook

JApplet Example

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #202746 Reply

    arghhh
    Member

    Anybody got a complete working example of creating an Applet/JApplet, including the html for the referencing page? I’ve tried creating one, but it doesn’t deploy and I can’t figure out where to put the source to cause it to deploy to a place that can be referenced from an <applet> tag.

    #202751 Reply

    Riyad Kalla
    Member

    arghh, MyEclipse is focused around web application development (Server-side work) while what you are doing is client side programming. If you create a web module project, it isn’t just a web project (meaning html files and so forth), it is a JSP/Servlet project. What you want is just straight HTML’s with a JAR somewhere that you can reference with an applet tag. You can do this with normal Eclipse (but you won’t get HTML syntax highlighting or completion). Just create your normal /src folder that has your applet source code. Compile it into say “/html” and in the “/html” directory, you can have an “index.html” file that references the applet’s class. A better way (if your applets is complex) is to write an Ant script to JAR up the class files for you then put the jar in the “/html” directory and reference it using your applet tag.

    When you are ready to deploy your project (you can’t use MyEclipse for this, because it isn’t what it was meant for) you just copy all the contents of the “html” directory into your web directory (e.g. htdocs for Apache) and now you can view your html/applet.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: JApplet Example

You must be logged in to post in the forum log in