Results 1 to 2 of 2
  1. #1
    sivan is offline Member
    Join Date
    May 2010
    Rep Power

    Unhappy run a new java gui in windows XP (using eclipse SDK to create gui)


    I'm using eclipse SDK with visual editor for creating a GUI based on java.
    i can run it as java application or java bean through Eclipse but i would like to run it independently on my or any other computer (on windows).

    1) i know where to find the .class file.
    2) i installed and checked that JVM is working on my computer (that's a must ,right ? )
    3) i have tried using the CMD window to run commands like :
    java -classpath <full path to the .class directory> <class name>

    i keep getting an error from java claiming :
    "Could not find the main class :Program will exit"

    what am i doing wrong here ?

    i know there is more then one way for running a java gui (is a gui the same as any java application ?) - applet (running through web browser) ,not using a browser but simply run it on the computer.

    can you explain how do i run java gui's / applets ?


  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power


    Is your class in a package?
    If so the classpath is to the top of the package structure, not all the way down tot he class file. And the class name is the full package name.

    Does your class have a main() method in it?

Similar Threads

  1. Eclipse debug not working on Windows Vista
    By mathew.vinay in forum Eclipse
    Replies: 5
    Last Post: 04-04-2009, 01:06 PM
  2. Replies: 0
    Last Post: 10-31-2008, 07:07 PM
  3. Replies: 4
    Last Post: 09-14-2008, 05:19 AM
  4. Create Windows, Applet & Swing
    By Eric in forum AWT / Swing
    Replies: 1
    Last Post: 07-05-2007, 06:36 AM
  5. How To Create EJB’s In Eclipse IDE
    By JavaForums in forum Eclipse
    Replies: 0
    Last Post: 04-26-2007, 10:15 AM

Tags for this Thread

Posting Permissions

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