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

Similar Messages

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

  • Running JAR files (Could not find the main class error)

    Hi all,
    I'm having a bit of a problem with my app. I created an application with the current Netbeans edition, containing multiple .class files, and a few .jar libraries that are needed too.
    Now I'm having problems with running the .jar that the Netbeans creates, so I figured I'd make a one on my own.
    Okay, this is what I have going on:
    C:\MyApp\ <--- root for the application
    C:\MyApp\src\ <--- this is where the .class files are
    C:\MyApp\lib\ <--- here are the .jar libraries which are needed
    C:\MyApp\jar.exe
    C:\MyApp\Manifest.txt
    Now I have a couple questions.
    1. Is it ok that the .class files all have a "package MyPackage; " thing in the beginning?
    2. How should I proceed on making the Manifest.txt file correctly? I have tried various different outputs and read a few topics here from how it should be done, but I just can't nail it. Currently my Manifest looks like:
    Main-Class: MyPackage/Myapp
    Class-Path: lib/xxx.jar lib/xxx2.jar lib/xxx3.jar
    Any help would be appreciated! Thanks.

    Oh, almost forgot:
    3. The right way to create a jar? I used this:
    C:\MyApp\jar cmf Manifest.txt MyJar.jar src\*.class
    And system is Windows XP.

  • 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

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

  • The manifest file "could not find the main class."

    The main class file is inside a folder in the created Jar file, but is not in a package. But when I double-click the Jar file, it says it could not find the main class. I am using Windows. I have tried each of the following lines in the manifest, but none are working:
    Main-Class: Installer
    Main-Class: setupFiles/programFile/Installer
    Main-Class: setupFiles\programFile\Installer
    Main-Class: setupFiles.programFile.InstallerThe main class is inside the setupFiles/programFile directory. Please Help!
    Thanks in advance,
    ~ Tom

    Hi Tom,
    The main class file is inside a folder in the created
    Jar file, but is not in a package. This is the problem. A JAR file is not an arbitrary ZIP file, where you can arrange directories as you like. The structure of a JAR file always has to follow the package structure. So your Installer class must be on the top level and not in directory setupFiles/programFile.
    You might add non-class files in other directores and can access them as resources, but you have to put the class files into their "natural" directories.

  • 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;
    }

  • Error msg Could not find the main class.Program will exit. in jar execution

    Hello,
    I have created a jar so that I can used it in the webapp.
    but when I click on it it says "Could not find the main class.Program will exit."
    I searched a lot in the net and found that it has to do with the manifest file.
    I even updated the manifest file using the command "jar umf main.txt filefolderupload.jar" with the class name mention along with the package heirarchy.
    (pakage heirarchy in /,\ and .)
    I am using JDK 1.5 . and have Updated JRE 1.6.
    Also tried with extending the class with JApplet, but in vain.
    Kindly help me in the above mention issue.
    tia,
    Sarwa

    This post hints at a number of misunderstandings on your part, and raises a couple of important questions.
    Note that this 'simple question' has a complicated answer. Given the complexity of it, it might pay to add Dukes to it, ..a lot of Dukes.
    The important questions are.
    1) Does this file/directory uploader need to provide the end-user with a file dialog in which they can choose a local directory to upload, or will a multi-file chooser do?
    2) Does this uploader need to upload to foreign sites, or does it upload back to its own server?
    Looking at this table I prepared to describe the [uploader/local file access|http://pscode.org/test/uploader/fileuploader.html] possibilities, if the answers to the questions are 'multi-file chooser will do' and 'home site only', the best option is a sandboxed app. launched using webstart (JNLP) - option 5. If either of those questions go the other way, option 6 (digitally signed with extended permissions) is needed.

  • 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

  • Executable Jar:  Could not find the main class. Program will exit.

    I have a jar which contins the class Main.class.
    Following details are specified in the Manifest file.
    Manifest-Version: 1.0
    Main-Class: Main
    However, when I double click the jar file, I get the error...
    Could not find the main class. Program will exit.
    What could be wrong?
    Thanks in advance
    Sachin

    hi,
    i've got exactly the same problem: double clicking the archive ends with an error (can't find the main class) but working with the command line executes the file!??!
    does anyone know a solution?
    thanks

  • JAR "could not find the main class"

    I'm running applications under XP.
    In my profile:
    I have a lot of problems double clicking on a jar file.... it always gives me this error: "could not find the main class"...
    In other XP profiles:
    All jar files run properly!
    Help me!

    Is your manifest correct? Does it contain the line
    Main-Class: Application
    or
    Main-Class: package/Application
    in the main section of the manifest (case sensitive)? Can the interpreter find all the required class files?
    Stephen

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

  • 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

  • Could not find the main class: SearchExcel.  Program will exit.  ????

    sekic0429{uabudd_milou}[w10/rbssw/2.0] pwd
    /tmp/MyJava/jexcelapi
    sekic0429{uabudd_milou}[w10/rbssw/2.0] printenv CLASSPATH
    /tmp/MyJava/excelapi:/app/jdk/1.6.0_16/jre/lib:/app/jdk/1.6.0_16/lib
    sekic0429{uabudd_milou}[w10/rbssw/2.0] ls
    build ExcelSearch.java index.html resources SearchExcel.java~ tutorial.html
    docs ExelSearch.java~ jxl.jar SearchExcel.class src workbook.dtd
    ExcelSearch.class formatworkbook.dtd jxlrwtest.xls SearchExcel.java TestSpecification.xls
    sekic0429{uabudd_milou}[w10/rbssw/2.0] javac -extdirs . ExcelSearch.java
    sekic0429{uabudd_milou}[w10/rbssw/2.0]
    sekic0429{uabudd_milou}[w10/rbssw/2.0] java ExcelSearch
    Exception in thread "main" java.lang.NoClassDefFoundError: ExcelSearch
    Caused by: java.lang.ClassNotFoundException: ExcelSearch
    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: ExcelSearch. Program will exit.
    sekic0429{uabudd_milou}[w10/rbssw/2.0] cat ExcelSearch.java
    import java.io.File;
    import java.io.IOException;
    import java.util.Date;
    import jxl.*;
    import jxl.read.biff.BiffException;
    public class ExcelSearch
    public static void main(String[] args)
    try
    Workbook workbook = Workbook.getWorkbook(new File("TestSpecification.xls"));
    catch (IOException e)
    e.printStackTrace();
    catch (BiffException e)
    e.printStackTrace();
    Regards Peter, hope for answer

    r035198x wrote:
    Where is SearchExcel.class?Excellent question, though I think I spotted a problem with the cp supplied.
    Note the documentation for -cp state (in part)
    For example, if directory foo contains a.jar and b.JAR, then the class path element foo/* is expanded to a A.jar:b.JAR, except that the order of jar files is unspecified.So instead of this..
    java -cp /tmp/MyJava/excelapi:/app/jdk/1.6.0_16/jre/lib:/app/jdk/1.6.0_16/lib SearchExcel..try this..
    java -cp /tmp/MyJava/excelapi/*:/app/jdk/1.6.0_16/jre/lib:/app/jdk/1.6.0_16/lib SearchExcelNotes:
    1) Adding the JRE classes to the classpath should not be necessary, but I left the rest of the cp unaltered to highlight the one specific difference I am suggesting.
    2) When posting code, code snippets, HTML/XML or input/output, please use the code tags. The code tags help retain the indentation and formatting of the sample. To use them, select the sample text and click the CODE button.
    If that still fails, tell us more specifically where the SearchExcel class is by copy/pasting the output (within code tags) of the command..
    prompt>jar -tvf mysearchexcel.jarWhere, of course, you replace 'mysearchexcel.jar' with the actual Jar name it is supposed to be located in.
    Edit 1:
    Changed JavaDocs -> documentation.
    Edited by: AndrewThompson64 on Jan 11, 2010 7:12 PM

Maybe you are looking for

  • LaserJet m1212nf networking - how to get the printer seen in a network?

    I have a LaserJet Pro M1212nf, which does not have wireless capability.  I am on a desktop PC, Windows 7, and am hooked up with a USB cable from the computer to the printer. There are no other Windows 7 computers on this network, so until now I have

  • Need earbud or adapter recommendations

    Can anyone suggest a good set of earbuds or an adapter with the mic and phone/play controls? I'm currently using the Bose earbuds and I absolutely love them. I added the Griffin adapter for the mic and control button but it makes the cord way too lon

  • Validation of SOA Suite / OSB / SAP Adapter install

    We will be doing a clustered install of SOA Suite 11g, OSB and the SAP Adapter at a customer next week. I was wondering if anyone has any validation scripts/tests that I might use to test basic functionality and connectivity after the install. When w

  • How to use WD My Book Studio with iPhoto?

    I have a MacBook Pro running OSX 10.6.8.  I'm out of hard disk space so I purchased a 3 Terabyte Western Digital My Book Studio, connected to MacBook via Firewire 800.  I intend to move all my photos to the WD drive and delete them from the MacBook. 

  • HELP!! Oracle Files workflow definition needed! Please read!

    Dear friends, Please read the following and help me if you can. It is really a very important and urgent issue. We're in the middle of the OCS installation (precisely in the end of the storage layer). We have now to configure workflow, since this has