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

Similar Messages

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

    Hi Friends,
    I am getting a message telling inconsistency in the selection criteria while assigning the characteristic value in value fields of a measure of scorecard in SEM application. It's suggesting me to run the program "UMB_BSC_TABLE_CLEAN".
    In the selection screen of "UMB_BSC_TABLE_CLEAN" apart from field for scorecard name there are 2 bullets - one for "Clean" and another for "Repair" and a checkbox named "Check".
    Can anyone please tell me what are these selection screen options for ? Also to solve my problem how i'll run this program ?

    From the documentation of the program:
    <b>Selection</b>
    <i>Scorecard</i>: select the scorecards whose database tables are to be cleaned or repaired.
    <i>Type of Table Change</i>:
    <u>Clean Up</u>:
    Deletion of Scorecard elements that are no longer used or no longer need to be displayed
    Deletion of value fields with value field selections that do not have a SAP BW counterpart
    <u>Repair</u>
    Restoration of inconsistent value field selections
    Deletion of value fields for which the value field selections cannot be restored.
    <i>Check</i>: If you set this indicator, all inconsistent entries are listed without changing the database table(s).

  • How to run the program "RSR_GEN_DIRECT_ALL_QUERIES" in planning fuction?

    Hi all:
    How can i  run the program "RSR_GEN_DIRECT_ALL_QUERIES" in planning fuction?
    hope for your help.
    thanks.

    Hi,
    "RSR_GEN_DIRECT_ALL_QUERIES" is a report which can run in SE38.This is the report used to generate all the changes to reflect in BEx( also generate all BI queries for a info provider, or even all queries/mass generation  in the system).
    In the above , this can be assigned to variant in the process chain, which can  trigger  this  through customized planning function( Generate Button).
    Regards
    CSM Reddy

  • How to run the program with variant automatically

    Hi experts,
    I want to know how can I run the program with a variant automatically without defining any transactions or jobs. I want my program to run with a variant automatically, when I press F8.

    Try doing this way...
    First Create a Sel Screen varient, 'ZTEST123' in this case
    Report ZTEST.
    parameters:
      w_kunnr type kna1-kunnr,
      w_flag type c no-display.
    start-of-selection.
    if w_flag eq ' '.
      submit ZTEST USING SELECTION-SET 'ZTEST123' with w_flag eq 'X'.
    endif.
    end-of-selection.
      write:  w_kunnr.
    Thanks.

  • How to run the program in back ground with out selection screen ?

    Hi,
    I want to run the program in back ground but don't have selection screen. How to run this program in back ground
    as program has no selection screen.
    Waiting for quick response.
    Best Regards,
    Padhy
    Moderator message: basic, please search for available information/documentation.
    Edited by: Thomas Zloch on Feb 21, 2011 12:43 PM

    Hi,
    Go to transaction SE38 --> Execute --> Background.
    If your program contains selection screen, you have to pass your input values as variants.

  • How to run the program in the applet

    I have installed the JDK 1.3 and succesfully compiled my first Java application (appropriately named HelloWorld.java). I could compile the source file also.But i am getting an error when i am trying to run the program in the applet iam getting an error as
    "start applet not initialised"
    and the program is
    * The HelloWorldApp class implements an application that
    * displays "Hello World!" to the standard output.
    public class HelloWorldApp {
    public static void main(String[] args) {
    // Display "Hello World!"
    System.out.println("Hello World!");
    so please help me out
    Thanks in advance

    Hmm... this is a console based application...
    So it won't work using an applet viewer.
    You can try coding an applet instead.
    I hope I didn't misunderstand your question.

  • How to run the programes in NetBeans

    any body know how to run the java progarm in NetBeans.
    can u please guide me?
    Advance in thanks

    thanks for ur reply.
    this is my code.
    public class sample11 {
    /** Creates a new instance of sample11 */
    public sample11() {
    public static void main(String args[])
    System.out.println("nithya");
    i did watever u told. but i don't have o/p. wat can i do? how to it display the o/p?

  • How to run the program in background job,program should run in 3 days.

    Dear Gurus,
    i have a program , that program should run approximately 3 days to get the result.
    i scheduled this program as a background job.
    how can i run sto5 t-code for this same program.
    i that case how we can trace the output.
    Experts please help me out.
    Thank u very much.
    Regards
    sudheer

    Hello Sudheer,
    The trace can be set on background jobs by using ST12 transaction. Please make sure that the trace is activated for only few minutes in production environment.
    Contact your basis team to activate trace on background job and the transaction used is ST12.
    Thanks

  • How to run the Program given in JavaMail 1.4 Demos (folderlist.java)

    Hi All,
    in the distribution of JavaMail 1.4, some programs are given, i want to run folderlist.java. But i m unable to run it? Can somebody tell me how to run it?
    i tried like this:
    java folderlist -T IMAP -H email.abcdef.com -U user -P password
    java folderlist -T POP -H email.abcdef.com -U user -P password
    But it is not working giving some error like :
    Exception in thread "main" javax.mail.NoSuchProviderException: No provider for POP
    at javax.mail.Session.getProvider(Session.java:455)
    at javax.mail.Session.getStore(Session.java:530)
    at javax.mail.Session.getStore(Session.java:510)
    at folderlist.main(folderlist.java:117)

    Hi bshannon,
    I had tried with the protocol names you given, but same is the result, can u tell me i m giving only protocol, host, user, password.
    Is this sufficient to connect or i need to supply all the params like url , root, verbose, pattern, etc.
    I m getting the access to server in other programs. Since our server doesn't support imap. so i tried like this
    E:\downloads\javamail-1.4\demo>java folderlist -P pop3 -H email.abc.com -U username -P password
    Exception in thread "main" javax.mail.NoSuchProviderException: Invalid protocol: null
            at javax.mail.Session.getProvider(Session.java:431)
            at javax.mail.Session.getStore(Session.java:530)
            at javax.mail.Session.getStore(Session.java:510)
            at javax.mail.Session.getStore(Session.java:496)
            at folderlist.main(folderlist.java:119)

  • How to run batch programs using SUBMIT command without any interaction need

    Hello ABAP gurus,
    I have created a batch program in SE38 which calls many other SE38 Programs (Reports).
    I have used the command SUBMIT to call the sub programs. There are about 15 sub programs that this main batch program is calling.
    It works fine, but after calling each subprogram it stops and I have to manually click on 'Back Button' in green on the sap screen to run the next program in the list. Like this I have to do 15 times to run all the programs in the batch.
    Is there a way to avoid this manual intervention and make the program run all the sub programs on its own.
    Your feedback will be highly appreciated.
    Thanks
    Ram

    Thanks Sampath for the response.
    Yes I am using the option "AND RETURN". So it is coming out of each sub program, and it is at this stage it waits for me to click on 'backward green arrow' to continue to the next.
    Here is the code I have used
      SUBMIT Z_AS_BI_F0005_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_DIVISION_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_COMPANY_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_CUSTOMER_EXTRACT WITH  S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_BRANCH_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_BUS_UNIT_EXTRACT  WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_ADDRESS_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_CUSTOMER_GROUP_EXTRACT  WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_GROUP_EXTRACT  WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_PMT_TERMS_EXTRACT  WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_REGION_EXTRACT  WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
      SUBMIT Z_AS_BI_TERRITORY_EXTRACT  WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
    Any other suggestions or feedback will be appreciated.
    Tks
    Ram

  • How tu run the program in background

    Hi SapAll.
    actually iam new to ABAP ,i just want to know on how i can run the particular program  in background .
    can any one explain me in steps .
    i also want to know on how to delete the particular job which has been already created in sm36 .
    will be waiting for best response.
    regards.
    Varma

    Hi
    Find the below steps to be defined.
    1. Go to SM36 -
    > Give the Program Name
    2. If you have priority defined that to in Job class
    3. Click -
    > Start Condition
    4. Select Data/Time Tab
    5. Give the Date and Time for the job execution. (If you want to certain intervale provide it)

  • Help! how to run other programs using java

    how can i run other programs or exe files using java, anyone can give sample codes for this.
    ex. if I click [run MsWord] button, then msWord automatically lunch

    RunTime.getRuntime().exec(string command)
    I guess, it might help you..java.lang.Runtime

  • How to exit the program using AS3??

    Hi guys  , i'm trying to use a button to exit the program. anyone knows which code to use?

    What exactly do you mean by 'exit the program'? What program? Is your Flash Object in a browser, or is it an AIR app?
    If you're talking about an AIR app, have a look at:
    NativeWindow.close()

  • How to run the program for specified time

    Dear Friends,
    I have a small problem, I want to run my labview program for specified amount of time, Say for example it might be 1 hour or 5 hours or 10 minutes or even milliseconds(The time will be specified by the user).
    How to write programs for this
    And I want to get the system time in an instance, how it can be achieved,
    Could you please help me?
    Regards,
    Rathan

    Hi,
    Herewith my screenshot attached. There are thre inputs thres, tempX, xValue, it is in side the while loop.'xValue' will be acquired every iteration, It will be saved through shift register and acquired to 'tempX' for the next iteration, 'thres' is a constant value. I'm doing some logic, and calculating the dvalue and convert it to a string and concatenate it with end of line character, then after writing it into a file.
    In the logic, inside of the functional logic  I'm assigning some values dValue, if the logic is true or else dvalue will be 0
    What I require is I don't want to write the dValue in to a file, if it is equal to zero. Could you please help me, how to tackle this problem?
    Thanks.
    Regards,
    Rathan   
    Attachments:
    writing except 0.GIF ‏9 KB

Maybe you are looking for

  • Intel wired ethernet driver stops working

    We have this issue with several T400 and T500 series ThinkPads that the Intel ethernet driver stops working after a while. All this started to happen maybe a month ago. We have both 32- and 64-bit Windows 7 OSs. Wired ethernet works ok first, but aft

  • PA40..Help reqd....

    Hi, We are having a problem when running org assigment actions on SAP. The contract type field is not being copied over as it should do when this type of action is ran, and instead is being left as a blank field. It seems to work when we do a copy/cr

  • Can't log into main account and vanished files...?

    Hello forums. Last night I was trying to get rid of some junk on my computer, emptying a lot of files in my Trash. Cleaned up my desktop... everything going smoothly. Turned off the computer. I realized there was something fishy this morning when I t

  • RDS 2012 - Session Collection Timeout vs Group Policy Timeout

    Which policy applies? The RD Session Collection timeout or the group policy? My Remote desktop servers are in an OU at a top level with all of my other servers, so I have a administrative timeout group policy which is extremely strict to keep our adm

  • For sale: Keithley PIO-12 Digital I/O card --- 4.99$

    we ship everywhere http://cgi.ebay.ca/ws/eBayISAPI.dll?ViewItem&item=2538530954&rd=1