Cant run a program from command prompt

i am using eclipse 3.2 for java development.
programs are running from editor window, but whenever i am trying to run it from command prmpt , i am getting folowing error...
..........NoClassDefinitionFound
how to resolve it...??
regards
yogesh g k

Since there have been a lot of posts from people who fail to compile and run their correct code, I would like to suggest to use ant for building and running! It hides the complexities of specifying the correct paths and a lot it's easier to type
prompt>ant
at the command line than
prompt>javac -d . -cp .;longListOfJarsNeededToRun somePackage/*.java aLotOfOtherFilesToCompile.java
prompt>java -cp .;longListOfJarsNeededToRun somePackage.someClass
It takes some time to get familiar with the configuration, but once you get it right, you gain back a lot of your invested time!

Similar Messages

  • Cant See RTF Files in JAR but can when running program from command prompt

    posted August 16, 2005 08:26 AM
    Hi ALL:
    I have a Java Swing APP. It has Menus which displays information through File I/O in a JEditorPane.
    When I run my program from Command Prompt using "java myApp" it shows these RTF Files as it is.
    However when I run them after converting Directory into a Executable JAR FILE, it fails. I get a blank JEditorPane. My RTF files are in the CORRECT PATH, just dont get displayed. Rest of the APP works fine.
    Chetan
    any suggetsions

    posted August 16, 2005 08:26 AM
    Hi ALL:
    I have a Java Swing APP. It has Menus which displays information through File I/O in a JEditorPane.
    When I run my program from Command Prompt using "java myApp" it shows these RTF Files as it is.
    However when I run them after converting Directory into a Executable JAR FILE, it fails. I get a blank JEditorPane. My RTF files are in the CORRECT PATH, just dont get displayed. Rest of the APP works fine.
    Chetan
    any suggetsions

  • Running my application from command prompt

    Hi im a student and kind of a rookie. My program runs fine from eclipse but when i run from command prompt it gives:
    Exception in thread "main" java.lang.MoClassDefFoundError: Mainclass
    This is what i am typing: java Mainclass. And i am sure i am in the right folder. I know it gives the same problem when you are not in the right folder. ALso my program uses jre5.0 and it runs fine on eclipse.
    Any help greatly appreciated

    From the directory containing Mainclass.class try java -cp . Mainclass The effect of "dash cee pea space dot space" is to
    set the classpath to the current directory.

  • Unable to run discoverer report from command prompt

    Hi,
    I'm trying to run the discoverer report from command prompt and i need to schedule the same.
    How could i pass multiple values for the parameters?
    If i don't pass the optional parameters, the parameter screen is getting pop-up? How to skip optional parameters?
    Also, how to pass the data ranges (format for date parameters) ?
    I'm using the below command in command prompt:
    cd/d E:\oracle\BIToolsHome_1\bin
    dis51usr /connect username/password@database /opendb "TIMS-PCJ status Report" /sheet "TIMS observation status report (based on performed date)" /parameter "Test Number" 40351 /parameter "From Date" "01-JAN-2007" /parameter "To Date" "28-FEB-2007" /parameter "Observation Status" C /parameter "Observation Name" "Abdominal Girth" /export HTML "C:\DISCOVERER_REPORT_SCHEDULING\DIS_OUTPUT\PCJStatusOutput11"
    Any one please reply me. Its very urgent.
    Regards,
    Sreedhar

    Hi,
    How could i pass multiple values for the parameters? You should be able to use a comma separated list e.g.
    /parameter "Observation Name" "'Abdominal Girth','Abdominal Girth2'"
    How to skip optional parameters?I don't think you can. You have to supply all parameters and then decode out the parameters you don't need in the workbook.
    how to pass the data ranges You cannot pass a date range. You can pass a start and end parameters. The default format for the date parameters is DD-MON-YYYY but this can change depending on the NLS settings and format of the data item.
    Rod West

  • Error when running a scenario from Command Prompt

    Hi I edited the parameter file and I am trying to run an interface that joins two tables from HR schema and loads into a table in different schema. I am able to run this in the Designer, but I receive an error message when I try to run it through command prompt.
    Here is the error message I get when I try to run it
    09/09/2009 11:58:42 AM(main): Creating session for scenario:DEMO_INTERFACE - 001
    09/09/2009 11:58:42 AM(main): Session : 88010 is running
    com.sunopsis.core.SnpsInexistantObjectException: There is no connection for this
    logical schema/context pair:HR / GLOBAL
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContex
    t(SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect(SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst(SnpSession.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getConLst(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenar
    io.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.e.y(e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)
    09/09/2009 11:58:43 AM(main): Session : 88010 finished with return code : -1
    com.sunopsis.core.SnpsInexistantObjectException: There is no connection for this
    logical schema/context pair:HR / GLOBAL
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContexur
    t(SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect(SnpConnect.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst(SnpSession.java)
    at com.sunopsis.dwg.dbobj.SnpSession.getConLst(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenar
    io.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.e.y(e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)
    DwgJv.main: Exit. Return code:-1
    Thank you for your help.
    Kranthi

    Hello,
    Try to remove and recreate your package and scenario, I had the same issue and solved doing it.
    It seems for me that the package cannot update its contents, for example, if you change something in your interface, you must recreate your package and scenario to update the changes.
    What ODI version do you use? If you use an old version, try to update to ODI 10.1.3.5
    Regards,
    Wallace Galvão
    São Paulo - Brazil

  • Running SQLPLUS script from command prompt on SUN

    We are making a migration from VMS to SUN ( SunOS 5.10) and from 9i to 10g. We have encountered an unanticipated problem with running scripts from the command line in SUN(SQLPLUS execution from the command line). All of our packages have a naming convention such as "DM$LOAD.PKB". I know it is a strange naming convention.
    The problem is that when the package creation script is run in SQLPLUS at the command prompt SQLPLUS can not open the file.
    SQL> @dm$load.pb
    SP2-0310: unable to open file "dm$load.pb"
    SQL> host ls
    dm$load.pkb
    SQL>
    Setting the escape character does not seem to help.
    SQL> set escape '\'
    SQL>
    SQL> @dm\$load.pb
    SP2-0310: unable to open file "dm$load.pb"
    SQL>
    Unfortunately, we can not rename the scripts. This can be done from a shell script, but our Tech Services refuse to run the SQL scripts from a shell script
    Any ideas on how to get SQLPLUS to run the scripts from the SUN command line?

    I did not notice that the cut and paste was poor. It should have read
    SQL> @dm$load.pkb
    SP2-0310: unable to open file "dm$load.pkb"
    SQL> host ls
    dm$load.pkb
    Any ideas will be greatly appreciated.

  • Call an ABAP program or a function module from command prompt/python script

    Dear All,
    I want to call a function module/ABAP program from command prompt or a python script.
    Let me explain with an example.
    There is a function module "z_add" that takes  two integers as input parameters and generates their sum.
    the sum is the output parameter.
    Now i want to call this function module from command prompt / python script and pass parameters to this function module.
    In return i must get the sum(i.e. the output of function module).
    I tried using STARTRFC ,was able to call the FM but could not get the return value(output) from FM.
    Can you please provide me the code of such a function module and the method to call it thereby passing parameters and getting the sum.
    Thanks and regards,
    Gaurav
    Edited by: gauravkec2005 on Mar 4, 2010 7:41 AM

    thank you both!  helpful answers! :o)
    anyway! 
    i have written the program which is called from the SAPScript:
        /:       PERFORM GET_VATNUMBER IN PROGRAM ZFI_F140_OPERATIONS
        /:       USING &BKPF-BUKRS&
        /:       CHANGING &VATNUMBER&
        CE       VAT Registration No : &VATNUMBER&
        REPORT zfi_f140_operations.
        FORM get_vatnumber TABLES in_par  STRUCTURE itcsy
                                  out_par STRUCTURE itcsy.
          DATA: lv_co_code TYPE bukrs,
                lv_vat_no  TYPE stceg.
          READ TABLE in_par WITH KEY name = 'BKPF-BUKRS'.
          MOVE in_par-value TO lv_co_code.
          SELECT SINGLE stceg FROM t001
            INTO lv_vat_no WHERE bukrs = lv_co_code.
          out_par-name = 'VATNUMBER'.
          WRITE lv_vat_no TO out_par-value.
          CONDENSE out_par-value.
          MODIFY out_par INDEX 1.
        ENDFORM.              
    it is not working and i cannot work out why... 
    i have not been ABAPing for very long but have had a go.... 
    any thoughts as to what i have done wrong?
    or point me where i should be looking?  thank you!

  • How to run form from command prompt

    Hi,
    How to run a form from command prompt
    can anybody suggest me the way
    prasanth a.s.

    Well, if you are running windows, client server forms 6i, and your form is called 'myform', you could put this into a batch file :-
    start ifrun60 module=myform

  • Can I change user name after running essbase from command prompt??

    Hi,
    I run essbase from command prompt and during this activity I was asked to give user name and password, but by mistake I put wrong user name and now wolud like to chanege it.
    Is it possible??
    cheers,

    It worked,
    now I was able to connect to easbase from planning, I ve created sample aplication and initialize it but cannot connect to Eas to download data for sample application. After I run the validation there is now only one error displayed:
    Essbase / Essbase Administration Services
    FAILED Web App Availability of web application context (POL-MPIKULSKI 10080, eas)
    Error: com.hyperion.cis.utils.BadResponseCodeException: Bad response code: 404
    Recommended Action: Check application is started
    I tried to start the eas from start>programs>epm system>essbase>administration services>start administration services(java embeded) but it didnt help.
    can I start in in different way??
    cheers,

  • SignTool.exe verify /pa returns exit code 1 from the code but works fine while running from command prompt

    Hi,
    I am using SignTool.exe from a new Process() to verify a codesigned assembly and it returns the exit code 1 whereas it returns exit code 0 while i run the same from Visual Studio Command prompt. Please let me know your thoughts...
    Here is my code snippet from VS2012 ultimate on Win7 PC.
    p = new Process();
                p.StartInfo.FileName = "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bin\\SignTool.exe";
                string args = @"verify";
                p.StartInfo.Arguments =  args + " "+ "/pa " + "/v "+ name;
                p.Start();
                p.WaitForExit();
                pexitcode = p.ExitCode;
    //name = "C:\\Users\\v-maparn\\Documents\\Visual Studio 2012\\Projects\\CodesignVerification\\CodesignVerification\\bin\\Release\\Microsoft.IT.Core.dll"
    Thanks,
    Mani

    Hi Amy,
    Thanks for your reply. I am receiving the exit code 1 by the Process even though the SignTool is able to successfully verify the assembly. I ran the below command from command prompt and received no errors or warnings. I assume the exit code should be 0.
    I have also verified that this assembly has digital signature embedded as you can see from the output.
    output:
    C:\Windows\system32>signtool.exe verify /pa /v "C:\Users\v-maparn\Documents\Visu
    al Studio 2012\Projects\CodesignVerification\CodesignVerification\bin\Release\Mi
    crosoft.IT.Security.UI.SystemSecurityManagement.SSMUIWebHost.dll"
    Verifying: C:\Users\v-maparn\Documents\Visual Studio 2012\Projects\CodesignVerif
    ication\CodesignVerification\bin\Release\Microsoft.IT.Security.UI.SystemSecurity
    Management.SSMUIWebHost.dll
    Signature Index: 0 (Primary Signature)
    Hash of file (sha1): 1B58113B218260837A6B850561538A804B034F2A
    Signing Certificate Chain:
        Issued to: Microsoft Root Certificate Authority
        Issued by: Microsoft Root Certificate Authority
        Expires:   Sun May 09 15:28:13 2021
        SHA1 hash: CDD4EEAE6000AC7F40C3802C171E30148030C072
            Issued to: Microsoft Code Signing PCA
            Issued by: Microsoft Root Certificate Authority
            Expires:   Mon Aug 31 14:29:32 2020
            SHA1 hash: 3CAF9BA2DB5570CAF76942FF99101B993888E257
                Issued to: Microsoft Corporation
                Issued by: Microsoft Code Signing PCA
                Expires:   Thu Apr 24 14:33:39 2014
                SHA1 hash: 108E2BA23632620C427C570B6D9DB51AC31387FE
    The signature is timestamped: Mon Dec 30 02:58:12 2013
    Timestamp Verified by:
        Issued to: Microsoft Root Certificate Authority
        Issued by: Microsoft Root Certificate Authority
        Expires:   Sun May 09 15:28:13 2021
        SHA1 hash: CDD4EEAE6000AC7F40C3802C171E30148030C072
            Issued to: Microsoft Time-Stamp PCA
            Issued by: Microsoft Root Certificate Authority
            Expires:   Sat Apr 03 05:03:09 2021
            SHA1 hash: 375FCB825C3DC3752A02E34EB70993B4997191EF
                Issued to: Microsoft Time-Stamp Service
                Issued by: Microsoft Time-Stamp PCA
                Expires:   Wed Feb 11 14:11:31 2015
                SHA1 hash: D967AB4CF991F11DA6E318C880F1AF1A9C8D2C7C
    Successfully verified: C:\Users\v-maparn\Documents\Visual Studio 2012\Projects\C
    odesignVerification\CodesignVerification\bin\Release\Microsoft.IT.Security.UI.Sy
    stemSecurityManagement.SSMUIWebHost.dll
    Number of files successfully Verified: 1
    Number of warnings: 0
    Number of errors: 0
    C:\Windows\system32>
    Thanks,
    Mani

  • Error while running a ODI scenario from command prompt

    Hi,
    I'm trying to run a ODI scenario from command prompt. I've edited the tnsnames.ora and odiparam.bat file with exact host and port details. Even though I'm facing the below error.
    command:startcmd.bat OdiStartScen -SCEN_NAME=INT.CUSTOMER_STG -SCEN_VERSION=001 -CONTEXT=ICM -AGENT_CODE=KANBAN
    Error: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:orcl
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:280)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
    at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
    at com.sunopsis.sql.i.run(i.java)
    Please help in resolving the error...
    Thanks in advance.
    Edited by: 894841 on Dec 22, 2011 11:15 PM

    Hi,
    Are you able to start the Standalone Agent(KANBAN) and test it in the Topology?
    Check the value of the ODI_MASTER_URL variable in odiparams file(at the path <ODI_HOME>\oracledi\agent\bin) of the agent.
    Specify the full the JDBC URL properly not like localhost(until the DB is on same machine as your ODI).

  • How to run non-customised report from command prompt to gen trace file?

    Hi
    how to run non-customised report from command prompt to gen trace file?
    EBS R12 RUP6.
    RHEL5
    rgrds

    Hi,
    See (Note: 285497.1 - Rwrun.sh Does Not Generate Trace Output Using TRACEOPTS in Command Line) and/or (Note: 737445.1 - R12 Concurrent Requests Run Forever; rwrun Errors REP-50125) for the command you need to use.
    Thanks,
    Hussein

  • Need command to run sql script from sql prompt

    Hi,
    I am beginner in sql i need a command to run sql file from sql prompt.In notepad i have write 10 to 15 tables creation and saved as .sql i want to run this file from sql promp pls some one help.I am very great full to all users in this forum.

    You can also use the 'start' command.
    You may also want to look in the SQLPlus User Guide and Reference (for your release) at the set command for commands to set the number of lines per page, turn headings on or off, and so on:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/toc.htm
    HTH -- Mark D Powell --

  • Scanner works in JCreator but doesn't when run from Command Prompt?

    Can someone tell me why I can run this program in JCreator with no problems, but when I run it with the Command prompt it throws a java.util.InputMismatchException if I input anything?
    import java.util.Scanner;
    public class tester {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in).useDelimiter("\n");
            System.out.println("Type either 1 or 2");
            int temp = in.nextInt();
            System.out.println("");
            if (temp == 1)
                 System.out.println("you typed 1");
            if (temp == 2)
                 System.out.println("you typed 2");
            else
                 System.out.println("you typed something else!");
    }

    Try this code it is running correctly on command prompt
    import java.util.Scanner;
    public class tester {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            System.out.println("Type either 1 or 2");
            int temp = in.nextInt();
            System.out.println("");
            if (temp == 1)
                 System.out.println("you typed 1");
            if (temp == 2)
                 System.out.println("you typed 2");
            else
                 System.out.println("you typed something else!");
    }

  • RunInstaller fails while running from command prompt

    Hi,
    The runInstaller when run fails from command prompt:
    Starting Installation...
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
    Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /vol2/newtmp/OraInstall2009-05-17_11-02-45PM. Please wait ...Success!
    Done!
    [oracle@saudas oracle]$ Oracle Universal Installer, Version 10.2.0.1.0 Production
    Copyright (C) 1999, 2005, Oracle. All rights reserved.
    Unexpected Signal : 11 occurred at PC=0xF7D617CE
    Function=(null)
    Library=/vol2/newtmp/OraInstall2009-05-17_11-02-45PM/jre/1.4.2/lib/i386/client/libjvm.so
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    I have made a temporary directory logged as root user:
    Then login as root:
    $mkdir /vol2/newtmp
    $chown oracle:oinstall /vol2/newtmp
    $chmod 777 /vol2/newtmp
    Then login as oracle:
    $export TMP=/vol2/newtmp
    $export TEMPDIR=/vol2/newtmp
    Any help will be needful for me
    Thanks and Regards

    user598986 wrote:
    I am using Oracle 10g Server Release 2 64 bitThat's a good start.
    The OS is:Red Hat Linux 64 bit.Which version ?
    Did you set DISPLAY env variable ? Did you set the kernel to the required value ?
    Check again all the prerequisites.
    Nicolas.

Maybe you are looking for

  • What's the difference between RSS and Atom feeds?

    I just figured out the RSS thing, which is great. However, when I go to sign up for a RSS feed, I am often given a choice between RSS, Atom, sometimes different versions of RSS. What's the difference between all these? (I tried searching, but was uns

  • Itunes/ipod_audio_ book_problem

    hello guys, It possible that you've heard this problem before, but ive searched this forum for about half an hour and i can't seem to find the answer. I've got some audio books on cd, and i would like to confirt these tracks to my Itunes library and

  • Opportunity Status Reason

    Hi Experts, My client would like the possibility to choose several reasons for an opportunity status. e.g. : Status : Won          Reasons : Price                           Right Ressources Do you know how to do this (if it's possible) ? Thanks a lot

  • Tool to get database queries from application

    Hi I have to support an application which has oracle as a database but I dont have code for the application.So I want to know the queries run from the application whenever we work on that.So is there any view in oracle which we can use for the same?

  • How come my Mail keep come back after I Delete it?

    Re coring of Deleted mail .  iPhone 3