Jar file could not find main class.. I cant see why?

I have read loads of tutorials on this and it should be very straight forward but i STILL cant make a working jar file of my program.. please see if you can see anything wrong with what im doing..
my program is one .java file that compiles perfectly, and is runnable both through eclipse and by using the command prompt.. i made a jar file using both eclipse and the command prompt, and neither worked.. every time i run it by double clicking it i get the error "could not find main class, program will exit". here is the contents of my jar:
CorePackage\IPEmailer.class
CorePackage\IPEmailer$1.class
CorePackage\IPEmailer$SMTPAuthenticator.class
META-INF\MANIFEST.MF
the MANIFEST.MF file contains:
Manifest-Version: 1.0
Class-path: .
Created-By: 1.6.0_02 (Sun Microsystems Inc.)
Main-Class: CorePackage.IPEmailer
(yes there is a blank line at the end)
the class mentioned in 'Main-Class' has a main method that looks like this:
public static void main(String[] args) {
    // TODO Auto-generated method stub
    new IPEmailer();
}the program uses 2 external jar files:
activation.jar
mail.jar
and reads a file called:
ipemailer.ini
and writes a file called:
ip.txt
the program has no GUI and is intended to run 'silently' in the background
please help me understand what is wrong with this

package CorePackage;
import javax.mail.*;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
import java.net.*;
public class IPEmailer implements Runnable{
      * @param args
     String recipientsinput[]={""};
     String subject;
     String body;
     String server;
     String user;
     String pass;
     String from;
     String urlString = "http://www.whatismyip.org";
     String currentIP;
     String ipFromFile;
     boolean webFailed;
     long interval = 900000; //15 mins
     long oldInterval;
     Thread t = new Thread(this);
     public static void main(String[] args) {
          // TODO Auto-generated method stub
          new IPEmailer();
     public IPEmailer(){
                     ..........etccould the problem be that the class is a thread? i cant see why it would be, but ive never made a jar where the main class also 'implements runnable'

Similar Messages

  • JAR: - Could not find main class

    I'm sorry, I know this issue has been posted before but I am a bit confused with my situation.
    After making a jar on my computer, I run it, and the program loads and runs perfectly.
    However, when I try the jar on someone else's computer, it doesn't work, and gives the "could not find main class" message. The other computer has JRE but not JDK, so I don't know if that makes a difference.
    Anyways, my main class file is located in a package called hw2, and the whole project is located in a folder called HW2. So my class file is located in something like C:\School\HW2\hw2\Main.class.
    My Manifest.txt file is located in the \School\HW2 directory and has the following with a new line at the end:
    Main-Class: hw2.Main
    At the command prompt, I go to my C:\School\HW2 directory and I type the following to create the jar:
    jar cvmf Manifest.txt test.jar hw2\*.class
    My jar file has the following contents:
    META-INF/
    META-INF/MANIFEST.MF
    hw2/Bank.class
    hw2/GUIInterface.class
    hw2/Main.class
    Did I write the manifest.txt file correctly? Am I in the right directory when creating the jar file? Am I executing the jar command wrong? How come it works on my computer but not on someone else's?

    Are you certain you're executing the jar in the same way on both machines?
    For example, are you sure you're not executing the unjarred class files when you run on your local machine?

  • Could not find main class program will exit error while installing Oracle Client 32 bit on windows 7 32 bit OS?

    Hi Experts,
    When I am installing Oracle client 32 bit software on Windows 7 32 bit I am getting error as "could not find main class program will exit"
    I have tried installing latest Java software 7 also JDK 1.6.0_34 still I am getting the same problem below is my " oraparam.ini " details
    [Oracle]
    DISTRIBUTION=TRUE
    SOURCE=../stage/products.xml
    LICENSE_LOCATION=
    BOOTSTRAP_COMPS="oracle.swd.oui:11.1.0.6.0,oracle.swd.oui.core:11.1.0.6.0,oracle.jdk:1.5.0.1.1"
    JRE_SCRATCH_LOC=jdk/jre
    JRE_MEMORY_OPTIONS=" -mx96m"
    DEFAULT_HOME_LOCATION=product\11.1.0\client
    DEFAULT_HOME_NAME=OraClient11g_home
    NO_BROWSE=/net
    NLS_ENABLED=TRUE
    BOOTSTRAP=TRUE
    EXT_JLIB=../stage/ext/jlib
    OUI_VERSION=11.1.0.6.0
    ## JRE_VERSION is only for Windows. This is to copy accessbridge dlls
    JRE_VERSION=1.4.2
    ACCESS_DIR=../install/access
    #SHOW_HOSTNAME=ALWAYS_SHOW shows the hostname panel always
    #SHOW_HOSTNAME=NEVER_SHOW does not the hostname panel
    #SHOW_HOSTNAME=CONDITION_SHOW shows the hostname panel on condition
    SHOW_HOSTNAME=NEVER_SHOW
    #THIN_JDBC_FILENAME is optional and defaults to classes12.jar
    #The value specified for this should be packaged with OUI, and should
    #be relative to <OUI expanded stagedir>/jlib/
    THIN_JDBC_FILENAME=classes12.jar
    #RUN_OUICA specifies the batch script name that needs to be run
    #The script is ouica.bat for win32, and ouica.sh for solaris.
    #If the value is not specified, then the OUICA script is not run
    RUN_OUICA=ouica.bat
    CLUSTERWARE={"oracle.crs","10.1.0.2.0"}
    SILENT_VARIABLE_VALIDATION=TRUE
    [Generic Prereqs]
    MIN_DISPLAY_COLORS=256
    [IMAGES]
    FILE1=images/billboards.gif
    LICENSE_LOCATION=license.txt

    Duplicates of the other two times you asked this question:
    https://forums.oracle.com/thread/2559093
    https://forums.oracle.com/thread/2558027
    (and this time, your question does not appear to have anything to do with this particular forum space, either)
    Duplicate is locked.
    Do not EVER multi--post.   That is extremely bad forum etiquette.

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

  • 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

  • Jar file error: could not find main class. program will exit

    I have created a jar file using following command
    jar cfm MyProj.jar Manifest.txt richa\*.class
    and I have included main class header in the Manifest.txt. The executable jar file is created but when I double click on it, it prompts an error Could not find the main class. program will exit.
    Please help. Its urgent..
    Thanks in advance

    This simply state that jvm was unable to fine Main Class file.
    I hope you have configured manifest file including your main file information and class path used by the project with proper package hierarchy,
    as described in article
    [https://java.sun.com/docs/books/tutorial/deployment/jar|https://java.sun.com/docs/books/tutorial/deployment/jar]
    Edited by: Deepesh on Jul 13, 2008 4:58 AM

  • Could not find Main Class while executing JAR

    Hello all,
    I am having a simple Jar file that contains one java class that merely displays a window. I am using NetBeans IDE to create the JAR file. When i execute this JAR file by double clicking on the file, it works fine on the machine. However, if i try to execute this same file on any other windows computer, it gives an error "Could not find the main class. Program will exit."
    In other words, the JAR file is only working on the computer that has NetBeans and JDK installed on. Not on any other machine. Although the other machines have the JAVA Virtual Machine installed.
    I would appreciated any help on this topic.

    I had the same problem (i.e. Message-Box with "Could not find the main class. Program will exit.")
    After insuring that the manifest contained a Main-Class: argument and that the argument pointed to the right class, I started the jar via java -jar myjar.jar and read the stacktrace, which is much better than the popup-window.
    In my case the error was, that the Main-Class could not be loaded due to another referenced class, which was not on the classpath. (i.e. it was not in the same jar-File and the manifest didn't include a Class-Path: argument.)
    After adding the correct Class-Path: argument in the manifest, the problem went away.
    I now have the following setup:
    myjar.jar and somethirdparty.jar in the same directory.
    myjar.jar contains a manifest which includes the lines
    Class-Path: somethirdparty.jar
    Main-Class: my.package.and.MainClassafter the normal Manifest-header.

  • Could not find main class. Program will now exit. *SIGH*.....

    At first I thought it was just my own programs that I created with netbeans that had this problem; however, even the demo programs under the sdk folder give me this problem when i try to run them. Virtual Machine Loader will just come up with pop up saying "Could not find the main class. Program will not exit"
    I am a fairly competent programmer, not new to java. But I am new to guis in java, and using netbeans to create them. The program I am creating gives me this error with javaw and with java it will tell me NoClassDef for grouplayout. I checked the manifest file it looks alright:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 10.0-b19 (Sun Microsystems Inc.)
    Main-Class: desktopapplication2.DesktopApplication2
    Class-Path: lib/appframework-1.0.3.jar lib/swing-worker-1.1.jar lib/swing-layout-1.0.1.jar lib/ant-swing.jar lib/SwingSet2.jar lib/swing-layout-1.0.3.jar
    X-COMMENT: Main-Class will be added automatically by build
    }(brackets not included)
    I am sort of lost.... Do I need to install ant separately?
    I feel like there may be some classpath issues?
    I have java 1.6 update 4 and netbeans 6.0
    I am completely lost I have been working on fixing this for the past 2 or 3 days now, and reading up all the information.
    Note: This is just a standard desktop application.
    Also I just thought of something. If I have install the development kit do I also need to install the framework or whatever for 6.0 separately? Meaning installing the latest version of jvm. Sorry if this isn't clear i forgot what it is called.
    Sorry if this sounds like a beginner question or something, but I am going crazy. If i am having this much trouble running my own program i really hope distributing files won't be this much of a nightmare....

    Please become familar with resources at the NetBeans site. There are tutorials and FAQs that cover usage of NB, and how to do things like you're asking.
    See my reply in this thread for more information
    http://forum.java.sun.com/thread.jspa?threadID=5270931&tstart=0

  • Another "could not find main class"  thread

    Hello everybody
    I know there's tons of threads on this subject but none of them seem to be quite like mine.
    I'm trying to deploy an application that I developped with Jbuilder 2006 Enterprise (trial version). It automatically created the "ServerApp.jar" file and the manifest but when I try to run it I get the famous message: "Could not find the main class. Program will exit." My main class is "Application" and it's in a package called "serverapp".
    here's a copy of my manifest:
    Manifest-Version: 1.0
    Main-Class: serverapp.Application
    it has two extra lines at the end.
    I read on the other threads that I also needed a .bat file (don't know quite why) so I created one. It looks like this:
    @ECHO ON
    Set Path = C:\Program Files\Java\jre1.5.0_04\bin
    cd C:\Documents and Settings\Naby\My Documents\Travail\Synapco\BlackeBerry\ServerApp
    javaw -jar ServerApp.jar
    EXIT
    One last thing: when I run the .jar file from the command line using the syntax
    java -jar serverapp.jar
    I get this more detailled error message:
    C:\Documents and Settings\Naby\My Documents\Travail\Synapco\BlackeBerry\ServerAp
    p>java -jar serverapp.jar
    Exception in thread "main" java.lang.SecurityException: no manifiest section for
    signature file entry javax/mail/internet/AsciiOutputStream.class
    at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVe
    rifier.java:377)
    at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVeri
    fier.java:231)
    at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier
    .java:176)
    at java.util.jar.JarVerifier.processEntry(JarVerifier.java:233)
    at java.util.jar.JarVerifier.update(JarVerifier.java:188)
    at java.util.jar.JarFile.initializeVerifier(JarFile.java:318)
    at java.util.jar.JarFile.getInputStream(JarFile.java:383)
    at sun.misc.URLClassPath$JarLoader$1.getInputStream(URLClassPath.java:62
    0)
    at sun.misc.Resource.cachedInputStream(Resource.java:58)
    at sun.misc.Resource.getByteBuffer(Resource.java:113)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:249)
    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)
    I don't know what is going on here.
    Any help would be really appreciated
    Thanks.

    Thanks for the reply martin
    what jar file are you refering to? I only have one jar file wich is "serverapp.jar" and that's the one I want to run.

  • Could not find main class!

    I tried some code I got from a book I recently bought it compiled ok but when I tried to run it in JPadPro I got the Java Virtual Machine Launcher warning saying 'Could not find the main class. Program will exit!' As far as I can see there is a main method so I am not to sure what the actual problem is. I pasted the code below hopefully someone can help, Dave.
    * Copyright (c) 2000 David Flanagan.  All rights reserved.
    * This code is from the book Java Examples in a Nutshell, 2nd Edition.
    * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied.
    * You may study, use, and modify it for any non-commercial purpose.
    * You may distribute it non-commercially as long as you retain this notice.
    * For a commercial use license, or to purchase the book (recommended),
    * visit http://www.davidflanagan.com/javaexamples2.
    package com.davidflanagan.examples.datatransfer;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.datatransfer.*;
    * This program demonstrates how to add simple copy-and-paste capabilities
    * to an application.
    public class SimpleCutAndPaste extends Frame implements ClipboardOwner
        /** The main method creates a frame and pops it up. */
        public static void main(String[] args) {
         Frame f = new SimpleCutAndPaste();
         f.addWindowListener(new WindowAdapter() {
              public void windowClosing(WindowEvent e) { System.exit(0); }
         f.pack();
         f.setVisible(true);
        /** The text field that holds the text that is cut or pasted */
        TextField field;
         * The constructor builds a very simple test GUI, and registers this object
         * as the ActionListener for the buttons
        public SimpleCutAndPaste() {
         super("SimpleCutAndPaste");  // Window title
         this.setFont(new Font("SansSerif", Font.PLAIN, 18)); // Use a big font
         // Set up the Cut button
         Button copy = new Button("Copy");                      
         copy.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) { copy(); }
         this.add(copy, "West");
         // Set up the Paste button
         Button paste = new Button("Paste");
         paste.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) { paste(); }
         this.add(paste, "East");
         // Set up the text field that they both operate on
         field = new TextField();
         this.add(field, "North");
         * This method takes the current contents of the text field, creates a
         * StringSelection object to represent that string, and puts the
         * StringSelection onto the clipboard
        public void copy() {
         // Get the currently displayed value
         String s = field.getText();                 
         // Create a StringSelection object to represent the text.
         // StringSelection is a pre-defined class that implements
         // Transferable and ClipboardOwner for us.
         StringSelection ss = new StringSelection(s);
         // Now set the StringSelection object as the contents of the clipboard
         // Also specify that we're the clipboard owner
         this.getToolkit().getSystemClipboard().setContents(ss, this);
         // Highlight the text to indicate it is on the clipboard.
         field.selectAll();
         * Get the contents of the clipboard, and, if we understand the type,
         * display the contents.  This method understands strings and file lists.
        public void paste() {
         // Get the clipboard
         Clipboard c = this.getToolkit().getSystemClipboard();
         // Get the contents of the clipboard, as a Transferable object
         Transferable t = c.getContents(this);
         // Find out what kind of data is on the clipboard
         try {
             if (t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
              // If it is a string, then get and display the string
              String s = (String) t.getTransferData(DataFlavor.stringFlavor);
              field.setText(s);
             else if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
              // If it is a list of File objects, get the list and display
              // the name of the first file on the list
              java.util.List files = (java.util.List)
                  t.getTransferData(DataFlavor.javaFileListFlavor);
              java.io.File file = (java.io.File)files.get(0);
              field.setText(file.getName());
         // If anything goes wrong with the transfer, just beep and do nothing.
         catch (Exception e) { this.getToolkit().beep(); }
         * This method implements the ClipboardOwner interface.  It is called when
         * something else is placed on the clipboard.
        public void lostOwnership(Clipboard c, Transferable t) {
         // Un-highlight the text field, since we don't "own" the clipboard
         // anymore, and the text is no longer available to be pasted.
         field.select(0,0);
    }

    Oh, no wonder I have such low "reading for comprehension" scores - that was a "package" statement, not an "import".
    Thing is, your class would compile with this package statement there - but, the interpreter wouldn't be able to find it, 'cause the compiled class would be in a package called com.davidflanagan.examples.datatransfer accoding to the class file, but your interpreter would be looking for the class in the default package (if that makes sense). If executed on the command line you would likely see something like:
    Exception in thread "main" java.lang.NoClassDefFoundError: SimpleCutAndPaste (wrong name: com/davidflanagan/examples/datatransfer/SimpleCutAndPaste)
    [pre]
    Lee                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Java Virtual Machine. Could not find main class

    I am trying to install Oracle Data Access Components ODAC 11g 11.1.0.6.21
    on windows 2008. I get the dreaded could not find the main class. Program will ext.
    I have seen all the post, tried installing every conceivable Java version, removed all java version.
    Nothing works. Does anyone have THE solution for this on-going error?
    Thanks

    I fixed my problem by installed Oracle 11g ODAC and Oracle Developer Tools for Visual Studio 11.1.0.7.20

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

  • Could not find Main Class while running JAR   outside /dist directory

    Hello
    I can make jar on netbeans by clicking Shift+F11. But the problem occurs when I copy paste my jar file out of /dist directory. It only works at /dist directory. I think my way making jar is incorrect. Anyone knows a way to make runnable jar by NetBeans instead of Shift + F11

    Crossposted here:
    [http://forums.sun.com/thread.jspa?threadID=5369074]
    Don't do that.

  • Another "could not find main class.

    I wouldn't ask this if I hadn't search the forum and spent hours trying to get this to work. Anyway, the jar file seems to be organized right and here is my manifest file (as set in Sun ONE Studio 4):
    Manifest-Version: 1.0
    Class-Path: xerces/xerces.jar xml-apis/xml-apis.jar xalan\xalan.jar bi
    n\ jdom\jdom.jar
    Created-By: NetBeans IDE
    Specified-By: MLBrowserJN.jarContent
    Main-Class: MedLEEBrowser
    If you have any ideas I'd appreciate it.

    Class-Path: xerces/xerces.jar xml-apis/xml-apis.jar xalan\xalan.jar bin\ jdom\jdom.jarWhy are you using two different file separators? (/ and \) Try using the same one throughout.
    Main-Class: MedLEEBrowserHave you correctly specified the full class name for the main class, or is the MedLEEBrowser class in the default package (i.e. no package at all)?
    And finally, is there at least one blank line at the end of your manifest file? For some reason, this is part of the Manifest file specification (although I've never understood why)

Maybe you are looking for

  • Do Not Disconnect and and Error Message

    when it is done synching it never says ok to disconnect, if I push eject it says it can't disconnect because it has files used in another program on it. I have reset it and it still does this

  • A question about JTable .setValueAt(...)

    hi, I write some code which use the Table to represent the data fetched from MS-ACCESS. the problem is about the UpdateObject(...) method which is in the implement of the AbstractTableModel method setAtValue(). when transfered OBJECT TYPE is java.lan

  • Regarding invalid characters

    HAI I have data in Oracle tables which contain so many special characters. now im loading Attributes for one characteristic. I have 15 atrributes for one characteristic . Im writing ABAP code for each Infoobject or field in Transfer Rules .It needs a

  • Resuming after an Error in Retail Analytics

    Hi, In RDW, we had options of Bookmarking in every steps of ETL so that if some errors occured, we could resume from the point of error with the help of bookmark. In RA, C_LOAD_DATES table keeps the record of whether the scenario has already executed

  • UnJar Jar Files

    Hello all, Could someone point me to an unjarring tool. I need to take a jar file and unjar it. Not using WinZip though. I'm told that that doesn't always work correctly. Thanks. Lynn