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

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

    Hi,

    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 ?

    Thanks
    Sivan

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    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, 02:06 PM
  2. Replies: 0
    Last Post: 10-31-2008, 08:07 PM
  3. Replies: 4
    Last Post: 09-14-2008, 06:19 AM
  4. Create Windows, Applet & Swing
    By Eric in forum AWT / Swing
    Replies: 1
    Last Post: 07-05-2007, 07:36 AM
  5. How To Create EJB’s In Eclipse IDE
    By JavaForums in forum Eclipse
    Replies: 0
    Last Post: 04-26-2007, 11: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
  •