Error Message when running first java program

Hi,
I am reading "Sams Teach Yourself Java 6 in 21 Days" by Rogers Cadenhead. I am having a problem with compiling the sample program in the first part of the book, "HelloUser" which is supposed to print out "Hello (my name - Matt)" when run in the command line.
I receive this error when trying to run it after having successfully compiled it (I enter java HelloUser while in correct folder):
Exception in thread "main" java.lang.NoSuchMethodError: main
I have correctly set the PATH and CLASSPATH settings for my PC (Windows XP). I am guessing that I need to define a "main" or something. I'm brand new to Java but am good with the scripting language PHP. Please tell me what I should do to correct this problem. Thanks in advance

Here is the code for the program:
public class HelloUser {
     public static void man(String[] arguments) {
          String username = System.getProperty("user.name");
          System.out.println("Hello " + username);
}Here is what I enter in the Command Line:
cd \JavaWork\j21work
javac HelloUser.java
java HelloUser
There are no problems up until I enter the last line (java HelloUser) to run the program. By the way, I using JDK 6 update 1 with Windows XP.

Similar Messages

  • Error message when running the FSPCCURR - PS/Fin MultiCurrency Process

    error message when running the FSPCCURR - PS/Fin MultiCurrency Process
    =====================================================
    2011-03-21-17.21.39.660000 INFO(5870,1) PI(785156) Program(FSPCGLMC) GL MultiCurrency processing has begun.
    2011-03-21-17.21.40.820000 INFO(5870,4) PI(785156) Program(FSPCSTEP) Beginning processing, Step CURPER in Group NONREVAL for Business Unit NAMER.
    2011-03-21-17.30.14.520000 INFO(5870,4) PI(785156) Program(FSPCSTEP) Beginning processing, Step USD_USD in Group NONREVAL for Business Unit NAMER.
    2011-03-21-17.30.53.000000 SEVERE ERROR IN PGM:(5870,58) PI(785156) Program(FSPCPROC) Edit journal fails for Business Unit NAMER and Step USD_USD.

    Hi 841037,
    We are facing this same issue in our environment. We are on FSCM 9.1 bundle #24.Please let me know how you resolved this issue at your end. Any help or pointers regarding this issue is highly appreciated. Thanks.

  • Error message when running updates

    I keep getting an error message when updating my CS programs. "This update from the internet cannot be completed. Please try again later."
    I bought a Canon 6D and the Adobe Camera Raw won't work because it isn't the latest version and that it needs the latest PS version to run the latest Raw version and I can't get either update. Help?

    Cameras by ACR version:  Camera Raw plug-in | Supported cameras
    Programs by ACR version: Camera Raw-compatible Adobe applications
    You should be able to update CS5 without getting an error which is ostensibly what this thread is about, but you are correct in needing CS6 to use ACR 7.3 which is the minimum version of ACR that supports the 6D natively.  You can use the DNG Converter to make DNGs that the older ACR will read, but that has nothing to do with images already processed in LR, because LR knows newer adjustments than your CS5's ACR 6 does.
    To go from LR to PS you'll need to use Edit In PS CS5 and when you see the message about ACR being too old, choose Render using LR Adjustments and Don't Ask Again if that is also an option.  This will cause LR to render a TIF or PSD (whatever you've chosen in the External Editing area of LR Preferences).  If you don't see a message about ACR being too old because you've selected Don't Ask Again previously then you can click the Reset Warning Dialogs button in Preferences and get a chance to answer the question differently if need be.

  • Receiving Error Message when running sh rep_populate.sh

    Following directions at http://www.oracle.com/technology/tech/linux/htdocs/yum-repository-setup.html
    Receiving Error Message when running sh rep_populate.sh trying to create local yum repositories and configure up2date and yum to install and update packages from them.
    THIS PROGRAM IS DEPRECATED!
    You should be generating xml metadata instead.
    Please see http://linux.duke.edu/metadata
    After executing following instructions and replacing server name with our server name.smmj.com
    Client Setup
    1. Import the GPG key
    rpm --import /usr/share/rhn/RPM-GPG-KEY
    2. Configure up2date to use the yum repository. Edit /etc/sysconfig/rhn/sources. Comment out line
    up2date default
    to
    #up2date default
    and add the following lines. Replace <repository_server> with the hostname of the machine that is hosting the yum repository. Comment and uncomment individual repositories as needed.
    Enterprise Linux 5
    (commented uncommented)yum el5_$ARCH_latest http://<repository_server>/yum/EnterpriseLinux/EL5/latest/$ARCH/
    (commented uncommented)yum el5_$ARCH_addons http://<repository_server>/yum/EnterpriseLinux/EL5/addons/$ARCH/
    #yum el5_$ARCH_oracle http://<repository_server>/yum/EnterpriseLinux/EL5/oracle/$ARCH/
    #yum el5_ga_$ARCH_base http://<repository_server>/yum/EnterpriseLinux/EL5/ga/base/$ARCH/
    #yum el5_u1_$ARCH_base http://<repository_server>/yum/EnterpriseLinux/EL5/1/base/$ARCH/
    #yum el5_u2_$ARCH_base http://<repository_server>/yum/EnterpriseLinux/EL5/2/base/$ARCH/
    #yum el5_u3_$ARCH_base http://<repository_server>/yum/EnterpriseLinux/EL5/3/base/$ARCH/
    #yum el5_ga_$ARCH_patch http://<repository_server>/yum/EnterpriseLinux/EL5/ga/patch/$ARCH/
    #yum el5_u1_$ARCH_patch http://<repository_server>/yum/EnterpriseLinux/EL5/1/patch/$ARCH/
    #yum el5_u2_$ARCH_patch http://<repository_server>/yum/EnterpriseLinux/EL5/2/patch/$ARCH/
    #yum el5_u3_$ARCH_patch http://<repository_server>/yum/EnterpriseLinux/EL5/3/patch/$ARCH/
    and running additional instructions
    2. Run up2date to install python-urlgrabber.
    up2date -i python-urlgrabber
    Receiving following error
    There was some sort of I/O error: <urlopen error (-2, 'Name or service not known')>
    Further when trying to replace /etc/yum.repos.d/ULN-Base.repo ULN-Base.repo unable to find file, file that is there
    is called public-yum-el5.repo
    Made following changes in that file
    Enterprise Linux 5
    [el5_latest]
    name=Enterprise Linux $releasever - $basearch - latest
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/latest/$basearch/
    gpgcheck=1
    enabled=1
    [el5_addons]
    name=Enterprise Linux $releasever - $basearch - addons
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/addons/$basearch/
    gpgcheck=1
    enabled=0
    [el5_oracle]
    name=Enterprise Linux $releasever - $basearch - oracle
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/oracle/$basearch/
    gpgcheck=1
    enabled=0
    [el5_ga_base]
    name=Enterprise Linux $releasever GA - $basearch - base
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/ga/base/$basearch/
    gpgcheck=1
    enabled=0
    [el5_u1_base]
    name=Enterprise Linux $releasever U1 - $basearch - base
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/1/base/$basearch/
    gpgcheck=1
    enabled=0
    [el5_u2_base]
    name=Enterprise Linux $releasever U2 - $basearch - base
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/2/base/$basearch/
    gpgcheck=1
    enabled=0
    [el5_u3_base]
    name=Enterprise Linux $releasever U3 - $basearch - base
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/3/base/$basearch/
    gpgcheck=1
    enabled=0
    [el5_ga_patch]
    name=Enterprise Linux $releasever GA - $basearch - patch
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/ga/patch/$basearch/
    gpgcheck=1
    enabled=0
    [el5_u1_patch]
    name=Enterprise Linux $releasever U1 - $basearch - patch
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/1/patch/$basearch/
    gpgcheck=1
    enabled=0
    [el5_u2_patch]
    name=Enterprise Linux $releasever U2 - $basearch - patch
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/2/patch/$basearch/
    gpgcheck=1
    enabled=0
    [el5_u3_patch]
    name=Enterprise Linux $releasever U3 - $basearch - patch
    baseurl=http://<repository_server>/yum/EnterpriseLinux/EL5/3/patch/$basearch/
    gpgcheck=1
    enabled=0
    Then ran following commands
    up2date -u
    Output
    There was some sort of I/O error: <urlopen error (-2, 'Name or service not known')>
    yum update
    http://<ice.smmj.com>/yum/EnterpriseLinux/EL5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
    Trying other mirror.
    http://<ice.smmj.com>/yum/EnterpriseLinux/EL5/latest/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
    Trying other mirror.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: el5_latest. Please verify its path and try again
    We would like a simple and correct way of doing this or we will be forced to switch to another os and another provider
    Thanks, for your help

    We purchased Licensed version of Red Hat Linux Oracle for our network server. My boss wanted a simple way of installing Samba on it so that the server can be used for file and printer sharing. We have an active directory on our network and couple of other Windows servers as well as other Red Hat servers. He wants to install Samba on that licensed version so that it can primarily be used for file storage and sharing, he wants to be able to connect with gui type interface to this server from windows machines and linux machines and he wants for this Red Hat Linux Oracle machine to show up in active directory.
    Aparently when we went to Applications, Add Remove Software in Red Hat Fedora Samba was not in there.
    When we go to System, Administration, Server Settings, Services, Samba is also not there.
    Nowhere can we find an easy way of installing samba on this Linux OS.
    I went to your site, signed in, (previously there was only 1 channel available there, I have just recently found and added all the channels that were aplicable to our system) and downloading them now to another version of the same type of Licensed Red Hat Linux Oracle. Hopefully when I use Software Updater in System Tools it will load the packages we are loking for (from the channels I selected on your website). Once that is done I think I could just go to add remove software and install the packages that I need from there.
    I am still not sure why I set out to install repositories on this version of Linux, perhaps I mistakenly thought that once everything is installed (according to directions at http://www.oracle.com/technology/tech/linux/htdocs/yum-repository-setup.html) on the machine in question I would be able to use that same machine to get the packages for that same machine. We were in such a rush and desperate to put the server on to the network it did not dawn on me that this scenario is designed to have one serve on the network that holds repositories and other machines connect to it for packages.
    I think I am on the right track in my logic, log in to your site with the CSI number, user name and password, select ALL the channels versus only one, save the search, then from the machine update packages, then add new software and Samba Should be in there. I would like to hear your thoughts on this.
    This version of Linux seem like a very reliable version of OS and I would hate to give up on it, especially since we already bought licenses for it, its just that we don't have that much experience with it and I would upreciate all the info that you can give us for it. I am sure that everyone at SMMJ will upreciate you for it.

  • Error Message when running BI Publisher

    Hi-
    Getting the following error message when running a custom report, report has been defined but still getting the error message in HCM 9.2 with PeopleTools 8.53
    Template definition MAC_CONF_STM not found in the report definition. (235,2012) PSXP_RPTDEFNMANAGER.ReportDefn.OnExecute Name:GetTemplate PCPC:15048 Statement:325
    Called from:PSXP_RPTDEFNMANAGER.ReportDefn.OnExecute Name:GetTemplateRuntime Statement:1778
    Called from:PSXP_RPTDEFNMANAGER.ReportDefn.OnExecute Name:ProcessReport Statement:1115
    Called from:BA_VALIDATION.ConfirmStmtPrint.OnExecute Name:PrintConfirmStmt Statement:53
    Called from:W3EB_ENR_SUMMARY.GBL.W3EB_ENR_PB_WRK.ODEM_CONF_STMT_PB.FieldChange Statement:2
    Any idea regarding the error message
    Regards,
    MACD

    Did your custom report ever ran successfully in the environment you are getting the error.
    Most of the time not all the report definition and associated definitions are migrated to the next environment.
    Have a look at following doc:
    E-BI/XMLP: How To Migrate BI/XML Publisher File Definition Objects? (Doc ID 659919.1)

  • Error message when running form

    hi everybody,
    im getting this error message when running a simple form.
    Positional Parameter after key command line.
    Can anyone please help.
    thnk u

    Check the path to your form. Forms does not like spaces in the path or fmx filename, but the error doesn't explain the problem at all!

  • I get an error message when running a back-up from my Macbook Pro: The backup disk image Macbook.sparsebundle could not be accessed (error-1) and the backup did not complete? What is the issue?

    I get an error message when running a back-up from my Macbook Pro: The backup disk image Macbook.sparsebundle could not be accessed (error-1) and the backup did not complete? What is the issue?

    Try Here  >  http://pondini.org/TM/C12.html
    More Info here  >  http://pondini.org/TM/Time_Capsule.html

  • Error message when running Transaction Code = ME84

    hi,
    i am getting an error message when running Transaction Code = ME84
    Error is 'No processing (error message P5 017), No data for chosen selection'
    can someone please guide me on this ?

    Hi Mahendra,
    There are several reasons for the release not happeneing.
    1. The issue could be in the selection of release type
    2. Scope of selection
    3. Strategy profile
    Please check whether the selection parameters are considered are right for release to happen.
    Regards,
    Harish

  • I receive this error message when watching my daytime program; The video you have requested is either unavailable or is being blocked by an adblocker installed in your browser

    I was watching my daytime program "Young and the Restless" when the video stopped and the error message came up: "I receive this error message when watching my daytime program; The video you have requested is either unavailable or is being blocked by an adblocker installed in your browser

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Failed to load an application resource (internal error) - error message when previewing pdf in program

    Hi,
    I keep getting this error message when trying to Preview PDF in program "Failed to load an application resource (internal error)". I haven't changed anything in LiveCycle, so not sure why this is happening. Have had this issue for the past few months. I've been working around it, but it's kind of a pain. Would prefer to view forms in program. Suggestions to fix this?
    Thank you!
    Stacy

    I fixed mine! In Reader 9 and 10.0 I had disabled the ReadOutLoud feature as it kept popping up whenever it felt like it, and I don't need ReadOutLoud. What worked for me was first to purge the system of Reader 9 - the uninstall routine leaves stuff behind. Then I went into the Reader 10 program folder, located the plug_ins sub folder, and renamed it to oldplug_ins. Then I ran the repair routine which recreated the plug_ins subfoler.. All now works, except that the <expletive deleted> ReadOutLoud is up to its old tricks again, but I can live with that for now.
    Hope this helps.

  • Error message when run a query

    I got an error message when I run one of the query on the portal:
    Root Cause
    The initial exception that caused the request to fail was:
    Termination message sent
    INFO
    No connection to system BI_SAP_QUERY available
    com.sap.ip.bi.shared.SharedText system_not_found
    BI_SAP_QUERY
    No connection to system BI_SAP_QUERY available
    com.sap.ip.bi.shared.SharedText system_not_found
    BI_SAP_QUERY
    ABEND BRAIN (892): 1 SIDs from characteristic USITM are missing (CL_RSDM_READ_MASTER_DATA->_SIDVAL_DIRECT_READ2)
      MSGV1: 1
      MSGV2: USITM
      MSGV3: CL_RSDM_READ_MASTER_DATA->_SIDVAL_DIRECT_READ2
    What problem is this? How to fix it? Thanks in advance!

    Hi Zheng,
    Import Support Package 04 for Release 3.50 (BW3.50 Patch 04 or SAPKW35004) into your BW system. The Support Package will be available when note 0693494 with the short text "SAPBWNews BW 3.50 Support Package 04", describing this Support Package in more detail, is released for customers.
    Regards,
    Anil

  • Error message when running Business rules

    Hello,
    We are having the following error message when launching the business rules; cannot calculate - analytic server error (1013131): Failed to start Asynchonous thread. When looking att he Essabse log, we find the following errors around the same time we got this error:
    [Wed May 06 22:01:45 2009]Local/ESSBASE0///Info(1051037)
    Logging out user [brlpo], active for 63 minutes
    [Wed May 06 22:02:45 2009]Local/ESSBASE0///Info(1051001)
    Received client request: Get Substitution Variable (from user [essbaseadmin])
    [Wed May 06 22:02:45 2009]Local/ESSBASE0///Error(1051083)
    Substitution variable AOP.Finance.CurrFcst does not exist
    [Wed May 06 22:02:45 2009]Local/ESSBASE0///Warning(1051003)
    Error 1051083 processing request [Get Substitution Variable] - disconnecting
    [Wed May 06 22:02:45 2009]Local/ESSBASE0///Info(1051001)
    Received client request: Get Substitution Variable (from user [essbaseadmin])
    [Wed May 06 22:02:45 2009]Local/ESSBASE0///Info(1051001)
    Received client request: Get Substitution Variable (from user [essbaseadmin])
    [Wed May 06 22:02:45 2009]Local/ESSBASE0///Error(1051083)
    Substitution variable AOP.Finance.Curryr does not exist
    [Wed May 06 22:02:45 2009]Local/ESSBASE0///Warning(1051003)
    Error 1051083 processing request [Get Substitution Variable] - disconnecting
    Would you have an idea of reason of error code?
    Thierry

    Hi,
    Looks like the substitution variables its looking for are missing.
    Can you check that?
    Regards,
    Amol

  • Installed JDK but still error message when running java class

    Hello
    Can you please help me somebody?
    I installed everything how it was in the book.
    So I created my first script.
    I ran "javac HelloUser.java" which created the class.
    And then when I want to run the "java HelloUser " I always get this message:
    exeption in thread "main" java.lang.NoClassDefFoundError: HelloUser
    I just dont understand it. I changed the paths in the system settings as well.
    Thank you
    Thomas Popovits

    http://onesearch.sun.com/search/onesearch/index.jsp?qt=java.lang.NoClassDefFoundError&subCat=siteforumid%3Ajava54&site=dev&dftab=siteforumid%3Ajava54&chooseCat=javaall&col=developer-forums

  • Encountering exceptions when running a java program in the db

    hi,
    when running the following following program in oracle11g, AIX (5300-07)
    DROP JAVA SOURCE DIRLIST;
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED DIRLIST as import java.io.*;
    import java.sql.*;
    import java.util.Date;
    import java.text.SimpleDateFormat;
    public class DirList
    public static void getList(String directory)
    throws SQLException
    File path = new File( directory );
    String[] list = path.list();
    String element;
    for(int i = 0; i < list.length; i++)
    element = list;
    String fpath=directory+"/"+list[i];
    File f = new File(fpath);
    long len;
    Date date;
    String ftype;
    String sqldate;
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:S");
    if (f.isFile()) {
    len = f.length();
    date = new Date(f.lastModified());
    sqldate = df.format(date) ;
    ftype = "F";
    else {
    len = 0;
    sqldate = null;
    ftype = "D";
    #sql { INSERT INTO DIR_LIST (FILENAME, filelength, filetype, filemodified)
    VALUES (:element, :len, :ftype, to_timestamp(:sqldate,'YYYY-MM-DD HH24:MI:SS:FF3'))
    we are encountering the following issues..
    SQL> sho error JAVA SOURCE DIRLIST
    Errors for JAVA SOURCE DIRLIST:
    LINE/COL ERROR
    0/0 An exception has occurred in the compiler (1.5.0_10). Please
    file a bug at the Java Developer Connection
    (http://java.sun.com/webapps/bugreport) after checking the Bug
    Parade for duplicates. Include your program and the following
    diagnostic in your report. Thank you.
    0/0 java.lang.NullPointerException
    0/0 at
    com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:4
    80)
    LINE/COL ERROR
    0/0 at
    oracle.aurora.jdkcompiler.JdkDriver.compile(JdkDriver.java:570)
    0/0 at oracle.aurora.rdbms.Compiler.compile(Compiler.java:322)
    0/0 at oracle.aurora.rdbms.Compiler.access$000(Compiler.java:57)
    0/0 at oracle.aurora.rdbms.Compiler$1.run(Compiler.java:324)
    0/0 at java.security.AccessController.doPrivileged(Native Method)
    0/0 at oracle.aurora.rdbms.Compiler.doCompile(Compiler.java:651)
    In trace files there are another set of exceptions that are getting generated when this program is running as shown below
    joez_compile_method: failed compiling method oracle/aurora/sqljdecl/SqljDecl.jj_
    scan_token with oracle/aurora/zephyr/util/JITCompileException:class java.lang.Ar
    rayIndexOutOfBoundsException:null
    oracle.aurora.zephyr.util.JITCompileException: class java.lang.ArrayIndexOutOfBo
    undsException:null
    at oracle.aurora.zephyr.util.Debug.assert_(Debug.java:67)
    at oracle.aurora.zephyr.JITDriver.jitMethod(JITDriver.java:197)
    at oracle.aurora.zephyr.JITDriver.jitMethod(JITDriver.java:71)
    at oracle.aurora.vm.OracleRuntime.jitOneMethod(Native Method)
    at oracle.aurora.vm.OracleRuntime.jitSomeMethods(OracleRuntime.java:758)
    Caused by: java.lang.ArrayIndexOutOfBoundsException
    at java.util.Vector.addElement(Vector.java:582)
    at java.util.Stack.push(Stack.java:44)
    at oracle.aurora.zephyr.bytecode.ByteCodeToMIR.push(ByteCodeToMIR.java:4
    03)
    at oracle.aurora.zephyr.bytecode.ByteCodeToMIR.pushRef(ByteCodeToMIR.jav
    a:406)
    at oracle.aurora.zephyr.bytecode.ByteCodeToMIR.translateBasicBlock(ByteC
    odeToMIR.java:1822)
    at oracle.aurora.zephyr.bytecode.ByteCodeToMIR.translateMethod(ByteCodeT
    oMIR.java:824)
    at oracle.aurora.zephyr.bytecode.ByteCodeToMIR.translateMethod(ByteCodeT
    oMIR.java:4633)
    at oracle.aurora.zephyr.JITDriver.jitMethod(JITDriver.java:125)
    ... 3 more
    We been trying for couple of weeks to figure out the issue.
    Has anyone encountered this issue or having solution in rectifying this please share with us..
    Thanks

    If you mean can you run it as a windows 2000 service so the user doesn't see it yes you can.
    I recommend the following Java Service wrapper program:
    http://www.eworksmart.com/JNT/
    It's quite simple to set up and will start when the user logs in (so long as the service is set to start automatically).
    Hope that helps,
    Seigers.

  • Problem when Running a java program

    I am new to Java. I have installed JDK 1.3.1 on my machine. have setup the class path also. My program complies fine but when i am running it I am getting the following error.
    Exception in thread "main" java.lang.NoClassDefFoundError: InsertSuppliers
    Press any key to continue . . .
    I am pasting my java program underneath. Can anybody please help me?
    import java.sql.*;
    import java.lang.*;
    import java.util.*;
    import java.io.*;
    public class InsertSuppliers
         public static void main(String[] args)
    throws IOException
              System.out.println("iuysuiysuidyfsduyf");
              String url = "jdbc:odbc:CafeJava";
              Connection con;
              Statement stmt;
              String query = "select SUP_NAME, SUP_ID from SUPPLIERS";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch(java.lang.ClassNotFoundException e) {
                   System.err.print("ClassNotFoundException: ");
                   System.err.println(e.getMessage());
              try {
                   con = DriverManager.getConnection(url,
                                                 "Admin", "duke1");
                   stmt = con.createStatement();
                   stmt.executeUpdate("insert into SUPPLIERS " +
         "values(49, 'Superior Coffee', '1 Party Place', " +
                        "'Mendocino', 'CA', '95460')");
                   stmt.executeUpdate("insert into SUPPLIERS " +
                        "values(101, 'Acme, Inc.', '99 Market Street', " +
                        "'Groundsville', 'CA', '95199')");
                   stmt.executeUpdate("insert into SUPPLIERS " +
         "values(150, 'The High Ground', '100 Coffee Lane', " +
                        "'Meadows', 'CA', '93966')");
                   ResultSet rs = stmt.executeQuery(query);
                   System.out.println("Suppliers and their ID Numbers:");
                   while (rs.next()) {
                        String s = rs.getString("SUP_NAME");
                        int n = rs.getInt("SUP_ID");
                        System.out.println(s + " " + n);
                   stmt.close();
                   con.close();
              } catch(SQLException ex) {
                   System.err.println("SQLException: " + ex.getMessage());
    }

    Your error occurs because java can not find a file named InsertSuppliers.class in the Classpath. there are 3 basic ways to make this work. Assume you compiled InsertSuppliers so that the InsertSuppliers.class file is in a directory c:\myjava (I am assuming Windows).
    1. Do not set your System Classpath. CD to the c:\myjava directory. Enter "java InsertSuppliers"
    2. Set your System Classpath = .;c:\myjava and enter "java InsertSuppliers" from any directory.
    3. Enter "java -classpath c:\myjava InsertSuppliers" from any directory.
    Of course, none of these will work if InsertSuppliers.class file doesn't exist in c:\myjava. And remember that class names are case sensitive.

Maybe you are looking for

  • DELETED MY MUSIC!!!

    I has a spaz moment and tried to move my library dont ask why, and i hit delete i tried going to the recycle bin and restoring it. But its still no where to be found, i just bought all these songs!! Please any help will do

  • Enhancement for MB01

    Hi Gurus , Our  client requirement is they wanted a message ("Quality Inspection is active" ) at the time of saving the transaction MB01(Grn against Purchase order) if  Inspection type is active for that particular material   in material master  . Ca

  • Unable to confirm TO - Getting VL659 error Message

    Hi Experts, An Inbound Delivery is created and 26 TO's created for each HU. 25 TO's are confirmed. Now while Confirming one TO getting an error message VL659 - (Error when creating document flow for delivery.) Can some one please help as it is a stan

  • Regarding tc PA51

    hi experts,               cud u plz tell me what is the significance of tc pa51 in my database it is showing  dots (.),,can i calculate the attendance of a particular employee from here..plz help me...thnx in advance..its urgent...

  • Nokia N900 Clock & Alarm UI error

    Hello, I keep getting the following error message whenever I click on the Clock & Alarm option: "Internal error. Application 'çlock' closed." It started happening about a few weeks ago when I tried to install Fring (beta version). I have un-installed