How to run package procedure using Crontab

Below is my crontab script to run . It is working fine in if I run it manually like
sh crontest
but if i call it in crontab , only echo is working , oracle commands are not working.
my crontab command is -> * * * * * sh /home/oracle/cron/crontest
crontest
#!/bin/sh
echo "Procedure start successfully : $(date) " >> /home/oracle/pro_test
sqlplus -s orpheus/frs@frs_ods<<END
set serveroutput on
exec pkg_orph_adhoc.pro_ca('3478409644','2011-07-01','2011-10-31');
insert into tt values(sysdate);
commit;
exit;
END
********************************************

That's correct because crontab does not process your login scripts and hence does not know the Oracle environment. You need to set it up, see below example. Make sure to use the correct SID, which is case sensitive. Note the space between the dot (.) and oraenv to source execute the script, which should be in /usr/local/bin. At a bare minimum you will need to setup ORACLE_HOME and add ORACLE_HOME/bin to your path, which "oraenv" will take care off and more. Oraenv needs ORACLE_SID when in non-interactive mode.
#!/bin/sh
ORACLE_SID=test
ORAENV_ASK=NO
. oraenv -s
sqlplus -s /nolog <<-EOF
   set pages 0 feed off
   connect / as sysdba
   select status from v\$instance;
   exit
EOF
# END

Similar Messages

  • How to Find Packages/Procedures using any particular table

    Hi,
    I want to find out the procedures,packages using any particular table. Please tell me how to find out.

    >
    I want to find out the procedures,packages using any particular table. Please tell me how to find out.
    >
    You can use the utldtree.sql in the rdbms\admin folder to do that. See my reply in this thread
    Re: Finding out all procedures , functions in a tree like structure in sequence
    The comments in the script (and in the thread) show how to use it. The script creates a table, a view and a procedure.
    Then you just use it like the comments describe. Here is the result for my SCOTT.EMP table. You can see I have a lot of packages and functions and things that depend on that table.
    execute deptree_fill('table', 'scott', 'emp');
    select * from ideptree
    OBJECT_NAME,SCHEMA,NAME,TYPE,STATUS
    0. EMP,SCOTT,EMP,TABLE,VALID
          1. PAK_TEST1,SCOTT,PAK_TEST1,PACKAGE,INVALID
                2. PAK_TEST1,SCOTT,PAK_TEST1,PACKAGE BODY,VALID
          1. GET_EMP,SCOTT,GET_EMP,FUNCTION,INVALID
          1. THREE_TABLE_EMP_VIEW,SCOTT,THREE_TABLE_EMP_VIEW,VIEW,INVALID
          1. TEST_PKG,SCOTT,TEST_PKG,PACKAGE,INVALID
                2. TEST_PKG,SCOTT,TEST_PKG,PACKAGE BODY,VALID
          1. TEST_F,SCOTT,TEST_F,FUNCTION,INVALID
          1. PIPELINE,SCOTT,PIPELINE,FUNCTION,INVALID
          1. GETOLDSAL,SCOTT,GETOLDSAL,FUNCTION,INVALID
          1. UPDATESAL_RETURNOLDSAL,SCOTT,UPDATESAL_RETURNOLDSAL,FUNCTION,INVALID
          1. EMP_HIER_PKG,SCOTT,EMP_HIER_PKG,PACKAGE,INVALID
                2. EMP_HIER_PKG,SCOTT,EMP_HIER_PKG,PACKAGE BODY,INVALID
          1. EMP_TBL,SCOTT,EMP_TBL,TYPE,INVALID
          1. EMP_HIER_PKG,SCOTT,EMP_HIER_PKG,PACKAGE BODY,INVALID
          1. TEST_REFCURSOR_PKG,SCOTT,TEST_REFCURSOR_PKG,PACKAGE BODY,VALID
          1. DOIT,SCOTT,DOIT,PROCEDURE,VALID
          1. DOIT1,SCOTT,DOIT1,PROCEDURE,VALID
          1. LSZRPT,SCOTT,LSZRPT,PACKAGE,INVALID
                2. LSZRPT,SCOTT,LSZRPT,PACKAGE BODY,INVALID
          1. F_GET_NAME,SCOTT,F_GET_NAME,FUNCTION,INVALID
          1. TEST_REFCURSOR_PKG1,SCOTT,TEST_REFCURSOR_PKG1,PACKAGE BODY,INVALID
          1. TEST2,SCOTT,TEST2,PROCEDURE,INVALID
          1. TAX_COST_SP,SCOTT,TAX_COST_SP,PROCEDURE,INVALID
          1. V_EMP,SCOTT,V_EMP,VIEW,VALID
                2. EMPLOYEES,USER1,EMPLOYEES,SYNONYM,VALID
          1. VIEW_EMP_TEST,SCOTT,VIEW_EMP_TEST,VIEW,VALID
          1. MASTER_MV,SCOTT,MASTER_MV,MATERIALIZED VIEW,INVALID
          1. TEST_VIEW,HR,TEST_VIEW,VIEW,VALID
          1. MYEMPVIEW,SCOTT,MYEMPVIEW,VIEW,VALID
          1. MYEMPVIEW1,SCOTT,MYEMPVIEW1,VIEW,VALID
          1. TEST_NDX,SCOTT,TEST_NDX,VIEW,VALID
          1. PKG1,SCOTT,PKG1,PACKAGE,VALID
          1. EMP_ACTIONS,SCOTT,EMP_ACTIONS,PACKAGE BODY,INVALID
          1. MYPACKAGE,SCOTT,MYPACKAGE,PACKAGE,VALID
          1. V_EMP1,SCOTT,V_EMP1,VIEW,VALID
          1. IDEXISTS,SCOTT,IDEXISTS,PROCEDURE,VALID
          1. VIEW_TEST_EMP,SCOTT,VIEW_TEST_EMP,VIEW,INVALID
          1. GET_EMP_REC,SCOTT,GET_EMP_REC,FUNCTION,VALID
          1. GET_EMP_CLOB,SCOTT,GET_EMP_CLOB,FUNCTION,VALID

  • How to run the job using DBMS_SCHEDULER

    How to run the job using DBMS_SCHEDULER
    pleas give some sample Iam very new to DBMS_SCHEDULER

    Hi
    DBMS_SCHEDULER
    In Oracle 10g the DBMS_JOB package is replaced by the DBMS_SCHEDULER package. The DBMS_JOB package is now depricated and in Oracle 10g it's only provided for backward compatibility. From Oracle 10g the DBMS_JOB package should not be used any more, because is could not exist in a future version of Oracle.
    With DBMS_SCHEDULER Oracle procedures and functions can be executed. Also binary and shell-scripts can be scheduled.
    Rights
    If you have DBA rights you can do all the scheduling. For administering job scheduling you need the privileges belonging to the SCHEDULER_ADMIN role. To create and run jobs in your own schedule you need the 'CREATE JOB' privilege.
    With DBMS_JOB you needed to set an initialization parameter to start a job coordinator background process. With Oracle 10g DBMS_SCHEDULER this is not needed any more.
    If you want to user resource plans and/or consumer groups you need to set a system parameter:
    ALTER SYSTEM SET RESOURCE_LIMIT = TRUE;
    Baisc Parts: Job
    A job instructs the scheduler to run a specific program at a specific time on a specific date.
    Programs
    A program contains the code (or reference to the code ) that needs to be run to accomplish a task. It also contains parameters that should be passed to the program at runtime. And it?s an independent object that can referenced by many jobs
    Schedules
    A schedule contains a start date, an optional end date, and repeat interval with these elements; an execution schedule can be calculated.
    Windows
    A window identifies a recurring block of time during which a specific resource plan should be enabled to govern resource allocation for the database.
    Job groups
    A job group is a logical method of classifying jobs with similar characteristics.
    Window groups
    A window groups is a logical method of grouping windows. They simplify the management of windows by allowing the members of the group to be manipulated as one object. Unlike job groups, window groups don?t set default characteristics for windows that belong to the group.
    Using Job Scheduler
    SQL> drop table emp;
    SQL> Create table emp (eno int, esal int);
    SQL > begin
    dbms_scheduler.create_job (
    job_name => 'test_abc',
    job_type => 'PLSQL_BLOCK',
    job_action => 'update emp set esal=esal*10 ;',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=DAILY; INTERVAL=10',
    comments => 'Iam tesing scheduler');
    end;
    PL/SQL procedure successfully completed.
    Verification
    To verify that job was created, the DBA | ALL | USER_SCHEDULER_JOBS view can be queried.
    SQL> select job_name,enabled,run_count from user_scheduler_jobs;
    JOB_NAME ENABL RUN_COUNT
    TEST_abc FALSE 0
    Note :
    As you can see from the results, the job was indeed created, but is not enabled because the ENABLE attribute was not explicitly set in the CREATE_JOB procedure.
    Run your job
    SQL> begin
    2 dbms_scheduler.run_job('TEST_abc',TRUE);
    3* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> select job_name,enabled,run_count from user_scheduler_jobs;
    JOB_NAME ENABL RUN_COUNT
    TEST_ABC FALSE 0
    Copying Jobs
    SQL> begin
    2 dbms_scheduler.copy_job('TEST_ABC','NEW_TEST_ABC');
    3 END;
    4 /
    PL/SQL procedure successfully completed. Hope it will help you upto some level..!!
    Regards
    K

  • How to run the procedure

    Procedure test_proc(Req_Hdr_id IN VARCHAR2, uname IN VARCHAR2
    is
    l_request_id NUMBER:=0;
    p_resp_appl_id NUMBER :=401;
    p_resp_id NUMBER := 20634;
    p_user_id NUMBER := 5993;
    BEGIN
    update xxkfupm01.kfupm_mcr_request_header
    set status='Under_Proc'
    where request_hdr_id=Req_Hdr_id;
    commit;
    This is procedure is define in package .how to run this procedure.
    Regards
    Arif
    Edited by: user11309801 on Jan 2, 2011 9:38 PM

    Try This:-
    DECLARE
    req_hdr_id VARCHAR2 (200);
    uname VARCHAR2 (200);
    BEGIN
    req_hdr_id := NULL;
    uname := NULL;
    <<PackageName>>.test_proc (req_hdr_id, uname);
    COMMIT;
    END;
    Also ,add exceptions in the procedure.

  • Urgent - How to Run a FM using CATT script tool,

    Hi All,
    How to Run a FM using CATT script tool,
    Thanks in advance,
    KSR

    choose  type as "Function module test" (if you are in release less than 6.4 abap) after entering into t.code SCAT.
    Pl. refer to this documentation for creating function module test cases
    <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCATTOL/CACATTOL.pdf">http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCATTOL/CACATTOL.pdf</a>
    reward if it helps
    Krishna

  • How to run stored procedure in run-time not in design

    hello:
    I have download the ODT software
    and i installed VS 2003 environment
    amd i have oracle 9i on the server and oralce client on my computer
    and I know how to run the ODT inside the VS2003 and how to use it
    I built a package and inside it a procedure that does not take any parameter
    PROCEDURE "TEST1" IS
    BEGIN
    insert into emp (empno,ename)
    values (3003,'jon');
    END "TEST1";
    this procedure is valid and I can run it in ODT (by right click over the procedure name and select "Run")
    but when I drag it and drop this procedure on a form in application I have a dialog with errors that's not understandable
    for example:
    ORA-06550: line 1, column 27
    PLS-00315: PL/SQL TABLE Declarations must currently use binary_integer indexes
    and many other errors
    ok I want to know how I can call the procedure in the code and give to it the in parameters and then get the out parameters
    I hope to find replay
    thank you

    Hi,
    You have to take care of certain measures other thatn just drag and drop the Oracle procedure to the .NET form.
    Following is a simple code to call an Oracle procedure from the C#.Net form
    ============================================================
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace TEST1
         public class CallingProcs : System.Web.UI.Page
              protected System.Web.UI.WebControls.Button Button1;
              protected System.Web.UI.WebControls.TextBox txtYear;
              OracleConnection conn;
              private void Page_Load(object sender, System.EventArgs e)
                   // Put user code to initialize the page here
                   string oradb = "Data Source=ORA1;User Id=SCOTT;Password=TIGER;";
    conn = new OracleConnection(oradb);
                   conn.Open();
              #region Web Form Designer generated code
              override protected void OnInit(EventArgs e)
                   // CODEGEN: This call is required by the ASP.NET Web Form Designer.
                   InitializeComponent();
                   base.OnInit(e);
              /// <summary>
              /// Required method for Designer support - do not modify
              /// the contents of this method with the code editor.
              /// </summary>
              private void InitializeComponent()
                   this.Button1.Click += new System.EventHandler(this.Button1_Click);
                   this.Load += new System.EventHandler(this.Page_Load);
              #endregion
              private void Button1_Click(object sender, System.EventArgs e)
                   //OracleCommand dbcmd = new OracleCommand();
                   OracleCommand dbcmd = conn.CreateCommand ();
                   dbcmd.CommandType = CommandType.StoredProcedure;
                   dbcmd.CommandText = "TEST1";
                   try
                        dbcmd.ExecuteNonQuery ();
                        Response.Write("Excecuted succesfully");
                   catch(Exception ex)
                        Response.Write(ex.Message);
    ============================================================
    Most of the above code is generated automatically. I am using Visual Studio .NET 2003 , C# for it.
    The design view of the form contains a button named 'Button1' and the code is aimed to call the procedure 'TEST1' on clicking the button.
    Hope this will give you a start to using oracle from .NET

  • How to view stored procedure using SQLPlus

    I have created the following stored procedure in Oracle, I would like to know how to view this stored procedure using SQLPlus:
    CREATE PROCEDURE get_product_code(prod_no IN VARCHAR2) IS
         CURSOR Getno IS
              <my_query_goes_here>
         BEGIN
              For Getno_cur IN Getno LOOP
              DBMS_OUTPUT.PUT_LINEGetno_cur.name);
              END LOOP;
         END;
    run;

    Hi,
    You can also use USER_SOURCE in place of ALL_SOURCE, for getting your own procedure code (or any pl/sql schema object).
    Regards

  • How to know (package , procedures or functions) name for current sessions

    Hi all
    I'm DBA and i want to find way to get object name whatever (package , procedures or functions) for current running statement in active session.
    To clarify when i open session browser from toad i can see active sessions and see current statement for every session but without the name of the object.
    Is there any way to know this point.
    thanks in advance

    select *
      from dba_objects
    where object_id in (select nvl(t.PLSQL_ENTRY_OBJECT_ID,-1)
                           from v$session t
                          where sid = 452)
    Ramin Hashimzade

  • How to run an Applet using the JDK1.3.1 platform?

    I'm a beginner of Java Applet.
    I've type in the sample program provided in the text book, and compiled it using the jdk1.3.1 platform.
    Usually we run a java program using java [filename], right?
    How about running an applet file?
    What is appletviewer function?
    Thanks!

    I try to put it in a HTML page but it required me to download a Java Virtual Machine.
    I've been searching sources for that but stil cannot get.
    This is always what I get:
    [We're sorry, you cannot view this page because it requires the Microsoft Java Virtual Machine (MSJVM). Your machine does not have the MSJVM installed. For more information please visit www.microsoft.com/java.]
    I visit java.sun.com. On the right side of the page listed with the HOT DOWNLOADS.
    I click on the Java VM but still cannot get anything...
    Can u help me on that?
    I've been trying for 2 days already.
    Thanks!

  • How to run Excel Macros using JDBC-ODBC

    Hi,
    I want to run the excel macros in the excel file, after I connected to excel file, using JDBC-ODBC bridge.
    How macros treated here?
    Help needed please..........
    - Ramesh

    How to run Excel Macros using JDBC-ODBCYou don't.
    As my fuzzy understanding goes.....
    Macros (excel, word, etc) run via a "OLE" extension of the script host system.
    So the only way to run them is via the OLE interface. That has nothing to do with ODBC. You can write your own JNI to do that, or you might get lucky and find that someone else has written a java library to do it for you.

  • How to run an applescript using unix command

    Hi All,
    Can any one help me in giving me the command for running an apple script thru postupgrade shell file in other words i wana run an apple script while running my new installer that will upgrade the old version of application but while installing i want to run an applescript so as i know ill have to give that applescript path in the postupgrade script but how to run it while installation and where to keep it (is it postupgrade). May be in short how can i run apple script thru unix command.

    Use the osascript command.
    In my installer, I use the DropDMG program to build my DMG disk image. It doesn't quit automatically, so I have to do the following:
    osascript -e "tell application \"DropDMG\" to quit"
    Type "man osascript" for more information.

  • How to run servlet by using main?

    How can I use main to run servlet?
    I cannot put request and response object into doGet(request, response) method
    I want this because I want to run this servlet daily and I plan to put it in cron job
    Calvin

    Hi
    Perhaps you cannot run servlet without using browser. But you can make that program as an application in order to run in Dos or Unix shell.
    But still you can run servlet without using browser How?
    You can debug servlets with the same jdb commands you use to debug an applet or an application. The JavaTM Servlet Development Kit (JSDK) provides a standalone program
    called servletrunner that lets you run a servlet without a web browser. On most systems, this program simply runs the java sun.servlet.http.HttpServer command. You
    can, therefore, start a jdb session with the HttpServer class.
    A key point to remember when debugging servlets is that Java Web server and servletrunner achieve servlet loading and unloading by not including the servlets directory on
    the CLASSPATH. This means the servlets are loaded using a custom classloader and not the default system classloader.
    Running servletrunner in Debug Mode
    Running Java Web ServerTM in Debug Mode
    Running servletrunner in Debug Mode
    In this example, the servlets examples directory is included on the CLASSPATH. You can configure the CLASSPATH for debug mode as follows:
    Unix
    $ export CLASSPATH=./lib/jsdk.jar:./examples:$CLASSPATH
    Windows
    $ set CLASSPATH=lib\jsdk.jar;examples;%classpath%
    To start the servletrunner program you can either run the supplied startup script called servletrunner or just supply the servletrunner classes as a parameter to jdb. This
    example uses the parameter to servletrunner.
    $ jdb sun.servlet.http.HttpServer
    Initializing jdb...
    0xee2fa2f8:class(sun.servlet.http.HttpServer)
    > stop in SnoopServlet.doGet
    Breakpoint set in SnoopServlet.doGet
    > run
    run sun.servlet.http.HttpServer
    running ...
    main[1] servletrunner starting with settings:
    port = 8080
    backlog = 50
    max handlers = 100
    timeout = 5000
    servlet dir = ./examples
    document dir = ./examples
    servlet propfile = ./examples/servlet.properties
    To run SnoopServlet in debug mode, enter the following URL in a browser where yourmachine is the machine where you started servlet runner and 8080 is the port number
    displayed in the settings output.
    http://yourmachine:8080/servlet/SnoopServlet
    In this example jdb stops at the first line of the servlet's doGet method. The browser will wait for a response from your servlet until a timeout is reached.
    main[1] SnoopServlet: init
    Breakpoint hit: SnoopServlet.doGet (SnoopServlet:45)
    Thread-105[1]
    We can use the list command to work out where jdb has stopped in the source.
    Thread-105[1] list
    41 throws ServletException, IOException
    42 {
    43 PrintWriter out;
    44
    45 => res.setContentType("text/html");
    46 out = res.getWriter ();
    47
    48 out.println("<html>");
    49 out.println("<head>
    <title>Snoop Servlet
    </title></head>");
    Thread-105[1]
    The servlet can continue using the cont command.
    Thread-105[1] cont
    Running Java Web Server in Debug Mode
    The JSDK release does not contain classes available in the Java Web server and it also has its own special servlet configuration. If you cannot run your servlet from
    servletrunner, then the other option is to run the Java Web server in debug mode.
    To do this add the -debug flag for the first parameter after the java program. For example in the script bin/js change the JAVA line to look like the following. In releases prior
    to the Java 2 platform release, you will also need to change the program pointed to by the variable $JAVA to java_g instead of java.
    Before:
    exec $JAVA $THREADS $JITCOMPILER $COMPILER $MS $MX \
    After:
    exec $JAVA -debug $THREADS $JITCOMPILER
    $COMPILER $MS $MX \
    Here is how to remotely connect to the Java Web Server. The agent password is generated on the standard output from the Java Web Server so it can be redirected into a file
    somewhere. You can find out where by checking the Java Web Server startup scripts.
    jdb -host localhost -password <the agent password>
    The servlets are loaded by a separate classloader if they are contained in the servlets directory, which is not on the CLASSPATH used when starting the Java Web server.
    Unfortunately, when debugging remotely with jdb, you cannot control the custom classloader and request it to load the servlet, so you have to either include the servlets
    directory on the CLASSPATH for debugging or load the servlet by requesting it through a web browser and then placing a breakpoint once the servlet has run.
    In this next example, the jdc.WebServer.PasswordServlet is included on the CLASSPATH when Java Web server starts. The example sets a breakpoint to stop in the service
    method of this servlet, which is the main processing method of this servlet.
    The Java Web Server standard output produces this message, which lets you proceed with the remote jdb session:
    Agent password=3yg23k
    $ jdb -host localhost -password 3yg23k
    Initializing jdb...
    > stop in jdc.WebServer.PasswordServlet:service
    Breakpoint set in jdc.WebServer.PasswordServlet.service
    > stop
    Current breakpoints set:
    jdc.WebServer.PasswordServlet:111
    The second stop lists the current breakpoints in this session and shows the line number where the breakpoint is set. You can now call the servlet through your HTML page. In
    this example, the servlet is run as a POST operation
    <FORM METHOD="post" action="/servlet/PasswordServlet">
    <INPUT TYPE=TEXT SIZE=15 Name="user" Value="">
    <INPUT TYPE=SUBMIT Name="Submit" Value="Submit">
    </FORM>
    You get control of the Java Web Server thread when the breakpoint is reached, and you can continue debugging using the same techniques as used in the Remote Debugging
    section.
    Breakpoint hit: jdc.WebServer.PasswordServlet.service
    (PasswordServlet:111) webpageservice Handler[1] where
    [1] jdc.WebServer.PasswordServlet.service
    (PasswordServlet:111)
    [2] javax.servlet.http.HttpServlet.service
    (HttpServlet:588)
    [3] com.sun.server.ServletState.callService
    (ServletState:204)
    [4] com.sun.server.ServletManager.callServletService
    (ServletManager:940)
    [5] com.sun.server.http.InvokerServlet.service
    (InvokerServlet:101)
    A common problem when using the Java WebServer and other servlet environments is that Exceptions are thrown but are caught and handled outside the scope of your servlet.
    The catch command allows you to trap all these exceptions.
    webpageservice Handler[1] catch java.io.IOException
    webpageservice Handler[1]
    Exception: java.io.FileNotFoundException
    at com.sun.server.http.FileServlet.sendResponse(
    FileServlet.java:153)
    at com.sun.server.http.FileServlet.service(
    FileServlet.java:114)
    at com.sun.server.webserver.FileServlet.service(
    FileServlet.java:202)
    at javax.servlet.http.HttpServlet.service(
    HttpServlet.java:588)
    at com.sun.server.ServletManager.callServletService(
    ServletManager.java:936)
    at com.sun.server.webserver.HttpServiceHandler
    .handleRequest(HttpServiceHandler.java:416)
    at com.sun.server.webserver.HttpServiceHandler
    .handleRequest(HttpServiceHandler.java:246)
    at com.sun.server.HandlerThread.run(
    HandlerThread.java:154)
    This simple example was generated when the file was not found, but this technique can be used for problems with posted data. Remember to use cont to allow the web server
    to proceed. To clear this trap use the ignore command.
    webpageservice Handler[1] ignore java.io.IOException
    webpageservice Handler[1] catch
    webpageservice Handler[1]
    I hope this will help you.
    Thanks
    Bakrudeen

  • How to run exe files using peoplecode?

    How to run .exe extension files using peoplecode. It should execute on clicking a button.can anyone provide sample peoplecode for the same.
    where do i place the exe files ? Local workstation or Server or FTP?
    can i use the same peoplecode if i'm using a button on grid.

    1. You can use function Exec in PeopleCode to run any exe file
    2. You can use ViewContentURL function in PeopleCode to view any .pdf or .doc documents
    Jayaprakash Tedla

  • How to run dunning wizard using DIAPI

    Dear Friends
    In a requirement i have to run dunning wizard using DI API but i am unable to find any DI object.
    Could you help me please !

    Vinit,
    This is currently not an option using the DI API.
    Apologies,
    Eddy

  • How to run the program using specific classpath

    Recently I installed Javamail 1.2 and JAF1.0.1 on my NT Box and set up the classpath. I can compile my java email code by using: javac myEmail.java. But when I tried to run the code using java myEmail, it always gives the error: Exception in thread "main" java.lang.NoClassDefFoundError: myEmail.
    when I use -verbose and found that it always goes to:
    C:\Program Files\JavaSoft\JRE\1.3.1\lib\rt.jar to find classes even I use -cp option to point Javamail\mail.jar and activation.jar.
    what is wrong with it? Thank you in advance!!!!!!

    What does this have to do with JMS. I suggest that this should have been posted to the Java Programming forum where you would have gotten a quick response as this is a simple problem to diagnose.
    The problem is that the class myEmail, which you created, is not on the class path so it cannot find it. It has nothing to do with the location of mail.jar and activation.jar, although this may cause problems later.
    What you need to do is check the classpath in the environment variables section of the System dialog box. Make sure it refers to . (the current directory) as well as the locations of mail.jar and activation.jar. Also when you invoke myEmail ensure you are in the same directory.
    Hope this helps

Maybe you are looking for