#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    Kiev, Ukrain
    Posts
    89
    Rep Power
    2

    Starting work with eclipse


    Starting to work with eclipse , i downloaded jdk + eclipse, selected a path to jdk folder.And the output after the code execution is this :
    Usage: javaw [-options] class [args...]
    (to execute a class)
    or javaw [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -d32 use a 32-bit data model if available
    -d64 use a 64-bit data model if available
    -server to select the "server" VM
    -hotspot is a synonym for the "server" VM [deprecated]
    The default VM is server.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions with specified granularity
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
    show splash screen with specified image
    See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
    for this code :
    Code:
    import java.awt.Dimension;
    
    import javax.swing.JFrame;
     import javax.swing.JLabel;
    
    public class root {
          
     public static void createGUI() {
               JFrame.setDefaultLookAndFeelDecorated(true);
               JFrame frame = new JFrame("Test frame");
               frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
               
               JLabel label = new JLabel("Test label");
               frame.getContentPane().add(label);
               
               frame.setPreferredSize(new Dimension(200, 100));
               
               frame.pack();
               frame.setVisible(true);          
          }
          
          public static void main(String[] args) {
               javax.swing.SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                         createGUI();
                    }
               });
          }
     }
    What i'm doing wrong ?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    Kiev, Ukrain
    Posts
    89
    Rep Power
    2
    it's might be some mistake with install or plug-in jdk ?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    Kiev, Ukrain
    Posts
    89
    Rep Power
    2
    This was above the console :
    <terminated> New_configuration [Java Aplication] "path"\javaw.exe
    I tried to google that and gave no result .
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    Kiev, Ukrain
    Posts
    89
    Rep Power
    2
    If somebody is interested in :
    The error was in damaged javaw.exe and in wrong location of jdk .
    jdk must be in a same folder with Eclipse , it's needed to create a environmental variable JAVA_HOME with path to the jdk folder and thats all.

IMN logo majestic logo threadwatch logo seochat tools logo