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

Similar Messages

  • Installing Oracle client 10.2: Could not find the main class...

    What should I configure on my PC to get Oracle Client for Win 32 working? When I try to install the client (10.2) setup.exe cannot start JVM and fails with the message Could not find the main class.
    I use Windows XP.

    Hello,
    What's version of Java installed on your machine? Download and install JDK 1.5 and/or put jdk in PATH variable.
    Regards

  • Could not find the main class. Program will exit!

    I have created many Executable Jar files before, and this one I did the same. When I run the jar file, (Clicking on it) I get the "Could not find the main class. Program will exit!" error message. When I run the jar file through DOS I get this Stack trace:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/ControllerListener
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
    Any Ideas? I did a search on google, and looks like others have had this problem but found no answer.
    US101

    There could be several reasons for getting this "Could not find main class" error message. From your stack trace it looks like the class javax/media/ControllerListener is not in your class path. Make sure your manifest file has a line like this:
    Class-Path: pathToTheJarFileWithControllerListenerClass.jar otherJars.jar
    This error message is also generated whenever any static initialization errors out giving the misleading error message implying that there is something wrong with the main class. Prior to starting your main class, static initialization of any static variables takes place. In my case, I was initializing a resource bundle, and forgot to include the property file in my building of the jar file. Well this failed of course and the generic error message appeared. It took many long hours to figure out it didn't have anything to do with the manifest file or the main class itself.
    HTH,
    John Bender

  • 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 Executable] Could not find the main class. Progam will exit.

    Hello,
    I am a French person. Excuse me for my English who is not perfect.
    I seek to create an achievable "jar". I followed the instructions given in the url http://java.developpez.com/faq/java/?page=execution#creationJar, and on the site of Sun.
    I have today only one class which I posed in a specific repertory "Class".
    Appli
    |__Class
    |__Src
    |__META-INFThe contents of my "Manifest" is stored in repertory META-INF with the name "Commission2007.MF" and its contents are as follows:
    Manifest-Version: 1.0
    Created-By: 1.5.0 (Sun Microsystems Inc.)
    Main-Class: Commission2007
    .I've left the space line at the end of the file.
    Here the result of execution of my order "jar":
    C:\#Java Dev\2007_Commissionnements>jar cvfm Commission2007.jar META-INF/Commission2007.MF -C Class/ .
    manifest ajout�
    ajout : Class/./(entr�e = 0) (sortie = 0)(0% stock�)
    ajout : Class/./Commission2007.class(entr�e = 9060) (sortie = 4547)(49% compress�s)I controlled the assignment of the extension "jar" in "Working station = > Tools = > Files Option = > Files Type = > .jar Selection = > Advance =
    Open = > Change = >" C:\Program Files\Java\jre1.6.0\bin\javaw.exe "- gravel bank" %1 "% *". Thus not of problem on this side there!When I double click on the file "jar" lately created, I have the error message according to: "Could not find the main class. Progam will exit. " I do not understand the reason of this error. I consulted all the subjects on the treating Net of this subject but without result. I thus call upon you.
    Perhaps that the cause is in my code which however functions perfectly when I carry out it with the order: "Commission2007 java". The class "hand" is quite present to see the code below. You can find the totality of my code on the bond http://www.developpez.net/forums/showpost.php?p=1870361&postcount=74
    import �
    public class Commission2007 extends Frame implements ActionListener, WindowListener
         �
         // Construction de la class EdText
         // D�finition et affichage de la bo�te de dialogue
         Commission2007()
         �
         // D�finition d'une frame pour l'application et affichage de la
         // bo�te de dialogue
         public static void main(String args[])
              Commission2007 editer = new Commission2007();
              editer.show();
              editer.addWindowListener(editer);
    }I thank you in advance for your assistance.
    Cordially, Gilles.

    Salut,
    It has been my experience that it is never a good idea to name your .MF file anything else other than MANIFEST.MF.
    Try naming your .MF file MANIFEST.MF and rebuild your JAR.
    Bon chance.

  • JXDatePicker - could not find the main class?

    Hi all,
    I am trying to play with the JXDatePicker swinglabs.
    I wrote this trivial code:
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import org.jdesktop.swingx.JXDatePicker;
    public class TestJXDatePicker implements ActionListener
        public JLabel label = new JLabel();
        public JXDatePicker datePicker = new JXDatePicker(System.currentTimeMillis());
         public TestJXDatePicker()
              label.setText("Choose Date by selecting below.");
              JFrame frame = new JFrame();
              frame.getContentPane().add(label, BorderLayout.NORTH);
              frame.getContentPane().add(datePicker, BorderLayout.CENTER);
         public void actionPerformed(ActionEvent arg0)
              if (arg0.getSource()==datePicker)
                   label.setText(datePicker.getDate().toString());          
        public static void main(String[] args)
             new TestJXDatePicker();
    }Unfortunately, I get this message:
    Java virtual machine Launcher
    Could not find the main class. program will exit.
    the trace is:
    java.lang.UnsupportedClassVersionError: org/jdesktop/swingx/JXDatePicker (Unsupported major.minor version 49.0)
         at java.lang.ClassLoader.defineClass0(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"
    ANY IDEA???
    JDK = 1.4 (also tried with compiler comliance lever 5.0) nothing :-(

    I had a look through the SwingX stuff and decided that it looks like the project has stalled (the main site says something about being overhauled - but it's been like that for ages).
    I'm using JCalendar - there's recently been a new release and it's brilliant.
    Check out http://www.toedter.com/en/jcalendar/.
    Hope this helps.
    Paul C.

  • "Could not find the main class" Error While installing 11g in windows 7

    Dear All,
    I am getting error message while installing oracle 11g R1(32 bit) on Windows 7(32 bit)
    I have downloaded from oracle website only..
    After Clicking the OUI I am getting the Error Message pop up is "Could not find the main class.Program will exit"
    I don't know what is the reason behind this error .
    what would be the reason for this error..
    Pls help me....
    By
    Muthu

    I think you need to download oracle software again...
    Oracle Universal Installer - Could not find main class

  • Deployment - "Could not find the main class."

    I am trying to deploy an executable version of my project. From the IDE, I select Run-Deploy-New Deployment Profile; then I choose JAR File. I leave the default directory, and I've tried various names. I select "Include Manifest File" and then add my main class. I then go to Run-Deploy-[application].deploy. When I try to run the resulting JAR file with javaw, I get the following message:
    Java Virtual Machine Launcher
    Could not find the main class. Program will exit!
    When I try to run it from the command line using java -jar [application].jar, I get this message:
    -jar: illegal argument
    I am using JDev 10.1.3.0.4 on Windows 2000.
    What am I doing wrong?

    If you create a new project in JDeveloper.
    Add a new class
    public class Class1 {
    public static void main(String[] args) {
        System.out.println("It Works");
    [\pre]
    Create a new JAR file
    In the deployment profile point to Class1 as the Main Class
    Deploy the JAR file
    and then from the command line write
    java -jar works.jar Class1
    Does it work?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • 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?

  • Could not find the main class. Program will fail

    Hi I have just downloaded jdeveloper latest 10.2.1 full production version and unzipped and installed.
    When i launch jdevw.exe it comes up with a pop up error saying "Could not find the main class. Program will fail"
    clickin ok launches jdeeloper.. i developed a sinple jsp file and try to run it, now it says that fatal error in messages.
    Help please..
    Ram

    Now a new error.
    Internal compilation error, terminated with a fatal exception
    I changed installation from c:\program files to c:\ drive .. i got rid of the pop up error !!
    but when I create a simple jsp file, in a new workspace/project.. and run it.. it doesnot launch OC4J..
    In the messages pallette it says
    Internal compilation error, terminated with a fatal exception
    in the jdev console..
    java.lang.NullPointerException
    at oracle.jdeveloper.model.JProjectConfiguration.getJdkClassPath(JProjec
    tConfiguration.java:484)
    at oracle.jdeveloper.model.JProject.getClassPath(JProject.java:743)
    at oracle.jdevimpl.webapp.jsp.JspQuickCompiler.translate(JspQuickCompile
    r.java:225)
    at oracle.jdevimpl.webapp.model.content.DocumentInfoManager$DocumentInfo
    Impl$BackgroundErrorCheckingTimerTask.run(DocumentInfoManager.java:919)
    at java.util.TimerThread.mainLoop(Timer.java:432)
    at java.util.TimerThread.run(Timer.java:382)
    Wht the hell is goin on folks.. is this tool that bad.. .. I just downloaded and trying to evaluate it for my company ..!!

  • Error: "Could not find the main class: Files\NetBeans"

    I am working on a WorldWind mapping application but I think this issue is more of a straight Java question. I was attempting to add a web service reference by means of the NetBeans IDE. The reference compiled as it should have but then the application would not run. I deleted the reference, commented out all the code that used the web reference, basically restored all the code to how it was before trying to add the web service. The applicaiton still will not run with the message that it can't find the main class. I do, however, get a clean build. What should I do to fix this?
    Here is the error: "Could not find the main class: Files\NetBeans"
    thanks!

    nigel25840 wrote:
    I am working on a WorldWind mapping application but I think this issue is more of a straight Java question. I was attempting to add a web service reference by means of the NetBeans IDE. The reference compiled as it should have but then the application would not run. I deleted the reference, commented out all the code that used the web reference, basically restored all the code to how it was before trying to add the web service. The applicaiton still will not run with the message that it can't find the main class. I do, however, get a clean build. What should I do to fix this?
    Here is the error: "Could not find the main class: Files\NetBeans"
    thanks!Sounds like something (a .cmd file or .bat file, perhaps) is set up to launch NetBeans with a command line like this:
    java -classpath ... c:\Program Files\NetBeans ...
    So since the path has embedded space(s) in it, it thinks you are wanting to run a class named "Files\NetBeans", which does not exist.
    You need someone there who knows what they are doing to look into it for you.

  • [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.

  • 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.

Maybe you are looking for

  • Missing Left line on all the invoices when printing from APPS

    Hi Guys, I need help here as i am learning XML. I customized one of my invoices RTF template and looks fine. When i generate the Invoice output from Apps through concurrent manager I am getting output with missing left line. When i tried to print fro

  • How can I get rid of green pixelation on a re-exported video?

    I recently finished a film that ended on the 18-minute mark. When the film was done, I deleted everything except the finished video file to save space. I had to use this finished video file to cut a 15-minute version of the film for a festival next w

  • How to read multiple files and generate multiple files

    Dear all, I would like to process some LTE measurement files. Currently I can only load a single file and process the data and save it to a single binary file. Since I would like to run the code continously, could someone show me how I can modify the

  • SQL FUNCTION to compute MEDIAN

    Hi Just as we use MAX and MIN to compute the maximum and minimum values using SELECT query in SQL, does anyone know of a direct/indirect function/method to calculate the MEDIAN of a given set of values. Powerbuilder provides median function. I am loo

  • Search (priority) of linked contacts between iCloud and facebook

    Hi, on my iOS I have linked contacts between iCloud and facebook. There have to be a priority, at least for searching for details in the contact, because i only find some of the contacts that a have a same note set by me in the iCloud card. When I li