Can not find Main Class - Can't Run Application

I have at this for a while and it is drivng me crazy... I have an application that I want execute in a bat file. I have checked the runtime environment by executing java and javaw, both which give option on error messages. I have set the classpath to point too the class subdirectory. Here it is.., Every time I execute the bath file or execute the javaw command, I get the "Can not find main class" message.
I am using XP ...
Help please...
Thanks for all your help.

when you set the classpath I presume you mean that your running java or javaw as:
javaw.exe -cp %classpath%;.;c:\library\myfiles com.mycomp.myapp.MainClassIf your using a jar then you must specify the jar in the class path.
Don't presume it will find the jar. Other than that, you will have
to provide more details.

Similar Messages

  • CAN NOT FIND MAIN CLASS

    Why after i have unzipped and edited the classes in the jar file and zipped them together again, it gives me the message "CAN NOT FIND MAIN CLASS"?
    This is after i have edited any class in the .jar zip.I did not edit the Manifest text file,can someone who has experienced this problem show me how to overcome it.
    Thank you.

    i think you have to read the "java tutorial on Jar files".
    i guess after you have exracted the .jar file then you've edited the ".class"(i dont know how you did it) but i think you mean ".java" you should create another .jar file to be able to reflect the changes you have made, then set the main-class attribute of the newly created .jar file.

  • Can't find main class - program will end

    Dear forum readers,
    Recently upgraded from Win2k pro to XP pro .. installation ran to conclusion w/ no fatal errors BUT upon booting new system I now receive an error message "Java Virtual Machine Launcher can't find main class, program will end" .. I am not aware that this error is causing any problems BUT it is annoying and I'd like to be able to fix the problem so I don't have to close the error message at each startup .. please help!
    Thanks in advance, Larry

    Try this
    java -XbootClasspath/a -jar <<Prog name>>
    I think you are trying in windows XP.
    Also you need to modify if there are any other jars to be reference. For eg if a.jar is also required for this try as below
    java -XbootClasspath/a:a.jar -jar <<Prog name>>

  • Installing 10g on Windows XP machine JVM launcher "Can't find main class"

    I am trying to install 10g Release 2 on a Windows XP machine. I downloaded the zip from the OTN. Unzipped the file. No problems. Tried to run the OUI, it opened up a shell and said to wait. The shell closed and a message frome the JVM Launcher displayed "Can't find main class. Program will exit." I have seen several people on this and other discussion boards having this problem, but have yet to get a solution. Please help.

    What's the value of CLASSPATH environment variable? Possibly a non-oracle application has set this variable and the installer catches it. If there is such a variable, comment it out and try again.

  • Background callable object :  can not find this class name

    Hi All ,
                  I am following this tutorial link for creating background callable object
    http://help.sap.com/saphelp_nwce10/helpdata/en/9a/e8934258a5ca6ae10000000a155106/frameset.htm
    I have created java and enterprise application DC and deployed successfully. But while creating CO in design time when i am selecting application and entering class as com.examples.bckgco.UserDetailsCallableObject  for Implementation Class Name , and on click next i m getting exception as  "can not find this class name".       package and class name are correct still getting this excetpion message. Plz help me to resolve this solution.
    Regards
    Kavita

    Hi, kavita.
    First, make sure you choosed the correct container when you created the background CO.
    Second, make sure your package name was "com.examples.bckgco" and class name was "UserDetailsCallableObject". The exception  which you got just means you entered incorrect name.
    It doesn`t relate to your program.
    Best Regards.
    Louis Huang.

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

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

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

  • I have a dell computer with windows xp. i can not download itunes it is looking for itunes.msi and because it can not find it, i can not download itunes 10, and i can not delete itunes from my computer. HELP!!!!!!

    i have a dell computer with windows xp. i can not download itunes it is looking for itunes.msi and because it can not find it, i can not download itunes 10, and i can not delete itunes from my computer. HELP!!!!!!
    What else can I do ?

    Snow Leopard = OS X 10.6.x
    It is Not available as a download... It is a Paid Upgrade.
    Do this first...
    Check that your Mac meets the System Requirements for Snow Leopard...
    Snow Leopard Tech Specs
    http://support.apple.com/kb/SP575
    If so... Purchase a Snow Leopard Install Disc...
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Other countries...
    http://support.apple.com/kb/HE57
    After the Successful Install, run Software Update to get the latest updates for Snow Leopard.
    Be sure to make a Backup of your Current System Before Upgrading...

  • I have an ipad2 and we purchased an HP office jet 6600.  I can not connect to print.  In searching the net, I have been advised to get the firmware update but can not find it.  Can you advise?

    I have an ipad2 and we purchased an HP office jet 6600.  I can not connect to print.  In searching the net, I have been advised to get the firmware update but can not find it.  Can you advise?

    Is the HP on the airprint list?
    iOS AirPrint Printers  http://support.apple.com/kb/HT4356
    How to Print from Your iPad: Summary of Printer and Printing Options
    http://ipadacademy.com/2012/03/how-to-print-from-your-ipad-summary-of-printer-an d-printing-options
    Print from iPad / iPhone without AirPrint
    http://ipadhelp.com/ipad-help/print-from-ipad-iphone-without-airprint/
    How to Enable AirPrint on a Mac and Use Any Printer
    http://ipadhelp.com/ipad-help/how-to-use-airprint-with-any-printer/
     Cheers, Tom

  • I think pesimo customer service three days, I'm looking for someone I can ayudr activation problem with my CC and can not find anyone who can help me.

    I think pesimo customer service three days, I'm looking for someone I can ayudr activation problem with my CC and can not find anyone who can help me.

    Online Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • I have iphone 3g, phone is working very slow and even i can not been able to close the running application

    i have the Iphone 3g, OS 4.3.2.1
    My Phone is working terribly slow, and even i can not been able to close the running application
    for closing application Every time i have to restart the phone
    can any 1 help me solve this problem
    with best regards,
    prakash

    You must have an iPhone 3GS then if its running 4.3.2
    The iPhone 3G can only update to 4.2.1 iOS.
    Reset the iPhone
    Hold the top silver button and the home button (just below the display of the iPhone)
    Do this at the same time for about 10 seconds until you see an Apple.
    The iPhone then should take 1-3 minutes to restart and it should be fine

  • HT1420 I have windows 8 new pc and i can not find where i can authorize my computer...HELP me please.  These directions must be an older version maybe?

    I have windows 8 new pc and i can not find where i can authorize my computer...HELP me please.  These directions must be an older version maybe?

    Press the Alt and S keys and choose Authorize this Computer, or click here, follow the instructions, click on Store in the menu bar, and choose Authorize this Computer.
    (82052)

  • Java server page compiler can not find a class defined in a java bean file

    I have a jsp file using java bean. The java bean class file is uploaded into the server and also the directory to this java bean .class file is included in the Unix environment CLASSPATH. This .jsp file is registered and should be compiled and excecuted automatically.
    WHen I try to invoke this .jsp file, the jsp compiler error, saying the class defined by java bean can not be found. I already include this path in teh CLASSPATH, I thought the jsp compiler will go to the right place according to CLASSPATH to find the referenced class.
    Can anyone tell me what I have done wrong or what should I do in order to allow jsp compiler to find the class refrenced by .jsp file and defined by java bean file?
    Thank you so much

    hello friends,
    i am also facing the same problem of not finding bean class files for both jsp and servlet though it is placed in same package. the problem of not finding bean class file for jsp is experienced in Tomcat server only whereas in Blazix, there is no such error and the file is compiled and runs successfully.
    i have checked Tomcat properly. there is no error in its configuration also servlets without the use of bean files run successfully. so please can anybody guide me about what is the problem and how to solve it. plz its urgent .

  • I upgraded my iphone to 5.0.1 and can not find carrier and can not make a call freezed.

    I upgraded my iphone 4 to ios 5.0.1 yesterday. Today the device can not find carrier and if finds than it freezes when I tap call. I swictched on and off but no change.

    No.  There is no legit way to go back at all.
    It seems that you had a hacked iphone that was locked back to the rightful carrier when you updated as it should.

Maybe you are looking for

  • How can I view all photos from a specific year?

    How can I view all photos taken in one calendar year like 2010? Is there a way to filter this way?

  • Error when querying OLAP data with BI answers

    Have been doing all the Lessons in "Using Oracle OLAP With Oracle BI Enterprise Edition 10g Release 3". Got till lesson 3 where I'm supposed to query the data with Answers but If I add any of the facts to the report, I get the following error: Odbc d

  • Data transfer to new MacBook Pro

    My MBPro fried so I pulled the HD and popped it into a USB case. Got my new 15" MBPro today and plugged in the USB cable expecting to just transfer over the works using their step-step procedure (2nd choice below) as I always do between an old and ne

  • I have some old slide photo and would like to put them on a disc. How do I do it?

    I have some old slide photos and would like to convert them to a slideshow how do I do it?

  • Iphoto 08 max photos

    what's the maximum number of photos iPhoto can handle? I have about 15,000 photos and half of them are RAW files from a Canon 20D. I plan on shooting 90% of my photos in the future in RAW mode. is there a limit to when it starts to really crawl? (i h