Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Run Java Applet as Web and Desktop application

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    13
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Run Java Applet as Web and Desktop application

    Hi,

    I want to run my Java Applet as Web or Desktop application but don't know how. I've watched some tutorials online about converting Java applet file (.class) to Web app. However, my Applet has multiple files, so I'm thinking of a way using .jar.

    I haven't found any way to run Applet as desktop app yet.

    --- Update ---

    I've solved the web app problem. Need help on Desktop app


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Run Java Applet as Web and Desktop application

    Post a simple Applet (preferably a JApplet) with any attempts you've made to make it also run on the desktop, and we'll help you finish.

    Essentially, an Applet runs as an Applet from the init() method, but a desktop app runs from a main() method. Adding a main() method to the Applet code and running it as you would a normal Java desktop app is all that is needed to run an Applet as a desktop app. There are several tutorials available that show how to implement this concept.

  3. #3
    Junior Member
    Join Date
    Dec 2013
    Posts
    13
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Run Java Applet as Web and Desktop application

    I'm working on porting my Applet to Android and iOS. That would be nice if you show me some tutorials on how to run Applet as a Desktop app.

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Run Java Applet as Web and Desktop application

    This section of Chapter 6 covers the topic in detail. Note that the 7th edition of this book is now available, and the sections on Applets have been removed completely because of the changes in Java due to the security concerns with Applets.

Similar Threads

  1. Replies: 1
    Last Post: August 23rd, 2013, 06:33 AM
  2. Java Web or Java Desktop application ?
    By liligary in forum Java Theory & Questions
    Replies: 3
    Last Post: July 5th, 2013, 08:05 PM
  3. Replies: 1
    Last Post: January 24th, 2013, 07:24 AM
  4. HELP! My applet won't run on a web browser....
    By coolidge in forum Java Applets
    Replies: 4
    Last Post: October 21st, 2011, 08:52 AM
  5. Replies: 0
    Last Post: December 3rd, 2009, 04:43 PM