Class to runnable program

Hello,
I created a bit of code and instead of typing
java {filename}
all the time i would like to create a small application out of it. I mean so i can double click the icon so it runs.
Also, if it is possible to create a double click application, would it also be possible to create it so it runs on all Operating Systems?
Thank you.

Batch file (myApp.bat):
c:\path\to\java -cp c:\path\to\myApp.jar com.mycompany.myclass %*Note: %* is to pass thru command line args
*nix sh script (myApp.sh):
#!/bin/sh
set -a
exec /path/to/java -cp /path/to/myapp.jar  com.mycompany.myclass "$@"Note: "$@" is to pass thru command line args
Or better yet make an executable jar by adding a custom manifest to the jar:
use the jar command like so:
jar -mf myApp.jar MYMANIFESTFILE.MF <files to go into jar>Manifest file contents:
Manifest-Version: 1.0
Created-By: My Company
Main-Class: com.mycompany.myclass
Class-Path: otherCompaniesJarfile.jarThen you run your app like so:
java -jar myApp.jar <args>

Similar Messages

  • Need to create a driver class for a program i have made...

    hey guys im new to these forums and someone told me that i could get help on here if i get in a bind...my problem is that i need help creating a driver class for a program that i have created and i dont know what to do. i need to know how to do this is because my professor told us after i was 2/3 done my project that we need at least 2 class files for our project, so i need at least 2 class files for it to run... my program is as follows:
    p.s might be kinda messy, might need to put it into a text editor
    Cipher.java
    This program encodes and decodes text strings using a cipher that
    can be specified by the user.
    import java.io.*;
    public class Cipher
    public static void printID()
    // output program ID
    System.out.println ("*********************");
    System.out.println ("* Cipher *");
    System.out.println ("* *");
    System.out.println ("* *");
    System.out.println ("* *");
    System.out.println ("* CS 181-03 *");
    System.out.println ("*********************");
    public static void printMenu()
    // output menu
    System.out.println("\n\n****************************" +
    "\n* 1. Set cipher code. *" +
    "\n* 2. Encode text. *" +
    "\n* 3. Decode coded text. *" +
    "\n* 4. Exit the program *" +
    "\n****************************");
    public static String getText(BufferedReader input, String prompt)
    throws IOException
    // prompt the user and get their response
    System.out.print(prompt);
    return input.readLine();
    public static int getInteger(BufferedReader input, String prompt)
    throws IOException
    // prompt and get response from user
    String text = getText(input, prompt);
    // convert it to an integer
    return (new Integer(text).intValue());
    public static String encode(String original, int offset)
    // declare constants
    final int ALPHABET_SIZE = 26; // used to wrap around A-Z
    String encoded = ""; // base for string to return
    char letter; // letter being processed
    // convert message to upper case
    original = original.toUpperCase();
    // process each character of the message
    for (int index = 0; index < original.length(); index++)
    // get the letter and determine whether or not to
    // add the cipher value
    letter = original.charAt(index);
    if (letter >='A' && letter <= 'Z')
    // is A-Z, so add offset
    // determine whether result will be out of A-Z range
    if ((letter + offset) > 'Z') // need to wrap around to 'A'
    letter = (char)(letter - ALPHABET_SIZE + offset);
    else
    if ((letter + offset) < 'A') // need to wrap around to 'Z'
    letter = (char)(letter + ALPHABET_SIZE + offset);
    else
    letter = (char) (letter + offset);
    // build encoded message string
    encoded = encoded + letter;
    return encoded;
    public static String decode(String original, int offset)
    // declare constants
    final int ALPHABET_SIZE = 26; // used to wrap around A-Z
    String decoded = ""; // base for string to return
    char letter; // letter being processed
    // make original message upper case
    original = original.toUpperCase();
    // process each letter of message
    for (int index = 0; index < original.length(); index++)
    // get letter and determine whether to subtract cipher value
    letter = original.charAt(index);
    if (letter >= 'A' && letter <= 'Z')
    // is A-Z, so subtract cipher value
    // determine whether result will be out of A-Z range
    if ((letter - offset) < 'A') // wrap around to 'Z'
    letter = (char)(letter + ALPHABET_SIZE - offset);
    else
    if ((letter - offset) > 'Z') // wrap around to 'A'
    letter = (char)(letter - ALPHABET_SIZE - offset);
    else
    letter = (char) (letter - offset);
    // build decoded message
    decoded = decoded + letter;
    return decoded;
    // main controls flow throughout the program, presenting a
    // menu of options the user.
    public static void main (String[] args) throws IOException
    // declare constants
    final String PROMPT_CHOICE = "Enter your choice: ";
    final String PROMPT_VALID = "\nYou must enter a number between 1" +
    " and 4 to indicate your selection.\n";
    final String PROMPT_CIPHER = "\nEnter the offset value for a caesar " +
    "cipher: ";
    final String PROMPT_ENCODE = "\nEnter the text to encode: ";
    final String PROMPT_DECODE = "\nEnter the text to decode: ";
    final String SET_STR = "1"; // selection of 1 at main menu
    final String ENCODE_STR = "2"; // selection of 2 at main menu
    final String DECODE_STR = "3"; // selection of 3 at main menu
    final String EXIT_STR = "4"; // selection of 4 at main menu
    final int SET = 1; // menu choice 1
    final int ENCODE = 2; // menu choice 2
    final int DECODE =3; // menu choice 4
    final int EXIT = 4; // menu choice 3
    final int ALPHABET_SIZE = 26; // number of elements in alphabet
    // declare variables
    boolean finished = false; // whether or not to exit program
    String text; // input string read from keyboard
    int choice; // menu choice selected
    int offset = 0; // caesar cipher offset
    // declare and instantiate input objects
    InputStreamReader reader = new InputStreamReader(System.in);
    BufferedReader input = new BufferedReader(reader);
    // Display program identification
    printID();
    // until the user selects the exit option, display the menu
    // and respond to the choice
    do
    // Display menu of options
    printMenu();
    // Prompt user for an option and read input
    text = getText(input, PROMPT_CHOICE);
    // While selection is not valid, prompt for correct info
    while (!text.equals(SET_STR) && !text.equals(ENCODE_STR) &&
    !text.equals(EXIT_STR) && !text.equals(DECODE_STR))
    text = getText(input, PROMPT_VALID + PROMPT_CHOICE);
    // convert choice to an integer
    choice = new Integer(text).intValue();
    // respond to the choice selected
    switch(choice)
    case SET:
         // get the cipher value from the user and constrain to
    // -25..0..25
    offset = getInteger(input, PROMPT_CIPHER);
    offset %= ALPHABET_SIZE;
    break;
    case ENCODE:
    // get message to encode from user, and encode it using
    // the current cipher value
    text = getText(input, PROMPT_ENCODE);
    text = encode(text, offset);
    System.out.println("Encoded text is: " + text);
    break;
    case DECODE:
    // get message to decode from user, and decode it using
    // the current cipher value
    text = getText(input, PROMPT_DECODE);
    text = decode(text, offset);
    System.out.println("Decoded text is: " + text);
    break;
    case EXIT:
    // set exit flag to true
    finished = true ;
    break;
    } // end of switch on choice
    } while (!finished); // end of outer do loop
    // Thank user
    System.out.println("Thank you for using Cipher for all your" +
    " code breaking and code making needs.");
    }

    My source in code format...sorry guys :)
       Cipher.java
       This program encodes and decodes text strings using a cipher that
       can be specified by the user.
    import java.io.*;
    public class Cipher
       public static void printID()
          // output program ID
          System.out.println ("*********************");
          System.out.println ("*       Cipher      *");
          System.out.println ("*                   *");
          System.out.println ("*                          *");
          System.out.println ("*                   *");
          System.out.println ("*     CS 181-03     *");
          System.out.println ("*********************");
       public static void printMenu()
          // output menu
          System.out.println("\n\n****************************" +
                               "\n*   1. Set cipher code.    *" +
                               "\n*   2. Encode text.        *" +
                               "\n*   3. Decode coded text.  *" +
                               "\n*   4. Exit the program    *" +
                               "\n****************************");
       public static String getText(BufferedReader input, String prompt)
                                           throws IOException
          // prompt the user and get their response
          System.out.print(prompt);
          return input.readLine();
       public static int getInteger(BufferedReader input, String prompt)
                                           throws IOException
          // prompt and get response from user
          String text = getText(input, prompt);
          // convert it to an integer
          return (new Integer(text).intValue());
       public static String encode(String original, int offset)
          // declare constants
          final int ALPHABET_SIZE = 26;  // used to wrap around A-Z
          String encoded = "";           // base for string to return
          char letter;                   // letter being processed
          // convert message to upper case
          original = original.toUpperCase();
          // process each character of the message
          for (int index = 0; index < original.length(); index++)
             // get the letter and determine whether or not to
             // add the cipher value
             letter = original.charAt(index);
             if (letter >='A' && letter <= 'Z')          
                // is A-Z, so add offset
                // determine whether result will be out of A-Z range
                if ((letter + offset) > 'Z') // need to wrap around to 'A'
                   letter = (char)(letter - ALPHABET_SIZE + offset);
                else
                   if ((letter + offset) < 'A') // need to wrap around to 'Z'
                      letter = (char)(letter + ALPHABET_SIZE + offset);
                   else
                      letter = (char) (letter + offset);
             // build encoded message string
             encoded = encoded + letter;
          return encoded;
       public static String decode(String original, int offset)
          // declare constants
          final int ALPHABET_SIZE = 26;  // used to wrap around A-Z
          String decoded = "";           // base for string to return
          char letter;                   // letter being processed
          // make original message upper case
          original = original.toUpperCase();
          // process each letter of message
          for (int index = 0; index < original.length(); index++)
             // get letter and determine whether to subtract cipher value
             letter = original.charAt(index);
             if (letter >= 'A' && letter <= 'Z')          
                // is A-Z, so subtract cipher value
                // determine whether result will be out of A-Z range
                if ((letter - offset) < 'A')  // wrap around to 'Z'
                   letter = (char)(letter + ALPHABET_SIZE - offset);
                else
                   if ((letter - offset) > 'Z') // wrap around to 'A'
                      letter = (char)(letter - ALPHABET_SIZE - offset);
                   else
                      letter = (char) (letter - offset);
             // build decoded message
             decoded = decoded + letter;
          return decoded;
       // main controls flow throughout the program, presenting a
       // menu of options the user.
       public static void main (String[] args) throws IOException
         // declare constants
          final String PROMPT_CHOICE = "Enter your choice:  ";
          final String PROMPT_VALID = "\nYou must enter a number between 1" +
                                      " and 4 to indicate your selection.\n";
          final String PROMPT_CIPHER = "\nEnter the offset value for a caesar " +
                                       "cipher: ";
          final String PROMPT_ENCODE = "\nEnter the text to encode: ";
          final String PROMPT_DECODE = "\nEnter the text to decode: ";
          final String SET_STR = "1";  // selection of 1 at main menu
          final String ENCODE_STR = "2"; // selection of 2 at main menu
          final String DECODE_STR = "3"; // selection of 3 at main menu
          final String EXIT_STR = "4";  // selection of 4 at main menu
          final int SET = 1;            // menu choice 1
          final int ENCODE = 2;         // menu choice 2
          final int DECODE =3;          // menu choice 4
          final int EXIT = 4;           // menu choice 3
          final int ALPHABET_SIZE = 26; // number of elements in alphabet
          // declare variables
          boolean finished = false; // whether or not to exit program
          String text;              // input string read from keyboard
          int choice;               // menu choice selected
          int offset = 0;           // caesar cipher offset
          // declare and instantiate input objects
          InputStreamReader reader = new InputStreamReader(System.in);
          BufferedReader input = new BufferedReader(reader);
          // Display program identification
          printID();
          // until the user selects the exit option, display the menu
          // and respond to the choice
          do
             // Display menu of options
             printMenu(); 
             // Prompt user for an option and read input
             text = getText(input, PROMPT_CHOICE);
             // While selection is not valid, prompt for correct info
             while (!text.equals(SET_STR) && !text.equals(ENCODE_STR) &&
                     !text.equals(EXIT_STR) && !text.equals(DECODE_STR))       
                text = getText(input, PROMPT_VALID + PROMPT_CHOICE);
             // convert choice to an integer
             choice = new Integer(text).intValue();
             // respond to the choice selected
             switch(choice)
                case SET:
                // get the cipher value from the user and constrain to
                   // -25..0..25
                   offset = getInteger(input, PROMPT_CIPHER);
                   offset %= ALPHABET_SIZE;
                   break;
                case ENCODE:
                   // get message to encode from user, and encode it using
                   // the current cipher value
                   text = getText(input, PROMPT_ENCODE);
                   text = encode(text, offset);
                   System.out.println("Encoded text is: " + text);
                   break;
                case DECODE:
                   // get message to decode from user, and decode it using
                   // the current cipher value
                   text = getText(input, PROMPT_DECODE);
                   text = decode(text, offset);
                   System.out.println("Decoded text is: " + text);
                   break;
                case EXIT:
                   // set exit flag to true
                   finished = true ;
                   break;
             } // end of switch on choice
          } while (!finished); // end of outer do loop
          // Thank user
          System.out.println("Thank you for using Cipher for all your" +
                             " code breaking and code making needs.");
    }

  • Could not find the main class: SearchExcel.  Program will exit.  ????

    sekic0429{uabudd_milou}[w10/rbssw/2.0] pwd
    /tmp/MyJava/jexcelapi
    sekic0429{uabudd_milou}[w10/rbssw/2.0] printenv CLASSPATH
    /tmp/MyJava/excelapi:/app/jdk/1.6.0_16/jre/lib:/app/jdk/1.6.0_16/lib
    sekic0429{uabudd_milou}[w10/rbssw/2.0] ls
    build ExcelSearch.java index.html resources SearchExcel.java~ tutorial.html
    docs ExelSearch.java~ jxl.jar SearchExcel.class src workbook.dtd
    ExcelSearch.class formatworkbook.dtd jxlrwtest.xls SearchExcel.java TestSpecification.xls
    sekic0429{uabudd_milou}[w10/rbssw/2.0] javac -extdirs . ExcelSearch.java
    sekic0429{uabudd_milou}[w10/rbssw/2.0]
    sekic0429{uabudd_milou}[w10/rbssw/2.0] java ExcelSearch
    Exception in thread "main" java.lang.NoClassDefFoundError: ExcelSearch
    Caused by: java.lang.ClassNotFoundException: ExcelSearch
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: ExcelSearch. Program will exit.
    sekic0429{uabudd_milou}[w10/rbssw/2.0] cat ExcelSearch.java
    import java.io.File;
    import java.io.IOException;
    import java.util.Date;
    import jxl.*;
    import jxl.read.biff.BiffException;
    public class ExcelSearch
    public static void main(String[] args)
    try
    Workbook workbook = Workbook.getWorkbook(new File("TestSpecification.xls"));
    catch (IOException e)
    e.printStackTrace();
    catch (BiffException e)
    e.printStackTrace();
    Regards Peter, hope for answer

    r035198x wrote:
    Where is SearchExcel.class?Excellent question, though I think I spotted a problem with the cp supplied.
    Note the documentation for -cp state (in part)
    For example, if directory foo contains a.jar and b.JAR, then the class path element foo/* is expanded to a A.jar:b.JAR, except that the order of jar files is unspecified.So instead of this..
    java -cp /tmp/MyJava/excelapi:/app/jdk/1.6.0_16/jre/lib:/app/jdk/1.6.0_16/lib SearchExcel..try this..
    java -cp /tmp/MyJava/excelapi/*:/app/jdk/1.6.0_16/jre/lib:/app/jdk/1.6.0_16/lib SearchExcelNotes:
    1) Adding the JRE classes to the classpath should not be necessary, but I left the rest of the cp unaltered to highlight the one specific difference I am suggesting.
    2) When posting code, code snippets, HTML/XML or input/output, please use the code tags. The code tags help retain the indentation and formatting of the sample. To use them, select the sample text and click the CODE button.
    If that still fails, tell us more specifically where the SearchExcel class is by copy/pasting the output (within code tags) of the command..
    prompt>jar -tvf mysearchexcel.jarWhere, of course, you replace 'mysearchexcel.jar' with the actual Jar name it is supposed to be located in.
    Edit 1:
    Changed JavaDocs -> documentation.
    Edited by: AndrewThompson64 on Jan 11, 2010 7:12 PM

  • Get a reference of a local class at another program

    Hello experts! Sorry if this has been asked before, but I couldn't find exactly what I'm searching for.
    Within function-pool MIGO (main program of transaction MIGO), there's a local class LCL_MIGO_KERNEL. This class has the private attribute PT_CHANGE_TAKEIT (which is an internal table).
    During the execution of MIGO, for a certain criteria, I would like to clear the contents of PT_CHANGE_TAKEIT. Since it's a private attibute, I have managed to create a new public method that just clears it. This method was defined and inplemented within ENHANCEMENT SPOTS available all over SAPLMIGO. My method is ZZ_CLEAR_PT_CHANGE_TAKEIT. So far so good.
    Now, I have to call this method. I have found no other ENHANCEMENT SPOTS in SAPLMIGO at a place where I would me able to make the call (eg, don't know if the criteria fits yet).
    Inside BADI MB_MIGO_BADI, method LINE_MODIFY, I have just what I need to know if I should clear PT_CHANGE_TAKEIT.
    However, inside here I don't have access to the instance of class LCL_MIGO_KERNEL (the instance itself is (SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL)
    So far I have managed to get a pointer to the instance with:
      FIELD-SYMBOLS: <lfs_kernel> TYPE ANY.
      ASSIGN ('(SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL')
        TO <lfs_kernel>.
    So I have the instance of the class, but how can I call my method ZZ_CLEAR_PT_CHANGE_TAKEIT?
    The command  call method <lfs_kernel>->zz_clear_pt_change_takeit.
    can't be done because ""<LFS_KERNEL>" is not a reference variable" as the sintax check tells me.
    I have tried stuff like
      CREATE DATA dref TYPE REF TO
                 ('\FUNCTION-POOL=MIGO\CLASS=LCL_MIGO_KERNEL').
      ASSIGN dref->* TO <ref>.
    but nothing works so far.
    I know if LCL_MIGO_KERNEL was a class from SE24 (not a local one), I could just create a field-symbol of that type instead of type ANY and it would work.
    Does anyone have an idea how that can be done?
    Thank you very much!

    I have managed to do what I needed by calling my method from other ENHANCEMENT SPOTS within SAPLMIGO and some extra coding on MB_MIGO_BADI, but unfortunately I couldn't do what I originaly wanted which was to call a method of a local class from another program, something that could be handy in other situations.
    If it's not lack of knowledge by myself and it really can't be done, I think the ABAP OO framework fell just short of having that flexibility, since I can get the field-symbol to point to the instance of the class, but just can't call the method because of syntax issues.
    Thanks!
    Well it seems you already solved, but I got curious and knew how this could be done, so I wanted to prove it and here it is:
    * This would be inside the Function group
    CLASS lcl_kernel DEFINITION.
      PUBLIC SECTION.
        METHODS:
          zz_clear_pt_change_takeit.
    ENDCLASS.                    "lcl_kernel DEFINITION
    CLASS lcl_kernel IMPLEMENTATION.
      METHOD zz_clear_pt_change_takeit.
        WRITE 'Dummy! I do nothing!'.
      ENDMETHOD.                    "zz_clear_pt_change_takeit
    ENDCLASS.                    "lcl_kernel IMPLEMENTATION
    START-OF-SELECTION.
    * This is just to create the reference. It corresponds to
    * (SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL in your example
      DATA: kernel  TYPE REF TO lcl_kernel.
      CREATE OBJECT kernel.
    *----------------- Now your program (which supposedly does not have
    *----------------- access to kernel or even lcl_kernel def)
    *----------------- would begin
      FIELD-SYMBOLS: <lfs_kernel> TYPE ANY.
      DATA: generic_ref           TYPE REF TO object.
      ASSIGN ('KERNEL')
        TO <lfs_kernel>.
      generic_ref = <lfs_kernel>.
      TRY.
          CALL METHOD generic_ref->('ZZ_CLEAR_PT_CHANGE_TAKEIT').
        CATCH cx_sy_dyn_call_illegal_method .
      ENDTRY.
    Apart from that, I wouldn't access a local class this way. There's a reason for blocking the access, one of them being that SAP could change local classes without notice thus breaking your program.

  • Classes compile but program doesn't run????

    Hello all.
    I am working on certain program and all the classes compile but when I try to run the app. I don't get anything displayed. I am using BLUEJ as editor and I currently have JDK-1.3.1_06 installed. I am running WIN-2000-PRO.
    I also tried running the program from command line and these are the errors I was getting:
    Exception in thread "main" java.lang.NoClassDefFoundError: snapshop (wrong name: SnapShop)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    It says wrong name, but I am sure that's correct.
    THANKS EVERYBODY FOR THE HELP.

    nope, there is NOTHING WRONG WITH THE INSTALLATION
    when you get "wrong name snapshot (SnapShot)" it means "I (java.exe), have been called with the arguments 'java snapshot', yet I cannot find the 'snapshot' class. However there is a class named 'SnapShot', which I think you may be referring to"
    what command line program are you using? methinks something may be auto-lowercasing what you type before passing it on to the system
    Also on unix style systems is it valid and runnable to have 2 classes where the only difference in the name is casing?

  • OO class and events program

    Hi All,
    I am not an experienced ABAP OO programmer. Here is the requirement.
    I need to develop an ABAP OO program which has to send an SMTP mail for all exceptions. The exceptions need to be handled using event handling functionality inside try catch statements. There are plenty of exceptions which need to be handled using events. I have written a sample template for this purpose. Please help me out to develop this in a better way.
    Pasting the code below.
    CLASS CL_NETAPP_EXCEPTION definition INHERITING FROM CX_AI_APPLICATION_FAULT.
    PUBLIC SECTION.
    CLASS-DATA: MESSAGE_TEXT TYPE STRING,
                MESSAGE_ID TYPE STRING.
    EVENTS smtpnotification.
    EVENTS ALERTNOTIFICATION.
    ENDCLASS.
    START-OF-SELECTION.
    when data is not found, raise exception.
    select producttype from product where prodtype = 'xxxx'.
    if sy-subrc ne 0.
    CL_NETAPP_EXCEPTION=>MESSAGE_TEXT = 'DATA NOT FOUND'.
    CL_NETAPP_EXCEPTION=>MESSAGE_ID   = 'i001'.
    endif.
    *these are some of the other exceptions.
    *CL_NETAPP_EXCEPTION=>MESSAGE_TEXT = 'CRM connection failure'.
    *CL_NETAPP_EXCEPTION=>MESSAGE_ID   = 'i002'.
    *CL_NETAPP_EXCEPTION=>MESSAGE_TEXT = 'INPUT FORMAT INCORRECT'.
    *CL_NETAPP_EXCEPTION=>MESSAGE_ID   = 'i003'.
    CLASS CL_NETAPP_EXCEPTION IMPLEMENTATION.
    *call function 'xxxxx' for inserting or updating data.
    ENDCLASS.
    CLASS CL_NETAPP_EVENTHANDLER DEFINITION.
    PUBLIC SECTION.
    METHODS: SMTPNOTIFICATION,
             ALERTHANDLERNOTIFICATION.
    EVENTS:  SMTPNOTIFICATIONEVE.
    EVENTS:  ALERTHANDLERNOTIFICATIONEVE.
    ENDCLASS.
    CLASS CL_NETAPP_EVENTHANDLER IMPLEMENTATION.
    METHOD SMTPNOTIFICATION.
    TRY.
    IF CL_NETAPP_EXCEPTION=>MESSAGE_ID ne space.
    *send mail notification when there is an exception.
    CALL FUNCTION 'SMTP_DISPATCH_REQUEST'.
    ENDIF.
    RAISE EVENT SMTPNOTIFICATIONEVE.
    ENDTRY.
    ENDMETHOD.
    ENDCLASS.
    Thanks
    Deno

    Hello Deno
    I am very confused about your coding and your actual requirement. I assume that your report has to verify data records. If verification fails the report should send in most (all?) cases a SMTP mail.
    If this scenario is close to your requirements then a possible solution could look like this:
    * Assumption: you have an itab containing the data to be verified
      LOOP at gt_itab INTO gs_record.
    * You have created a class (e.g. ZCL_MYCLASS) that does all the verifications for a single record.
    * In addition, you have created an exception class (e.g. ZCX_MYCLASS) that has all exceptions defined.
    * All methods of ZCL_MYCLASS including the constructor method use the exception class in their interfaces.
      TRY.
        CLEAR: go_error.  " error object of type zcx_myclass
        CREATE OBJECT go_myclass
          EXPORTING
            is_data = gs_record.
        go_myclass->verify_data( ). " method contains all other verification methods
      CATCH zcx_myclass INTO go_error.
    *   Send SMTP mail: go_error->get_text( ) contains error message   
      ENDTRY.
      ENDLOOP.
    Regards
      Uwe

  • I need a tutor in order to pass my class in Java Programming!

    I'm having a lot of trouble keeping up in my online course. Because there is no class room, I find it difficult to ask questions. The time lap between question and answer makes it extra difficult to concentrate and stay focused on the problem. I would really like someone to be my tutor. Corresponde via email so that I can get help quicker and stay on track.
    I'm suppose to write an array in order to keep inventory. I have no idea where to even start. Here is the assignment, if you can help me and point me in the right direction, or show an example of codes I can use, it would be greatly appreciated.
    1) Create a product class that holds the item number, the name of the product, the number of unites in stock, and the price of each unit.
    Item # 1, Red Hanging Candle Holder, 24, $12.00
    Item # 2, Blue Hanging Candle Holder, 24, $12.00
    Item # 3, Green Hanging Candle Holder, 24, $12.00
    Item # 4, Yellow Hanging Candle Holder, 24, $12.00
    2) Create a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit).

    God bless, Darryl. My time is more valuable to me.
    Maybe this arrangement works because you need the
    instruction as much as the OP does. The only
    question is: who will provide it? If neither person
    knows more than a month's worth of Java, how is new
    information brought in?
    Thanks duffymo for your blessing. As programming is just a hobby for me -- since 1983 -- I agree that my time is (much much) less valuable than yours. And yes, I expect the learning process to be mutually beneficial. And while I don't plan to make my living off java, I believe in doing things correctly or not at all. My one month experience in Java is backed up by programming in more languages than most professionals use in a lifetime, on platforms starting from pre-DOS systems with CTDs and a single-line display through DOS, xenix, PDP-11, MicroVAX and every version of Windows from 95 onwards.
    In any case, don't you think it would help if the simplest of questions were kept off these forums and solved in mutual self-help groups? some of whose members had nore time than others to spend on Googling and searching the forums? The first benefit would be to those who have progressed beyond the obvious, as you seniors would have more time to answer their pleas for help instead of getting bogged down in badly or unformatted code with all the trappings of cut-n-paste, meaningless comments that seem to be intended more for the teachers than the learners -- I could go on and on.
    I apologise for what I'm about to do; I do really agree with the general feeling on the forums that OPs benefit much more from being guided towards their goal than from being spoonfed a code that works. But I would really appreciate your critique of this code, which is my first console application. It took about half an hour, including Googling. I am aware that there are absolutely no comments, and the output columns don't line up, due to my as yet inadequate knowledge of output formatting. Anything else you can point out would help me in my learning process.
    Thanks for your time, Darryl
    File Inventory.javapublic class Inventory
        public static void main (String args [])
            int[] itemNumbers   = { 1,
                                    2,
                                    3,
                                    4
            String[] itemNames  = { "Red Hanging Candle Holder",
                                    "Blue Hanging Candle Holder",
                                    "Green Hanging Candle Holder",
                                    "Yellow Hanging Candle Holder"
            int[] unitsInStocks = { 24,
                                    24,
                                    24,
                                    24
            double[] unitPrices = { 12.0,
                                    12.0,
                                    12.0,
                                    12.0
            Product[] products = new Product[4];
            for ( int i = 0; i < products.length; i++)
                products[i] = new Product(itemNumbers,
    itemNames[i],
    unitsInStocks[i],
    unitPrices[i]);
    double productValue = 0.0;
    double totalValue = 0.0;
    System.out.println("Item #\t" +
    "Name\t" +
    "Units in stock\t" +
    "Unit price\t" +
    "Total Cost");
    for ( int i = 0; i < products.length; i++)
    productValue = products[i].get_productValue();
    totalValue = totalValue + productValue;
    System.out.println(products[i].get_productDetails() + "\t" +
    Double.toString(productValue));
    System.out.println("");
    System.out.println("\t" +
    "\t" +
    "\t" +
    "Grand Total\t" +
    Double.toString(totalValue));
    File Product.javapublic class Product {
        private int itemNumber;
        private String itemName;
        private int unitsInStock;
        private double unitPrice;
        private Product()
        public Product(int    itemNumberIn,
                       String itemNameIn,
                       int    unitsInStockIn,
                       double unitPriceIn)
            itemNumber   = itemNumberIn;
            itemName     = itemNameIn;
            unitsInStock = unitsInStockIn;
            unitPrice    = unitPriceIn;
        public double get_productValue()
            double unitValue = (double) unitsInStock * unitPrice;
            return unitValue;
        public String get_productDetails()
            String productDetails = Integer.toString(itemNumber) + "\t" +
                                    itemName + "\t" +
                                    Integer.toString(unitsInStock) + "\t" +
                                    Double.toString(unitPrice);
            return productDetails;
    }The forum software seems to have reduced my indentation by 1 space in many lines, they line up correctly in Notepad.
    Message was edited by:
    Darryl.Burke

  • Class in abap program

    Hello experts!
        I have created a class and now I want to inplement in my program how should I do this.

    please refer the below example..
          CLASS c3 DEFINITION
    CLASS c3 DEFINITION.
      PUBLIC SECTION.
        DATA: var1 TYPE matnr VALUE 'LAPTOP'.
        METHODS: m1 IMPORTING imp TYPE i
                    RETURNING value(ret1) TYPE i.
      PRIVATE SECTION.
        DATA: var2 TYPE i VALUE 134.
    ENDCLASS.                    "c3 DEFINITION
          CLASS c3 IMPLEMENTATION
    CLASS c3 IMPLEMENTATION.
      METHOD m1.
        WRITE:/'Initial values the M1 method'.
        WRITE: / 'IMP:',imp.
        WRITE:/ 'RETURN:',ret1.
        WRITE:/'Values after manipulation in the M1 method'.
        ret1 = imp + 100.
        WRITE:/ 'RETURN:',ret1.
        WRITE:/ 'Private var2:',var2.
      ENDMETHOD.                    "m1
    ENDCLASS.                    "c3 IMPLEMENTATION
          START-OF-SELECTION
    START-OF-SELECTION.
      DATA: cvar TYPE i VALUE 99,
            evar TYPE i,
            evar1 TYPE i.
      DATA:obj1 TYPE REF TO c3.
      CREATE OBJECT obj1.
    *Accessing the class attributes
      WRITE:/ '(var1)MATERIAL:',obj1->var1.
      CALL METHOD obj1->m1
        EXPORTING
          imp  = 20
        RECEIVING
          ret1 = evar.
      WRITE:/'Values after the call method M1'.
      WRITE:/'RETURN:',evar.

  • How can I import a class in my program?

    In my program I want to use a class named "WordExtractor" that resides in a jar file named "poi-3.0.1-FINAL-20070705.jar".
    This jar file is stored on my computer under:
    D:\java_projects\Word Reader\poi-bin-3.0.1-FINAL-20070705\poi-3.0.1-FINAL\poi-3.0.1-FINAL-20070705.jar
    How can I import this class WordExtractor into my program?
    import ????????? ;

    In my program I want to use a class named
    "WordExtractor" that resides in a jar file named
    "poi-3.0.1-FINAL-20070705.jar".
    This jar file is stored on my computer under:
    D:\java_projects\Word
    Reader\poi-bin-3.0.1-FINAL-20070705\poi-3.0.1-FINAL\po
    i-3.0.1-FINAL-20070705.jar
    How can I import this class WordExtractor into my
    program?
    import ????????? ;After you add this jar file to the lib , you can use a tools(rar extracter tools) to extract "poi-3.0.1-FINAL-20070705.jar" file and find the position of that class "WordExtractor" .
    write "import XXXX.WordExtractor"into your program,"XXXX" is the position that you have found.

  • Passing Text From Class to Main Program

    I am trying to write three separate strings from the class
    file into three separate TEXT boxes within the main program. It
    works using three separate functions. Is there a way to change the
    code so it all can happen from within but one and the same function
    in the class file.
    package Edit
    public class Texter
    public var i:int;
    public static var result:String;
    public function Greeter()
    public function sayHello():String
    result = "This is the first idea I have. ";
    return result;
    public function sayGoodbye():String
    result = "Here is the second idea, like. ";
    return result;
    public function sayHi):String
    result = "Here is the third city disco. ";
    return result;
    Thanks,
    BudHud

    You can use a parametrized function which will display the
    information according to your given data
    like
    public function saySomething(data:String):String
    return data;
    }

  • .class error in program

    I keep getting an error on the lines with factorial(term). Not sure if I am writing that part correctly. I am trying to write an expression representing sin and cosine using a while loop for sin and do-while for cos. I have my results set up to print in another class. Any advice would be great.
    public class NewMath
    * computeSin uses the power series to compute the sin of x;
    * @return sin(x)
    * @param x is the angle in radians
    public static double computeSin(double x)
    double result = x;
    // WHILE LOOP
    int term= 3;
    int sign= 1;
    double numerator = Math.pow(x , term);
    double denominator = factorial(int term);
    while((numerator < Double.POSITIVE_INFINITY) && (denominator < Double.POSITIVE_INFINITY)){
    result = result + Math.pow(x,term) / ( factorial(term)) * sign;
    term = term + 2;
    sign = -1 * sign;
    return result;
    * computeCos uses the power series to compute the cos of x;
    * @return cos(x)
    * @param x is the angle in radians
    public static double computeCos(double x)
    double result = 1;
    //DO-WHILE loop
    int term= 2;
    int sign= 1;
    double numerator = Math.pow(x , term);
    double denominator = factorial(int term);
    do{result= result + Math.pow(x, term) / (factorial(term) * sign);
                      term= term + 2;
                      sign = -1 * sign;  
    while((numerator < Double.POSITIVE_INFINITY) && (denominator < Double.POSITIVE_INFINITY));
    return result;
    private double factorial(int x) {
    if (x <= 1) return 1.0;
    else return x * factorial(x - 1);
    }

    Advice:
    When you post code, format it. After pasting the code, select it, and click the code button above the entry area. Then use the preview buttom to see that it's what you want.
    When you have a problem, reduce the code to a small test case that exhibits the problem, and paste the exact error text(s) that occur with the posted code. Accompany that with a clearly written description of the problem, and the expected results.
    It's not our job to find and define the problem, you need to do that prior to posting. We can't know what your environment is, so compiling your code may or may not produce the results you get.
    Good programming to you.

  • Any Function Module/Class to get Program's Package Name??

    Hi Guys,
    Are there any Function Modules/Classes that return the Package name of any given Program?
    I have had a look but have been unable to find any...
    thanks,
    C
    PS POINTS WILL BE REWARDED

    Hi,
    1)u can get Package name from SE93
    go to SE93>give transaction code>display
    2)you can also get from
    go to t-code>system>status>d.click on program name>goto-->attributes
    Thanks
    Ankur Sharma

  • Non-servlet class in servlet program

    hi,
    I declare a non-servlet class which is defined by myself in a servlet class. I passed the complie but got an runtime error said NoClassDefFoundError. Does anyone can help me? Thanks.
    The following is my code.
    //get the search string from web form
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.*;
    import java.util.*;
    public class SearchEngines extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {   
    String searchString = (String) request.getParameter("searchString");
         String searchType = (String) request.getParameter("searchType");
         Date date = new java.util.Date();
         response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    Vector doc_retrieved = new Vector();
    BooleanSearch bs = new BooleanSearch();
    doc_retrieved=bs.beginSearch(searchString, searchType);
    out.println("<HTML><HEAD><TITLE>Hello Client!</TITLE>" +
                   "</HEAD><BODY>Hello Client! " + doc_retrieved.size() + " documents have been found.</BODY></HTML>");
    out.close();
    response.sendError(response.SC_NOT_FOUND,
    "No recognized search engine specified.");
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    doGet(request, response);
    // a search engine implements the boolean search
    import java.io.*;
    import java.util.*;
    import au.com.pharos.gdbm.GdbmFile;
    import au.com.pharos.gdbm.GdbmException;
    import au.com.pharos.packing.StringPacking;
    import IRUtilities.Porter;
    public class BooleanSearch{
         BooleanSearch(){;}
         public Vector beginSearch(String searchString, String searchType){
              Vector query_vector = queryVector(searchString);
              Vector doc_retrieved = new Vector();
              if (searchType.equals("AND"))
                   doc_retrieved = andSearch(query_vector);
              else
                   doc_retrieved = orSearch(query_vector);
              return doc_retrieved;
         private Vector queryVector(String query){
         Vector query_vector = new Vector();
              try{
                   GdbmFile dbTerm = new GdbmFile("Term.gdbm", GdbmFile.READER);
              dbTerm.setKeyPacking(new StringPacking());
              dbTerm.setValuePacking(new StringPacking());
              query = query.toLowerCase();
              StringTokenizer st = new StringTokenizer(query);
              String word = "";
              String term_id = "";
              while (st.hasMoreTokens()){
                   word = st.nextToken();
                   if (!search(word)){
                        word = Stemming(word);
                        if (dbTerm.exists(word)){
                   //          System.out.println(word);
                             term_id = (String) dbTerm.fetch(word);
                             query_vector.add(term_id);
              catch(GdbmException e){
                   System.out.println(e.getMessage());
              return query_vector;
         private Vector orSearch(Vector query_vector){
              Vector doc_retrieved = new Vector();
              try{
                   GdbmFile dbVector = new GdbmFile("Vector.gdbm", GdbmFile.READER);
                   dbVector.setKeyPacking(new StringPacking());
                   dbVector.setValuePacking(new StringPacking());
                   int doc_num = dbVector.size();
                   String doc_id = "";
                   String temp = "";
                   for (int i = 1; i <= doc_num; i++){
                        boolean found = false;
                        doc_id = String.valueOf(i);
                        temp = (String) dbVector.fetch(doc_id);
                        StringTokenizer st = new StringTokenizer(temp);
                        while (st.hasMoreTokens() && !found){
                             temp = st.nextToken();
                             StringTokenizer st1 = new StringTokenizer(temp, ",");
                             String term = st1.nextToken();
                             if (query_vector.contains(term)){
                                  doc_retrieved.add(doc_id);
                                  found = true;
              catch(GdbmException e){
                   System.out.println(e.getMessage());
              return doc_retrieved;
         private Vector andSearch(Vector query_vector){
              Vector doc_retrieved = new Vector();
              try{
                   GdbmFile dbVector = new GdbmFile("Vector.gdbm", GdbmFile.READER);
                   dbVector.setKeyPacking(new StringPacking());
                   dbVector.setValuePacking(new StringPacking());
                   int doc_num = dbVector.size();
                   String doc_id = "";
                   String temp = "";
                   for (int i = 1; i <= doc_num; i++){
                        Vector doc_vector = new Vector();
                        boolean found = true;
                        doc_id = String.valueOf(i);
                        temp = (String) dbVector.fetch(doc_id);
                        StringTokenizer st = new StringTokenizer(temp);
                        while (st.hasMoreTokens()){
                             temp = st.nextToken();
                             StringTokenizer st1 = new StringTokenizer(temp, ",");
                             String term = st1.nextToken();
                             doc_vector.add(term);
                        for (int j = 0; j < query_vector.size(); j++){
                             temp = (String) query_vector.get(j);
                             if (doc_vector.contains(temp))
                                  found = found & true;
                             else
                                  found = false;
                        if (found)
                             doc_retrieved.add(doc_id);
              catch(GdbmException e){
                   System.out.println(e.getMessage());
              return doc_retrieved;
         private String Stemming(String str){
              Porter st = new Porter ();
              str = st.stripAffixes(str);
              return str;          
         private boolean search(String str){
              //stop word list
              String [] stoplist ={"a","about","above","according","across","actually","adj","after","afterwards","again",
                                       "against","all","almost","alone","along","already","also","although","always","am","among",
                                       "amongst","an","and","another","any","anyhow","anyone","anything","anywhere","are",
                                       "aren't","around","as","at","away","be","became","because","become","becomes","becoming",
                                       "been","before","beforehand","begin","beginning","behind","being","below","beside",
                                       "besides","between","beyond","billion","both","but","by","can","cannot","can't",
                                       "caption","co","co.","could","couldn't","did","didn't","do","does","doesn't","don't",
                                       "down","during","each","eg","eight","eighty","either","else","elsewhere","end","ending",
                                       "enough","etc","even","ever","every","everyone","everything","everywhere","except",
                                       "few","fifty","first","five","for","former","formerly","forty","found","four","from",
                                       "further","had","has","hasn't","have","haven't","he","he'd","he'll","hence","her","here",
                                       "hereafter","hereby","herein","here's","hereupon","hers","he's","him","himself","his",
                                       "how","however","hundred","i'd","ie","if","i'll","i'm","in","inc.","indeed","instead",
                                       "into","is","isn't","it","its","it's","itself","i've","last","later","latter","latterly",
                                       "least","less","let","let's","like","likely","ltd","made","make","makes","many","maybe",
                                       "me","meantime","meanwhile","might","million","miss","more","moreover","most","mostly",
                                       "mr","mrs","much","must","my","myself","namely","neither","never","nevertheless","next",
                                       "nine","ninety","no","nobody","none","nonetheless","noone","nor","not","nothing","now",
                                       "nowhere","of","off","often","on","once","one","one's","only","onto","or","other","others",
                                       "otherwise","our","ours","ourselves","out","over","overall","own","per","perhaps","pm",
                                       "rather","recent","recently","same","seem","seemed","seeming","seems","seven","seventy",
                                       "several","she","she'd","she'll","she's","should","shouldn't","since","six","sixty",
                                       "so","some","somehow","someone","sometime","sometimes","somewhere","still","stop",
                                       "such","taking","ten","than","that","that'll","that's","that've","the","their","them",
                                       "themselves","then","thence","there","thereafter","thereby","there'd","therefore",
                                       "therein","there'll","there're","there's","thereupon","there've","these","they","they'd",
                                       "they'll","they're","they've","thirty","this","those","though","thousand","three","through",
                                       "throughout","thru","thus","to","together","too","toward","towards","trillion","twenty",
                                       "two","under","unless","unlike","unlikely","until","up","upon","us","used","using",
                                       "very","via","was","wasn't","we","we'd","well","we'll","were","we're","weren't","we've",
                                       "what","whatever","what'll","what's","what've","when","whence","whenever","where",
                                       "whereafter","whereas","whereby","wherein","where's","whereupon","wherever","whether",
                                       "which","while","whither","who","who'd","whoever","whole","who'll","whom","whomever",
                                       "who's","whose","why","will","with","within","without","won't","would","wouldn't",
                                       "yes","yet","you","you'd","you'll","your","you're","yours","yourself","you've"};
              int i = 0;
              int j = stoplist.length;
              int mid = 0;
              boolean found = false;
              while (i < j && !found){
                   mid = (i + j)/2;
                   if (str.compareTo(stoplist[mid]) == 0)
                        found = true;
                   else
                        if (str.compareTo(stoplist[mid]) < 0)
                             j = mid;
                        else
                             i = mid + 1;
              return found;
         }

    please show us the full error message.
    it sounds like a classpath problem...

  • How to call Global Abstract Class in Report Program

    Hi All,
    Can Anyone tell me how call  global abstract class created in SE24.
    Thanks,
    Revanth

    Hi Revanth,
    What are you trying to do in abstract class?
    Are you inherit and trying to create object?
    Regards,
    A Vadamalai.

  • The travails of method getAnnotation in class Declaration (apt programming)

    well the problem is at least documented:
    you are in trouble if you want to read a value of an annotation which happens to be a class !
    I can vaguely understand the reason....
    but now what do I do if I need to get such a value?
    different hacks spring to my mind:
    - get the name of the Class value as a String and perform a Class.forName
    - build a Map <TypeMirror, Class> and try to get the TypeMirror trough inspection of results of getAnnotationMirrors() ...
    which hack is the least ugly?
    or may be other more elegant options?
    urgent thanks!

    Why?
    In apt, you are using the mirror API which is similar to but also quite different from reflection.
    Some say that a mirror is where you look for a reflection, which sounds pretty neat, but doesn't really help the likes of you understand things.
    For a number of reasons, the mirror API is just modelling source and class files, and NOT modelling the classes loaded into the JVM that is running the apt tool.
    One reason, is that the class file might not yet exist because APT hasn't actually compiled it yet.
    But understanding why you can't do something how you'd expect to is all very consoling and such, but still doesn't help. You want some code, right?
    How
    What I generally do is call that nice convenient method that returns actual values, but throws an exception when the value is a class, then look in the exception for the Declaration, then check its name.
    Here's a block of code (from rapt project on java.net) that does what (I suspect) you want.    protected ClassDeclaration getValue(Declaration d) {
            RenamableImplementation at =
                d.getAnnotation(RenamableImplementation.class);
            try {
                at.value();
            } catch (MirroredTypeException mte) {
                TypeMirror v = mte.getTypeMirror();
                if(! (v instanceof ClassType) ) {
                    error(d,
                        "@RenamableImplementation(%s.class), %s is not a class",
                        v,v);
                    return null;
                return ((ClassType)v).getDeclaration();
            return null;
        }error is just a varargs convenience wrapper for the Messager.printError() method.    void error(Declaration where, String format, Object... args) {
            env.getMessager().printError(where.getPosition(),
                String.format(format,args)
    Rant
    That exception thing is a bit of a kludge, but its quite a nice kludge that maintains the distinction between the mirror API and the reflection API. In a way, it would have been better if the JSR-175 (annotations) expert group had defined class annotation elements to have a type of java.lang.reflect.Type.
    The annotation method would have returned Class<?> at runtime, but APT's DeclaredType could have also implemented the java.lang.reflect.Type interface and the annotation could have returned a DeclaredType. Everything would have worked nicely I suspect, but nobody foresaw the problems and now we are stuck with annotations defined with a runtime Class rather than an interface. Actually maybe they foresaw other problems with doing it this way.
    Everyone is at fault, because everyone could have looked at the 175 spec at the review stages and done something about it. Nobody did.

Maybe you are looking for

  • GR with Excise Capuring and Posting ( Movements 103 and 105 )

    Hi We have the requirement like . 1. we have the Business requirement like GR 103 and 105 movements types . our requirement: while doing GR with Movement type 103 will capture the Excise . While releasing Blocked stock to unrestricted will post the e

  • File not found exception with SES crawler

    Hi, I have integrated oracle SES with UCM 11g. when i shedule the crawler i am getting this exception. ***Crawler raised the following error for data source "VzUCM" at time Mar 14, 2012 12:35:28*** EQG-30236: Crawler plug-in fatal error: java.io.File

  • Problem: i cant see my movies. help

    I have the 30 gb ipod video and its not letting me see movies. i have purchased 3 movies from itunes and i can only see 2 of them, and ive donwloaded 2 other movies (digital copys) and i cant see them! It tells me that there "loaing" but goes back to

  • ALE/Idoc clarification

    hi friends, 1.in ALE/IDOC wat are the methods and when do we use that methods like1. standalone  2. mesage cntrol  3.function module 2.when we extend basic idoc [add few fields ] how to trigger that segment if u have any learning material withexample

  • Where is the folder containing installation package to bonjour.msi located

    having issues downloading itunes v10.5.1. on Windows XP. Error message The feature you are trying to use is on a network resource that is unavailable. Enter an alternative path to a folder containing the installation package Bonjour.msi. Where do I f