Could not find the main class in Eclipse

Hey,
I've been working with Java for a few years now, but I recently set-up a new Eclipse-environment and now my Application won't run...
"Could not find the main class. Program will exit."
If I compile and run the source myself it works fine, so it must be a setting in Eclipse somewhere...
It doesn't work, even when I put the class in the default package...
It must be something very stupid, but I can't seem to find out what the problem is :(

It was only the basic Hello-World-concept;
public class Game extends JFrame {
     /** A default SerialVersionUID */
     private static final long serialVersionUID = 1L;
     public Game() {
          addKeyListener(new GameController());
          MainView view = new MainView(...);
          add(view);
      * @param args The game-options
     public static void main(String[] args) {
          Game spel = new Game();
          spel.setSize(1024, 768);
          spel.setTitle("Java Rally");
          spel.setResizable(false);
          spel.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          spel.setVisible(true);
}

Similar Messages

  • Can not start WebLogic in Eclipse. Error: "Could not find the main class."

    I have installed Eclipse 2.0 and WebLogic Server 6.1. and the WebLogc plug in from GENUITEC (and jdk1.3.1_04, on Win2K Server). After I have done the configuration, the WebLogic start/stop buttons are integried into the Eclipse Toolbar, but when I click on the start button to start Weblogic, it pops up a dialog box "Java Virtual Machine Launcher" with message: "Could not find the main class. Program will exit!"
    Starting WebLogc Server from the Start panel works fine.
    Does any one have seen this before or have a suggestion what I should do?
    Many many thanks in advance.
    Huan

    Weblogic must be started with a full JDK; otherwise
    JSPs and dynamic EJB stubs could not be deployed. The
    error message
    indicates you are attempting to use a JRE. Configure
    Eclipse JRE to point to a JDK. The product
    documentation will help you with this process. It does not work for me. :-(
    I have tried JDK 1.3.1 and 1.4.1: same result: I get a "Could not find the main class: Program will exit"
    For free expert support please consider contacting
    Genuitec at [email protected] If just want any
    answer ask a newsgroup.
    WayneI'll try the support at '[email protected]' :)
    Michel
    Michel Szybist
    [email protected]
    Fax: +33 (0)173729897
    SMS: http://www.szybist.net/

  • Could not find the Main Class. Program will exit. Eclipse w/ JDK 6 RC

    Hi all,
    I needed to upgrade to JDK 6 RC w/ Eclipse while encountering a java.lang.NullPointer exception.
    Now I would like to compile my code with the new VM. I set all preferences to VM Version 6.
    Now I have the following Error:
    Java Virtual Machine Launcher
    Could not find the Main Class. Program will exit.
    What do I do now? Attached you find the Error Message.
    Bye
    Gerrit
    ================================The System.error looks like:
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Exception in thread "main"

    i wouldn't report a nullpointer to sun unless you're fairly confident there's some sort of bug. if main() can't be found it sounds to me like a config issue. if nullpointer, sounds like a code issue. post the code if you want, but i don't think sun will help you debug this.

  • Could not find the main class: projectRFID.ProjectGUI. Program will exit.

    Hello,
    I'm quite new in Java. I have an application with GUI. When I'm using Eclipse version 3.4.0 to run the application, all it is working perfect.
    But after I generate the jar from Eclipse, using the manifest file option from there and added the ProjectGUI to it, where is the main class, and try to run from the command line I receive the next error:
    root@slax:~/workspace# java -jar rfid.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: projectRFID/ProjectGUI
    Caused by: java.lang.ClassNotFoundException: projectRFID.ProjectGUI
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: projectRFID.ProjectGUI. Program will exit.
    root@slax:~/workspace#
    I run this application on a SLAX system with jdk6 update 7.
    I tried to generate the jar file even from the command line using the manifest file option but I still receive the same error.
    I hope somebody can help me!
    Thank you!

    cojogrizli wrote:
    The structure of my project in Eclipse is src/project/files.java and in jar file is src/files.java bin/class.java Dati/ and META-INF/.That's wrong. You don't need the .java files in the jar (but you can have them, if you want, they are just not used by Java).
    And each .class file must be in a directory that reflects its package. So in your example ProjectGUI.class must be in the directory projectRFID/ inside the .jar file.

  • Could not find the main class - Problem with Webservice-Access

    Hello Everybody,
    I'm having serious Problems with accessing a WebService (Tomcat-Axis) per executable jar-File.
    I constructed a simple GUI with 3 Textboxes 1 Button and 1 Resultbox.
    I use eclipse so it was no Problem to simple generate the Backgroundclient by Processing the .wsdl-File of the WS.
    Now I do this:
    Head_tServiceLocator serviceLocator = new Head_tServiceLocator();
    Head_t service = serviceLocator.getRPCCall();
    RPCCallSoapBindingStub Head_t = (RPCCallSoapBindingStub) service;and use the Webservice like an Object.
    All this works very well.
    Now the Problem:
    Head_t service = serviceLocator.getRPCCall();this Line has to throw a ServiceException.
    If i add a try-catch Block to Process the Message JAVA tells me after i exported to JAR (with Manifest-stuff and so on) and double Click on the JAR the following :
    Could not find the main Class - Program will exit.
    And if i add a throws Declaration to the Methodheader it tells me:
    Fatal Exception Occured - Program will exit
    But if i Comment out that Line at least the GUI is being displayed (so it DOES find the main-Class). But then of course the Webservice won't be accessed.
    All the JARs needed (axis.jar, commons-discovery.jar and so on) are in the same Directory as the Webservice-Client.jar
    Please Help me.
    Greets,
    Zap

    I am not done any typing mistake while creating the jar file i already followed the suggestion that you have mentioned but still the same error .
    This is my MANIFEST.MF file created under META-INF folder
    Manifest-Version: 1.0
    Class-Path: qtjambi-4.4.3_01.jar qtjambi-win32-msvc2005-4.4.3_01.jar
    Created-By: 1.5.0 (Sun Microsystems Inc.)
    Main-Class: Ui_MainWindow
    When i extracted the app.jar following this i got
    1. META-INF folder inside that MAINFEST.MF file the contents i have already placed above
    2. qtjambi-4.4.3_01.jar
    3. qtjambi-win32-msvc2005-4.4.3_01.jar
    4. Ui_MainWindow.class
    Please tell me whats wrong in that i can also give you the app.jar file please let me know the email id ..

  • Executable JAR sometimes could not find the main class.

    I have a little task, that seems to be trivial- but I have no idea how to solve the current problem.
    With a double click on my jar, a message comes up: JVM could not find the main class. Program will exit.
    The executable JAR is an export result from eclipse, with a manifest file that contains the right entry to the main class.
    But the curious thing is, that I have tested the little Swing-Application with 3 JRE versions: 1.4.2._06, 1.4.2_09 and 1.5 on Win2K and XP. Every time it works fine, but on one system it fails. (Normally it requires no external classpath settings, no path-entries to work.)
    The ugly system is Win XP with JRE 1.4.2_06 installed.
    Is there anybody with a good hint?
    Please let me know.
    Christiane

    OK, I ll try to explain it in other words:
    It is an executable jar file, with a manifest file that specifies the Main-Class. No other external files or jars or settings needed. Only a simple JDialog initialized from a parent JFrame.
    I d like to start it with a double click from the Win-Explorer, not from command line!
    As a result a dialog from "Java Virtual machine Launcher" displays
    "Could not find the main class. Programm will exit."
    My Problem is, I don t understand the launching process in depth. But I can reproduce the message with the following command:
    wrong:
    javaw -cp OrderAlertTest.jar OrderAlertParentDialog
    -> Error dialog appears
    correct:
    javaw -cp OrderAlertTest.jar apo.order.OrderAlertParentDialog
    -> OK
    Any idea?
    Christiane

  • Could not find the main class error with executable jar

    Hello,
    I have troubles creating an executable jar file and I ran out of ideas how to solve it so I would appreciate some help.
    I have created a jar file with the export function in eclipse
    the Manifest.MF file contains:
    Manifest-Version: 1.0
    Main-Class: view.AppTennisViewI tried starting the file with a batch file which contains following code:
    @echo off
    javaw -classpath c:\TennisHSQLDB_GC2\tennisApp.jar
    @start javaw -jar tennisApp.jar
    exitthe batch file and the jar are both located in c:\TennisHSQLDB_GC2.
    When i try command line I get the same result.
    I also tried alternate statements such as SET CLASSPATH iso javaw -classpath and including the classpath in the manifest file but no luck. It keeps given me the error: could not find the main class. program will exit
    Anyone any suggestions for my problem?

    nevermind, found it.
    classpath in manifest was incorrect

  • JAR  file:      could not find the main class.

    I have been working with Java satisfactorily for about two years.
    Installed a bigger hard disk.
    Installed Windows XP.
    Downloaded java.
    Downloaded java jdk 1.6.0_07
    Downloaded java3d 1.5.2
    Downloaded Eclipse Ganymede.
    A new project, a new class with an existing and working java file. It did function in eclipse.
    Generated a jar file with:
    Export \ JAR FILE \ select files and the destination for the Jar file .....
    ... next...next filled the field Main Class
    This generates the jar files, which have worked before.
    And now the error: could not find the main class.
    Thand you for your help.

    Executing a jar file means it will not read from the CLASSPATH environment variable. I learnt this the hard way a few weeks ago and I had to resort to different measures to work around it.
    Your problem does sound weird, but check that the last line in your manifest file is a new line. If it's not, the manifest is not read and parsed correctly.
    To test, do this: remove everything from the manifest that you don't need, except the Manifest-Version and Main-Class attributes. Make sure the last line is a new line, and see if it works.
    Cheers

  • Could not find the main class: examples/Fibo.  Program will exit. HELP!!!!!

    I am trying to write a program that prints out the first 10 numbers of the fibonacci sequence. Unfortunately I am unsuccessful so far and getting nothing but errors. I am using jasmin and I have no idea what I am doing as this is my first time ever dealing with this language. I am not 100% sure but I am under the assumption is assembly but I only have luck doing a search by Java Virtual Machine. Can anybody help me with the following error. Any help will be much appreciated. Thanks in advance!!!
    C:\Users\Chris\Desktop\jasmin\jasmin>java -cp . examples/Fibo
    Exception in thread "main" java.lang.VerifyError: (class: examples/Fibo, method:
    *main signature: ([Ljava/lang/String;)V) Expecting to find object/array on stack*
    *Could not find the main class: examples/Fibo.  Program will exit.*
    Here is my written program
    .class public examples/Fibo
    .super java/lang/Object
    ; standard initializer
    .method public <init>()V
    aload_0
    invokenonvirtual java/lang/Object/<init>()V
    return
    .end method
    .method public static main([Ljava/lang/String;)V
        .limit locals 5
         .limit stack 10
        getstatic java/lang/System/out Ljava/io/PrintStream;
         astore_1
         bipush 10
         istore_2
         iconst_0
         dup
         ;invokevirtual java/io/PrintStream/println(I)V;
         ;invokestatic java/lang/String/valueOf(C)Ljava/lang/String;
         invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
         istore_3
         bipush 1
         istore 4
         L0:
         iload 3
         dup
         iload 4
         dup
         ;invokestatic java/lang/String/valueOf(C)Ljava/lang/String;
         invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
         iadd
         iload 4
         istore 3
         istore 4
         iload_2
         ifeq L1
         iinc 2 -1
         goto L0
         L1:
         return
    .end method
    OK guys I give up...I redid the program and its working better now. 
    *Note to moderators....if you please, you may delete this.  Thanks!!!!!*
    Edited by: chris52204 on Apr 12, 2009 3:21 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    cojogrizli wrote:
    The structure of my project in Eclipse is src/project/files.java and in jar file is src/files.java bin/class.java Dati/ and META-INF/.That's wrong. You don't need the .java files in the jar (but you can have them, if you want, they are just not used by Java).
    And each .class file must be in a directory that reflects its package. So in your example ProjectGUI.class must be in the directory projectRFID/ inside the .jar file.

  • Help Me Urgent...Error: "Could not find the main class. Program will exit."

    Am using Eclipse 3.3.2
    I have a project called: SWDS
    Initially i have JDK1.6 installed in my system. At this time the project is running succesfully.
    But when i removed(uninstalled and environment path also removed) JDK 1.6 and installed JDK 1.5 and path also given.
    No changes are made in the project code.
    When I Run the project SWDS then showing an alert "*Could not find the main class. Program will exit*" and then getting error messages like:
    {color:#ff0000}java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"{color}
    Pleez help me how to rectify this error.

    The manifest file is missing from the project.
    I searched the net and read about the manifest file and I saw that it is supposed to be located in META-INF/MANIFEST.MF. I suppose that means project_root/META-INF/MANIFEST.MF, right ?
    I am asking this because I haven't got that much experience in Java and this is the first time I hear about a manifest file.
    Does anyone have any Ideea how I add a manifest file to a project with Eclipse SDK? I searched the menus and I didn't find anithing of such sort... o
    Does Eclipse have support for editing manifest files at all?

  • [newbie] [error] Could not find the main class

    This program does not compile on the command line, however they run within Eclipse 3.4.2 IDE. JDK does not seem to be installed in the usual path under C:\Program Files\Java..jdk, however I have installed the following which I presume should include the jdk:
    Eclipse 3.4.2
    SunGlass Fish Enterprise Server 2.1.1
    Any ideas? Is this a bug?
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\Java\JavaDev>di
    r
    Volume in drive C has no label.
    Volume Serial Number is D80F-8634
    Directory of C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\J
    ava\JavaDev
    08/12/2009 11:31 <DIR> .
    08/12/2009 11:31 <DIR> ..
    28/04/2009 18:32 <DIR> corejava8
    08/12/2009 10:42 2,505 Java CLI.lnk
    20/04/2008 11:44 241 Java Platform SE 6.url
    28/04/2009 18:32 <DIR> myCode Snippets
    08/12/2009 11:43 480 TestPassword.java
    3 File(s) 3,226 bytes
    4 Dir(s) 39,149,547,520 bytes free
    C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\Java\JavaDev>pr
    ompt $g
    dirVolume in drive C has no label.
    Volume Serial Number is D80F-8634
    Directory of C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\J
    ava\JavaDev
    08/12/2009 11:31 <DIR> .
    08/12/2009 11:31 <DIR> ..
    28/04/2009 18:32 <DIR> corejava8
    08/12/2009 10:42 2,505 Java CLI.lnk
    20/04/2008 11:44 241 Java Platform SE 6.url
    28/04/2009 18:32 <DIR> myCode Snippets
    08/12/2009 11:43 480 TestPassword.java
    3 File(s) 3,226 bytes
    4 Dir(s) 39,149,547,520 bytes free
    javac TestPassword.java'javac' is not recognized as an internal or external command,
    operable program or batch file.
    java testPassword.javaException in thread "main" java.lang.NoClassDefFoundError: testPassword/java
    Caused by: java.lang.ClassNotFoundException: testPassword.java
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: testPassword.java. Program will exit.
    type testPassword.javaimport java.io.Console;
    public class TestPassword {
    public static void main(String[] args) {
    Console cons;
    char[] passwd = {'x','x'};
    if ((cons = System.console()) != null &&
    (passwd = cons.readPassword("[%s]", "Password:")) != null);
    if (passwd.equals("joe"))
    {System.out.println("password is fine");}
    //Clear password array (Security note)
    java.util.Arrays.fill(passwd, ' ');
    javap'javap' is not recognized as an internal or external command,
    operable program or batch file.
    javac'javac' is not recognized as an internal or external command,
    operable program or batch file.
    echo $PATH$PATH
    echo %PATH%PATH
    echo %PATH%C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WIN
    DOWS\system32\WBEM;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\WINDO
    WS\system32\WindowsPowerShell\v1.0;c:\Program Files\Microsoft SQL Server\100\Too
    ls\Binn\VSShell\Common7\IDE\;c:\Program Files\Microsoft SQL Server\100\Tools\Bin
    n\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsof
    t Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Sun\SDK\bin;C:\PROGRA~1\MI
    CROS~2\Office12
    DIRVolume in drive C has no label.
    Volume Serial Number is D80F-8634
    Directory of C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\J
    ava\JavaDev
    08/12/2009 11:31 <DIR> .
    08/12/2009 11:31 <DIR> ..
    28/04/2009 18:32 <DIR> corejava8
    08/12/2009 10:42 2,505 Java CLI.lnk
    20/04/2008 11:44 241 Java Platform SE 6.url
    28/04/2009 18:32 <DIR> myCode Snippets
    08/12/2009 11:43 480 TestPassword.java
    3 File(s) 3,226 bytes
    4 Dir(s) 39,149,498,368 bytes free
    javaw TestPassword.java
    dirVolume in drive C has no label.
    Volume Serial Number is D80F-8634
    Directory of C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\J
    ava\JavaDev
    08/12/2009 11:31 <DIR> .
    08/12/2009 11:31 <DIR> ..
    28/04/2009 18:32 <DIR> corejava8
    08/12/2009 10:42 2,505 Java CLI.lnk
    20/04/2008 11:44 241 Java Platform SE 6.url
    28/04/2009 18:32 <DIR> myCode Snippets
    08/12/2009 11:43 480 TestPassword.java
    3 File(s) 3,226 bytes
    4 Dir(s) 39,149,494,272 bytes free
    java HelloWorld.javaException in thread "main" java.lang.NoClassDefFoundError: HelloWorld/java
    Caused by: java.lang.ClassNotFoundException: HelloWorld.java
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: HelloWorld.java. Program will exit.
    type HelloWorld.javapublic class HelloWorld {
    public static void main(String[] args) {
    System.out.println("Hello world!");
    echo %PATH%C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WIN
    DOWS\system32\WBEM;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\WINDO
    WS\system32\WindowsPowerShell\v1.0;c:\Program Files\Microsoft SQL Server\100\Too
    ls\Binn\VSShell\Common7\IDE\;c:\Program Files\Microsoft SQL Server\100\Tools\Bin
    n\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsof
    t Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Sun\SDK\bin;C:\PROGRA~1\MI
    CROS~2\Office12
    java -versionjava version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
    >

    java testPassword.javaThe JRE doesn't run source code. You haven't installed a JDK. Forget Eclipse, you need to revisit some fundamentals, my friend.

  • Could not find the main class: oracle.ide.boot.Launcher.  Program will exit

    Hi,
    I have installed Oracle11g_win64_11gR1, Database and Client.
    The issue is unable to invoke "sqldeveloper", getting the following error message. Could you please help ?
    FYI. I have already downloaded and installed installed JRE and JDK.
    ie. C:\Program Files (x86)\Java\jre6\ and C:\Program Files\Java\jdk1.6.0_24, still did not work.
    C:\Users\oracle>java -version
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
    Let me know, if you need more information. Here is the error message.
    Error Message
    =========
    (1) if I invoke sqldeveloper, directly from the location " C:\app\oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper\bin " using explorer, I do get error message
    "Unable to find a java Virtual Machine.
    To point to a location of java Virtual machine please refer to the Oracle9i JDeveloper Install Guide ( jdev/install.html)"
    (2) if I invoke sqldeveloper, directly from the locationC:\app\oracle\product\11.1.0\client_1\sqldeveloper, it prompts me to enter "full path for java.exe".
    When I enter full path and continue, still it continue to prompt and ask the same input.
    (3) if I invoke sqldeveloper from from command prompt using the batch file "sqldeveloper.bat"
    C:\Users\oracle>C:\app\oracle\product\11.1.0\client_1\sqldeveloper\sqldeveloper\
    bin\sqldeveloper.bat
    C:\Users\oracle>java -Xmx512M -Xverify:none -XX:JavaPriority10_To_OSPriority=10
    -XX:JavaPriority9_To_OSPriority=9 -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_F
    LAG=true -Dsun.java2d.ddoffscreen=false -Dwindows.shell.font.languages= -Dide.co
    nf="sqldeveloper.conf" -Dide.home.dir.name=.sqldeveloper -classpath ..\..\ide\l
    ib\ide-boot.jar;..\..\jdev\lib\xmleditor.jar;..\..\ide\lib\oicons.jar;..\..\..\j
    dbc\lib\ojdbc5.jar;..\..\jlib\jewt4.jar;..\..\jlib\share.jar;..\..\sqldeveloper\
    lib\jle2.jar oracle.ide.boot.Launcher
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/ide/boot/Launc
    her
    Caused by: java.lang.ClassNotFoundException: oracle.ide.boot.Launcher
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: oracle.ide.boot.Launcher. Program will exit.
    OS
    ==============
    MS Windows 7 Home Premium
    sqldeveloper.conf
    ===================
    SetSkipJ2SDKCheck true
    IncludeConfFile ../../jdev/bin/ide.conf
    AddVMOption -Dapple.laf.useScreenMenuBar=true
    AddVMOption -Dcom.apple.mrj.application.apple.menu.about.name="SQL_Developer"
    AddVMOption -Dcom.apple.mrj.application.growbox.intrudes=false
    AddVMOption -Dcom.apple.macos.smallTabs=true
    AddVMOption -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true
    AddJavaLibFile ../../jdev/lib/xmleditor.jar
    AddJavaLibFile ../../ide/lib/oicons.jar
    AddJavaLibFile ../../jlib/jewt4.jar
    AddJavaLibFile ../../jlib/share.jar
    AddJavaLibFile ../ide/jlib/xmlef.jar
    AddJavaLibFile ../../sqldeveloper/lib/jle2.jar
    AddJavaLibFile ../../sqldeveloper/lib/oracle.dbtools.logging.jar
    AddVMOption -Dsun.java2d.ddoffscreen=false
    AddVMOption -Dwindows.shell.font.languages=
    IncludeConfFile sqldeveloper-nondebug.conf
    SetJavaHome C:\Program Files\Java\jdk1.6.0_24
    Edited by: sivapara on Feb 16, 2011 1:08 PM

    I was able to resolve this issue by performing following.
    1. Go to the location where sqldeveloperW.exe is being executed from.
    2. You will find a file sqldeveloper.conf in that location. Edit this file and change the value of IncludeConfFile to point to actual place. For me following were old and new values.
    OLD (Wrong) : IncludeConfFile ../../jdev/bin/ide.conf
    NEW (Correct) : IncludeConfFile ../../ide/bin/ide.conf
    After making above change in the sqldeveloper.conf file. Save and close it. Restart SQLDeveloper. You will not get the error anymore.
    Thanks
    Ravi

  • Execute jar file: "could not find the main class" program will terminate

    Hey,
    I am new to Java. I have started to make a small java program which supposed to help me at my studies to lean the Dominic Memory System. I have used the latest version of Netbeans 5.5.1 to build my program in. I have two problems which I cannot figure out how to solve, please help me.
    The first problem is that the java script I have made works when I compile it in Netbeans, but when I create a Jar file it does not work. I receive a pop up message in windows ?could not find the main class program will terminate? when I execute the jar file.
    The second problem I have is that I need to compare the strings generated by the "numbers" and "TIP" and if the numbers is not identical the numbers in the ?Center? JPanel should be highlighted as red.
    If anyone would like to clean up the code I would be pleased. I have copied quite a lot from anyone because of my one lack of knowledge.
    * GoListener.java
    * Created on 12. september 2007, 21:48
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package grandmaster;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Vector;
    import java.util.StringTokenizer;
    import java.awt.Color;
    * @author Computer
    public class GoListener implements ActionListener {
    private JTextField viewer;
    private JTextField TIP;
    private JTextField freq;
    private JTextField max_num;
    private Vector numbers;
    public GoListener(JTextField j,JTextField k, JTextField m, JTextField f, Vector n) {
    freq = f;
    max_num = m;
    viewer = j;
    numbers = n;
    TIP = k;
    public void actionPerformed(ActionEvent e){
    int time = Integer.valueOf(max_num.getText());
    int f = Integer.valueOf(freq.getText());
    if (e.getActionCommand() == "GO") {
    for (int i = 0; i< time;++i) {
    int number=0;
    number = (int)Math.floor(100*Math.random());
    while(number>51){
    number = (int)Math.floor(100*Math.random());
    if(number<=9){
    viewer.setText(" "+"0" + String.valueOf(number) + " ");
    } else{
    viewer.setText(" " + String.valueOf(number) + " ");
    viewer.paintImmediately(viewer.getBounds());
    numbers.add(number);
    try {
    Thread.sleep(f*1000);
    } catch (Exception exp) {
    viewer.setText(" XX ");
    viewer.paintImmediately(viewer.getBounds());
    if (e.getActionCommand() == "VIEW") {
    try {
    //int numb = Integer.valueOf( TIP.getText() ).intValue();
    StringTokenizer tokenizer = new StringTokenizer(TIP.getText(), " ");
    String[] split = null;
    int tokenCount = tokenizer.countTokens();
    if (tokenCount > 0) {
    split = new String[tokenCount];
    for (int current = 0; current < tokenCount; current++) {
    split[current] = tokenizer.nextToken();
    viewer.setText(" " + String.valueOf(numbers) + " ");
    // k=numbers(1);
    /*while(c<i){
    String.valueOf(k).equals(split[1]);
    c++;
    TIP.setText(" " + split[2] + " ");
    } catch (Exception exp) {
    try {
    //string testit = numb.toString();
    //String str = "" + numb;
    //viewer.setText(str);
    //viewer.setText(numbers.toString());
    numbers.clear();
    } catch (Exception exp) {
    * Main.java
    * Created on 12. september 2007, 21:07
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package grandmaster;
    import java.util.Vector;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.JButton;
    import java.awt.*;
    import grandmaster.GoListener;
    * @author Computer
    public class Main extends JFrame {
    private JTextField viewer;
    public JTextField TIP;
    // private TextInputPanel TIP;
    private Vector numbers;
    /** Creates a new instance of Main */
    public Main() {
    numbers = new Vector();
    JPanel p = new JPanel(new GridLayout(0,4));
    JButton go = new JButton();
    JButton view_num = new JButton();
    go.setText("Go!");
    go.setVisible(true);
    go.setActionCommand("GO");
    view_num.setText("VIEW");
    view_num.setVisible(true);
    view_num.setActionCommand("VIEW");
    JTextField max_num = new JTextField();
    max_num.setText("5");
    JTextField freq = new JTextField();
    freq.setText("1");
    viewer = new JTextField();
    viewer.setText("XX");
    TIP = new JTextField("");
    p.add(go);
    p.add(max_num);
    p.add(freq);
    p.add(view_num);
    getContentPane().add(p,BorderLayout.NORTH);
    getContentPane().add(viewer,BorderLayout.CENTER);
    getContentPane().add(TIP,BorderLayout.SOUTH);
    setSize(200,200);
    GoListener g = new GoListener(viewer,TIP,max_num, freq, numbers);
    go.addActionListener(g);
    view_num.addActionListener(g);
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    Main window = new Main();
    window.setVisible(true);
    }

    NetBeans questions should be posted to the NB site. It has mailing lists and associated forums.
    This tutorial from the NB site addresses running programs outside of NB
    http://www.netbeans.org/kb/articles/javase-deploy.html
    When you compare objects, use ".equals()" and reserve == for comparing values.

  • Executable JAR file: Could not find the main class.

    Hello,
    I have a problem with making an executable JAR file.
    I have written a JAVA program that consists of five different classes of which User.java is the main class and I have saved a text document with Main-Class: User and a blank line after that.
    If I try:
    jar cmf MainClass.txt User.jar User.class Beheerder.class Operator.class Manager.class MaakVisueelSchema.class
    it makes a executable jar file which actually works! :)
    But when the Operator class trys to open the MaakVisueelSchema class the screen stays blank.
    I can run MaakVisueelSchema with java MaakVisueelSchema.
    So I tried to make an executable JAR that consists only of MaakVisueelSchema, the same way as I did for User:
    Main-Class: MaakVisueelSchema
    jar cmf MainClass.txt MaakVisueelSchema.jar MaakVisueelSchema.class
    Then I get the error message:
    Could not find the main class. Program will exit.
    from the Java Virtual Machine Launcher.
    The big difference between MaakVisueelSchema and the other classes is that MaakVisueelSchema contains a PaintComponent method and an ComponentListener. Is it possible that one of those creates the error?
    Can anyone help me with this problem?
    Thanks in advance!
    Bye!

    Yes,
    I tried:
    jar xvf MaakVisueelSchema.jar
    and it returns:
    META-INF/
    META-INF/MANIFEST.MF
    MaakVisueelSchema.classN/G. You need to manually create a manifest file in a text editor, have it point to your main class, and enter it in your jar command as an argument.

  • Could not find the main class (with every jar)

    This isn't a developer question. I get the error Could not find the main class with every jar I try to open (for example the jar downloaded from https://gjar.dev.java.net/ gives the same problems - and I don't think there is something wrong with that JAR). It isn't a problem with the jar or MANIFEST because the same jar works fine on my laptop. So there is something wrong with my JRE installation, but what?
    I tried to remove and reinstall the JRE 6 Update 18 but that didn't work. When I run the JAR with command line java -jar "file.jar" it works fine, but if I dubbelclick on it I get the error message (and it's irritating me).
    I'm a bit desperate so I hope that someone here can help me ;)
    Thanks in advanced

    hai T.B.M ... Sorry to post here... I know that i posted my question in wrong thread..but i dont have another solution to contact with you.. I had seen your answers which are really excellent and helped to do my project..
    Now i am having very less time to complete my project and i am very new to JMF.. I am not getting output in JMF video capture ..please check the code and guide me where i gone wrong.......please pardon me once again to post here.. Heres my code
    import javax.media.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.event.*;
    import javax.media.protocol.*;
    import java.io.*;
    import javax.media.control.StreamWriterControl;
    public class webcam implements ActionListener,ControllerListener
    boolean eomReached = false;
    boolean realized = false;
    JFrame f;
    BorderLayout bd1;
    CaptureDeviceInfo device;
    MediaLocator m1;
    Player player;
    Component videoScreen;
    JButton b1,b2;
    Processor processor;
    DataSource ds=null;
    DataSink fileWriter=null;
    JLabel status=new JLabel("");
    public webcam()
    try
    JFrame f=new JFrame();
    JPanel p =new JPanel();
    JPanel p1=new JPanel();
    device=CaptureDeviceManager.getDevice("vfw:Microsoft WDM Image Capture (Win32):0");
    m1=device.getLocator();
    System.out.println("1");
    processor.configure();
    processor = Manager.createProcessor(m1);
    processor.setContentDescriptor(new
    FileTypeDescriptor(FileTypeDescriptor.MSVIDEO));
    ds=processor.getDataOutput();
    player.addControllerListener(this);
    MediaLocator dest = new MediaLocator("file://foo.avi");
    fileWriter = Manager.createDataSink(ds, dest);
    fileWriter.open();
    ds.connect();
    ds.start();
    player=Manager.createPlayer(m1);
    player.addControllerListener(this);
    blockingRealize();
    videoScreen=player.getVisualComponent();
    b1=new JButton("START");
    b2=new JButton("STOP");
    bd1=new BorderLayout();
    p.setLayout(bd1);
    p1.add(b1);
    p1.add(b2);
    p.add("South",p1);
    p.add("East",videoScreen);
    f.getContentPane().add(p);
    f.setVisible(true);
    f.setSize(500,500);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    b1.addActionListener(this);
    b2.addActionListener(this);
    catch(Exception e){}
    public void actionPerformed(ActionEvent e)
    if(e.getSource()==b1)
    try{
    processor.start();
    player.start();
    fileWriter.start();
    catch(Exception e1){}
    if(e.getSource()==b2)
    try{
    player.stop();
    processor.stop();
    processor.close();
    fileWriter.close();
    catch(Exception e2){}
    public static void main(String args[])
    webcam obj=new webcam();
    public synchronized void blockingRealize() {
    player.realize();
    while (!realized) {
    try {
    wait();
    } catch (java.lang.InterruptedException e) {
    status.setText("Interrupted while waiting on realize...exiting.");
    System.exit(1);
    public synchronized void controllerUpdate (ControllerEvent event) {
    System.out.println("myPlayer generated "+event.toString());
    if (event instanceof RealizeCompleteEvent) {
    realized = true;
    notify();
    } else if (event instanceof EndOfMediaEvent) {
    eomReached = true;
    }

Maybe you are looking for

  • Idea pad N580 Clean install windows 8.1 experiment

    LOl , My sister has an  Idea pad N580 today at 9:00 am I will atempt a clean install of windows pro 8.1 ... Will report back for those that are interested in clean install for thier Idea pad's N580'S I have pre burned a dvd with all needed driversfor

  • How to enter text in table using pages on iPad?

    using my IPad I'm trying to enter text in a table. put the curser in a cell but keyboard doesn't appear. Tried copying and pasting. that doesn't work either.any ideas?

  • The ADS call has failed - Error

    Dear all I have created one web dynpr application with interactive forms followed by saptechical.com, If i run the web dynpr application, it thrown an error "WebDynpro Exception: The ADS call has failed. You can find information about the cause in th

  • When downloading software update, ipad restarts

    I tried to update to 6.1 and my ipad went into recovery mode.  When I try to reconnect to Itunes and attempt to download and restore the Ipad, the Ipad itself turns off and on several times during the download, corrupting the download.  The download

  • Bulk collect usage in cursor for loop

    Hi Team, I have one cursor like below assuming cursor is having 3000 records, CURSOR csr_del_frm_stg(c_source_name VARCHAR2 , c_file_type VARCHAR2) IS SELECT stg.last_name,stg.employee_number,stg.email FROM akam_int.xxak_eb_contact_stg stg MINUS SELE