Compile correct but not run java programs

I have problem. Java program copile correctly but not run. I can't understand this one.
**this is the error**
Exception in thread "main" java.lang.NoClassDefFoundError: suminda
Caused by: java.lang.ClassNotFoundException: suminda
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: suminda. Program will exit.

The error is telling you that the jvm could not find a class named suminda. Are you aware that class names are case sensitive? Suminda is not the same as suminda for example.
This error usually happens when you haven't specified the classpath correctly. A simple thing to try isjava -cp  .  sumindaHere's some links that may help.
[http://www.kevinboone.com/classpath.html]
[http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html]

Similar Messages

  • Compile and run java programs in different directroy

    Hi,
    I often encounter many problems when I run java programs in the different directories. Like
    javac -d dir_name a.java
    java -cp dir_name a
    Something wired often happens, such as, there is not a.java file in some directory, but javac -d dir_name a.java can still work or "java -cp dir_name a" often doesn't work. Moreover, file_name.jar is also a tough problem and solving compiling problems is often time-consuming.
    So I hope to read something about how to compile and run java programs in different directory properly.
    Could you pleae give me a detailed description for that or recommend a book or website?
    Thanks a lot.

    Can you post a small amount of code that does not work, including the directory structure, and the error messages? Some one here can likely explain the problem.

  • How to Set up the  variables and others to compile and Run Java Programs

    Hello,
    I have just downloaded the jdk1.6.0_07 and jre1.6.0_07 and installed it in C:\Program files\Java in my Windows XP ,So please tell me how to sett up the enviroment variables etc to compile and run Java Programs from Command Prompt.
    thanks

    To set the PATH permanently, add the full path of the jdk1.6.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.6.0_<version>\bin. Set the PATH as follows on Microsoft Windows:
    1. Click Start > Control Panel > System on Windows XP or Start > Settings > Control Panel > System on Windows 2000.
    2. Click Advanced > Environment Variables.
    3. Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A typical value for PATH is:
    C:\Program Files\Java\jdk1.6.0_<version>\bin

  • I was running Foxfire 3.6.9 and wanted to use FTP Program add-on and it did not appear to load but appeared but then would be installed but not run or appear under tools. So I deleted Foxfire 3.6.9 and down loaded to 3.5.9 so it could get FTP and it is do

    I was running Foxfire 3.6.9 and wanted to use FTP Program add-on and it did not appear to load but appeared but then would be installed but not run or appear under tools. So I deleted Foxfire 3.6.9 and down loaded to 3.5.9 so it could get FTP and it is doing the same could not install. Even after I registered my copy. The last time I used this program it showed up under tools and worked great. any suggestions on whats going on and how I can get around this?.by ralphd3g

    Delete the files extensions.* (extensions.rdf, extensions.cache, extensions.ini) and compatibility.ini in the Firefox [[Profiles|profile folder]] to reset the extensions registry.
    See "Corrupt extension files": http://kb.mozillazine.org/Unable_to_install_themes_or_extensions
    If you see disabled extensions that are not compatible on the next start in "Tools > Add-ons > Extensions" then click the "Find Updates" button to do a compatibility check.

  • TS1717 What do I have to do to keep the iTUNES program on my computer BUT NOT RUNNING on Start UP? It requires too much CPU usage on my old computer.

    What do I have to do to keep the iTUNES loaded as a program on my computer BUT NOT RUNNING on Start UP? Just opening when I want to use it.
    It requires too much CPU usage on my old computer.

    You can check you Adobe account online to see if the serial number is registered under your account.  If not then your only option will likely be to contact Adobe Support directly thru chat to see if they can provide you with a/the serial number. For them to do so will require you being able to prove ownership.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • Hi, Need help. I am trying to download the latest iTunes for Windows application but on running the program it says that it can not be completed as it can not find the folder location of the file "iTunes.msi" . Any clues would be appreciated

    Hi, Need help. I am trying to download the latest iTunes for Windows application but on running the program it says that it can not be completed as it can not find the folder location of the file "iTunes.msi" . Any clues would be appreciated

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I want to run java program on windows environment as background process

    Hi all
    I want to run java program on windows environment as background processSo command prompt return after executing java command and program on background In Linux we can do this easily �but I do not how to do this in windows
    for example look this programe
    import java.io.*;
    import java.util.*;
    public class TestClass {
         class ravi extends Thread{
              public void run(){
                   try {    
                        String target_file = "ravind.txt";
                        File targetfile = new File(target_file);
                        PrintWriter writer = new PrintWriter(new FileWriter(targetfile)) ;
                   for (int i =0 ; i < 100 ;i++ ){
                        Thread.sleep(10000);
                        writer.println(" ravindra shukla ");
              } catch (Exception e) {               
                             e.printStackTrace();
         public static void main(String[] args) {
              TestClass test1 = new TestClass();
              TestClass.ravi r1 = test1.new ravi();
              r1.start();          
    System.out.println(" return from main ");
    first i compile this
    javac TestClass.java
    then i run this by using this command
    java TestClass
    but becouse i put sleep on threads run function so it takes to much time to get return on command promt .... i want to run this programe as background process so command promt return as soon as i execute java command

    Thanks dude
    This solution �start java TestClass� works fine �. But it does not solve my problem
    It opens another black window and that black window persist till the life time of my program
    Is it possible application run on complete background without opening another black window �as in Linux

  • Can't Run Java Programs -- java.lang.NoClassDefFoundError Error

    I am running 10.4.11. For some reason I can no longer run Java programs. (I could in the past)
    For example. I create a simple Hello World program as follows and save it as Hello.java:
    class HelloWorld
    public static void main (String args[])
    System.out.println("Hello, world!");
    Then I compile it:
    Javac Hello.java
    Then I try to run it:
    java Hello
    But I get this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: Hello
    I think it must be a CLASSPATH problem but normally you do not need to worry about ClassPATH. Apple sets it up for you out of the box.
    What is wrong?

    I totally forgot that the class name should be the same as the filename.
    After I renamed the file to HelloWorld.java and recompiled, I could run "java HelloWorld"
    Rob

  • I can run java programs on my computer

    I just bought a new computer and I was trying to run a java program on it but it didn't work, I can compile, but not run. this is what happens when I try to run it.
    Usage: java [-options] class [args...]
               (to execute a class)
       or  java -jar [-options] jarfile [args...]
               (to execute a jar file)
    where options include:
        -client   to select the "client" VM
        -server   to select the "server" VM
        -hotspot      is a synonym for the "client" VM  [deprecated]
                      The default VM is client.
        -cp -classpath <directories and zip/jar files separated by ;>
                      set search path for application classes and resources
        -D<name>=<value>
                      set a system property
        -verbose[:class|gc|jni]
                      enable verbose output
        -version      print product version and exit
        -showversion  print product version and continue
        -? -help      print this help message
        -X            print help on non-standard options
        -ea[:<packagename>...|:<classname>]
        -enableassertions[:<packagename>...|:<classname>]
                      enable assertions
        -da[:<packagename>...|:<classname>]
        -disableassertions[:<packagename>...|:<classname>]
                      disable assertions
        -esa | -enablesystemassertions
                      enable system assertions
        -dsa | -disablesystemassertions
                      disable system assertionsthis is the java I installed on my computer: j2sdk1_4_0-win

    if you mean terminal by the command prompt, then yes, I have tried it, and I got the same results. Is it possible that the java edition I have is out of date?
    Message was edited by:
    jpeanut

  • Running java program at windows startup

    I need to run java program at startup and then it will continue to run in its own thread.
    Any body having idea how to do that programmatically?
    Zeeshan

    This is one option but this is not feasible in my scenario as this application will be running over a network which involves hundreds of computer so is there any way to do it programatically?
    I mean if I can load java class file through an exe file then I can load my class file in the startup using C++.
    Any Suggestions.
    thanks for the help
    regards,
    Zeeshan

  • Run java program in background

    I want to run a java program in background in windowsXP...can anyone help please......can anyone suggest an easy software for running java program as windows service...i tried one but without any success

    How many of the links here have you tried while you were waiting for an answer?
    http://www.google.com/search?q=running+java+program+as+windows+service
    (Note that the query is a direct copy/paste from your post.)

  • How to run java program from website?

    Hello
    I'd like to know how to run java program from my web page.
    I'd like to push some button in this web page so java program that would be on my server
    would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
    Cheers

    I rather thought about RMI. But I could try servlets. So how it would look like?.
    I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
    But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
    Message was edited by:
    macmacmac

  • Run java program overnight

    Hey,
    I left my office yesterday evening leaving my macbook on
    while it was running a java program that it's supposed to requires between 2 and 3 hrs.
    This morning not only the program was still running (hard to believe it takes more than 12 hrs!)
    but when I typed in the shell the 'ps -all' command
    it says the program has been running for around 30 mins, and now it's still running!
    Is it possible that with certain settings the mac stops its processes after a while?
    What should I check?
    Thanks for helping, I'm actually a newbie in the mac world:)
    g

    How many of the links here have you tried while you were waiting for an answer?
    http://www.google.com/search?q=running+java+program+as+windows+service
    (Note that the query is a direct copy/paste from your post.)

  • Vim and Eclim (Java): Run Java program in embedded terminal window

    Hello all,
    I'm trying to create a decent Vim setup for Java programming. I've installed Eclim, and it works alright. However, one annoyance I have is the way that Eclim runs Java programs. When run (via the :Java command in Vim), a Java program runs in a new shell instance pretty independent from Vim, and then when the program terminates (and Enter is pressed), the output is put into a new buffer at the bottom of the Vim window with the output.
    The problem with this is that I must press Enter to go back to Vim after the program terminates, and then the output buffer is automatically selected even though I most likely do not care to copy any of the output.
    So, this is what I would like to happen:
    - I run my Java program somehow (doesn't have to be with :Java)
    - A buffer containing the running program in a shell is put on the screen (if not already there)
    - The program terminates, and the focus did not change to the output buffer
    At the very least, I want the focus to not change to the output buffer after the program is done running.
    Any ways to at least somewhat accomplish what I'm trying to  get at?

    Trent wrote:
    Yeah? I had AP CS when they first introduced the GridWorld case study. I hope you get more out of the class than I did.
    I have never used Java except for that and my first CS class at university. I eventually realized that software (as a job) wasn't for me and took a route closer to EE. I still fight to avoid being called a programmer though
    I like the idea of programming for a job, not necessarily "software development", something computer science-y sound good to me.
    But anyway, to end on an on-topic note, I embedded gvim inside Eclipse as described here.

  • DAC Task are queued but not running

    Hi Everybody,
    Currently we are running the ETL for only Financials and there are 394 tasks in total out of which 285 have been completed successfully. At times some of the tasks would just get stuck on particular action. For e.g The analyze task after dimension population would remain in the queued status and would never switch to run mode. So we had to abort the ETL and restart it. This action resulted in successful completion of the previously queued task. Now for past two days the ETL is once again stuck (queued but not running).
    For e.g The following task is showing status of running
    51     SIL_InventoryProductDimension_SCDUpdate     Running     2009-03-02 21:09:59.0                    DataWarehouse     DataWarehouse     SILOS          Update Slowly Changing Dimension     Informatica     0     0     -2     CUST R11 5 10
    But if I right click on the details
    I get this
    1     SIL_InventoryProductDimension_SCDUpdate_Full     Running     2009-03-02 17:40:41.0     2009-03-02 21:09:09.0     3 hour(s), 28 min(s), 28 sec(s)     Verifying if workflow still running on Informatica Server 'Oracle_BI_DW_Server'.
    If still running will attach to the workflow.     DataWarehouse     Informatica     0          -2     0
    And the remaining detail tasks for this are in queued status.
    What could be the reason?
    Does it need the Infomartica workflow manager open? It is open currently open but must have been accidently closed in between.
    Informatica services have always been running.
    Thank you very much
    Nilesh
    [excel dashboard|http://www.exceldashboard.org]
    dashboard Software
    [Access Dashboard|http://www.accessdashboards.com]
    [Dashboard Reporting|http://www.reportingdashboard.com]
    Edited by: njethwa on Jan 6, 2010 5:39 PM

    Hi
    This Sometime happens with DAC.We faced the same issue and had an SR open with Siebel for almost 2 weeks,they Couldnt help us out.
    Restart your DAC Server and Do a Dryrun and then run your full ETL .
    The Analyze task would not hang anymore.
    I dot have any logical reason why this happens,but i am guessing it has to do with some java heap memory.So restarting the Server would free up the memory.(i am guessing but not sure).
    But it Works.
    Try it
    Let me know if this helps
    Thanks
    H

Maybe you are looking for

  • Convert an U8 array to a LabView data type

    In my code the input is an fixed length of U8 array reflecting data in memory, I need to convert it to a predefined data type. For example, the first 2 U8 elements in the arrary need to comvert to an U16 data, next 4 U8 elements to U32 data. I am jus

  • Cannot listen to online radio streaming using Windows Media Player

    Online radio websites that use Windows Media Player - opens up the player in new window but instead of buffering, says that it is playing but no output/sound. Definitely not security/pop up/firewall issue. Windows Media Player works fine playing CDs

  • Blackberry 8330 Home Screen

    So my sprint blackberry 8330's home screen is blank, all it shows is the BB menu, time, battery, signal, and volume, whenever I roll the ball over to where all the previous icons were all that shows up is a yellow circle highlighting an empty space,

  • Why hasn't Verizon just announced a release date!!

    The galaxy note 2 has already been on preorder for a while and it doesn't ship till the 27th of november, the windows phones are supposed to come out BEFORE thanksgiving and no release date has even been given at all? Are they trying to give people a

  • Blind External Hard drive - MAD !

    Any ideas on the following - pretty please, I am going slightly nuts!.... I'm a professional photographer and travel everywhere with my MacBook Pro 15" - Im running Leopard. I also travel with a LaCie rugged 160 & 80GB external hard drive- just recen