Formatting source codes

I don't if i post it in the correct forum.
I am trying to find a way to break up a sources code so that it can be interpreted in the form of methods,fields,constructors so that i can exact out the information, like how Netbeans extract the information.
Any one can help ?

This could mean one of two things:
1) Format source so that it is easy to parse as you described.
That is easy. Just prepend comments like /*CONSTRUCTOR*/ and have your parser look for those.
2) Parse ANY source file.
Well.. obviously the compiler knows the difference, which should make it obvious that you can devise a set of rules that does so (like, if the method name is the same as the class name, it is counted as a constructor... if it is prepended with a primitive type or class name it is obviously a variable and not a method, etc.). But that is going to be a world class pain in the neck.
This is assuming that you want to break up the actual source using a parser. If you are happy just getting the method signatures and so forth you can use reflection.
Why in the world would you need to do this?
Drake

Similar Messages

  • How to format programming source-code in a Framemaker document?

    I have to write up a technical document in Framemaker that explains various programming source-code.
    So my document consists of a bunch of text, followed by a bunch of source code (Java, XML) and then followed by more text, etc.
    What I'm confused about is how to format source code as part of my document. Has anyone done this for a technical document and come across any instructions or tips? So far my Googling hasn't produced anything relevant to what I need to do.

    If you haven't created a paragraph format that uses a fixed-width font, such as Courier or a console font, you need to do that.
    If you want to preserve line breaks in the code, and if it has fairly long lines, you're likely to need to specify a font size of 7 pt. or so. For really long lines, you may need to go to a landscape page format or incorporate a way of telling your readers that the lines wrap.
    Those are the basics. If you want to get fancier, I usually set up a table so I can apply a contrasting background tone, and format each line of code as a cell (it's a one-column table). You can also add a second column to hold line numbers, if you want.
    Art

  • Source code jumps around when re-opening page?

    Is the following a common problem with Dreamwver CS4 Source Code view?
    In an effort to make the code read nice and neat, like everyone else I try to indent and nest my code. For example:
    <div>
              <ul>
                        <li>one</li>
                        <li>one</li>
                        <li>one</li>
              </ul>
    </div>
    But, upon saving a file and then later reopening it, I notice that in places the file does not keep my intended spaced nested layout i.e. the code jumps around on a line and I lose my neat indent spacing. For example:
    <div>
              <ul>
          <li>one</li>
                        <li>one</li>
                        <li>one</li>
                 </ul>
    </div>
    I have tried to set my preferences > code format > tab size to 10 to produce a larger indent which has improved the problem a little but not fixed it.
    Others must have experienced this frustrating problem.
    Is there anything I can do to fix it, like set further preferences to give me complete control over the page?
    Thanks in advance.

    Oh can it? I will look into this thanks Ken.
    With regards the CSS, I found out about it on Lynda.com training videos.
    - Dreamweaver CS4 with CSS Essential Training > Chapter 13: Testing and Deploying CSS > Formatting code for deployment
    The process is as follows:
    On Dreamweaver CS4 click Edit > Preferences > Code Format > CSS (button)
    On the CSS Source Format Options screen, de-select the "Each property on a seperate line" check box and click "OK" and then "OK".
    Then on your CSS page, in the left side panel, click "Format Source Code" and the "Apply Source Formatting" selection.
    The code will then condense for deployment.
    You can reverse the process just as easily going backwards.
    If anyone else has any ideas on code jumping around on a line please do let me know. Thanks.

  • Hi, I want to format my code php (beautiful), Please help me

    Hi, i am using DW CS6,
    I want to format (beautiful) my code php but i don't find it.
    Netbeans, sublime text, PhpStorm... can format code very good, i don't think DW can't.
    Do you know? Please help me.

    There is an option in the Commands menu,
    Click the Format Source Code icon at the bottom of the Coding toolbar (Edit > Toolbars > Coding) and select Code Format Settings to set your preferred formatting.
    You can also access the formatting option from Commands > Apply Source Formatting or only apply it to a select block of code by selecting the Apply Source Formatting to Selection option.
    However, do not expect the level of "beautiful code formatting" like in NetBeans, Sublime Text, etc. DW does a decent enough job, albeit with rough edges.

  • How can I print source code with connecting lines on control structures?

    Anyone know of any programs that will format source code printouts and print connecting lines from the start to the end of control structures (such as: if--"end if", while-"end while" etc.)?

    Indentations and comments do help read source code. However, when you have a large program with many levels of nesting of control structures the readability of the code (even with indentations) becomes very difficult.

  • SQL Developer 3 EA2 - Problem with formating plsql source code

    I'm using sql developer 3 ea2. I have played with source code formating.
    I have 2 issues with formating in source code editor.
    I have a plsql string like the following extending over several lines.
    s VARCHAR2(2000) := 'SELECT
    col1, col2, col3
    FROM table
    WHERE col4 = :var';The result after apply "format" to my sourcecode ist:
    s VARCHAR2(2000) := 'SELECT
    col1, col2, col3
    FROM table
    WHERE col4 = :var';The second is that sql developer ist camelizing the previous line if I type a whitespace in plsql sourcecode.
    How to switch that off??
    The last issue is realy annoying!
    Christian

    I am having exactly the same problem. Every time you use Format Ctrl/F7 it adds new line feeds. Code starts off as:
    command := '
    select account_status, default_tablespace, temporary_tablespace,
    to_char(created,"YYYY-MON-DD HH24:MI:SS"), profile
    from Dba_Users@@
    where username=:1' ;
    First Format Ctrl/F7 get an extra blank line:
    command := '
    select account_status, default_tablespace, temporary_tablespace,
    to_char(created,"YYYY-MON-DD HH24:MI:SS"), profile
    from Dba_Users@@
    where username=:1' ;
    Then second Format Ctrl/F7, get THREE extra lines!!! It goes exponential!!
    command := '
    select account_status, default_tablespace, temporary_tablespace,
    to_char(created,"YYYY-MON-DD HH24:MI:SS"), profile
    from Dba_Users@@
    where username=:1' ;
    So far I've only really encountered the problem with dynamic SQL, which ignores the extra line feeds.
    i am pretty sure this is a long standing SqlDeveloper Format problem, going back to V2.

  • Format java source code

    Could anyone tell me where can I find tools that could format the java and jsp source code, just like the indent program under unix(but it is for c/c++).
    Thanks in advance.

    I use jEdit, an open source editor written in Java, and there are at least two plugins for formatting code written for it... and they both are pretty good.

  • Can Labview output source code in text format?

    I am trying to file a patent that includes some Labview code. The patent office recommends attaching code (either source code or machine code) to show reduction to practice.
    However, it appears that the USPTO only accepts CD-Rs that have ASCII text on them. Is there a way to export Labview source code or machine code (from application builder?) to text?
    Does anyone have any advice for dealing with the PTO when Labview code is involved?
    Thanks,
    Casey

    > I am trying to file a patent that includes some Labview code. The
    > patent office recommends attaching code (either source code or machine
    > code) to show reduction to practice.
    >
    > However, it appears that the USPTO only accepts CD-Rs that have ASCII
    > text on them. Is there a way to export Labview source code or machine
    > code (from application builder?) to text?
    >
    > Does anyone have any advice for dealing with the PTO when Labview code
    > is involved?
    >
    I believe this has been done before. I did a quick search on
    www.uspto.gov, and found lots of them referencing LabVIEW -- meaning
    that LabVIEW was mentioned in the patent, and probably that LV code was
    the mentioned embodiment of the patent. I didn't browse all of them to
    see if or how they i
    ncluded source, but surely you can find a precedent
    for including a pdf or rtf with your diagrams.
    If you can't find anything else, print your VIs to RTF and see about
    submitting that.
    Greg McKaskle

  • Wanted: Sample source code for voice recorder

    I've been google searching for some sample source code to implement a voice recorder on my AudioVox 5600. I would like to learn how to read from the microphone and write to my SD card in a standard file format like wav, wma or mp3.
    Can anyone help me understand how to do this?
    Thanks,
    Siegfried

    Basic would be ;
    RESULT_FIELDS -xxx = <SOURCE_FIELDS> -xxx
    you have the source fields as source, and result fields for as the target. In between you can check some conditions as in other routines of transformation.
    BEGIN OF tys_SC_1, shows your source fields ( in your case DSO chars and key figures)
    BEGIN OF tys_TG_1, , shows your result fields ( in your case Cube characteristics)
    Hope this helps
    Derya

  • LLVM Version / Alchemy Source Code

    Hi,
    I wanted to get a better understanding of flash and decided to learn how the avm2 and alchemy works.  I would like to do some fun stuff with LLVM, including generating .swfs from other languages than c/c++. By trying so I noticed that Alchemy is based on LLVM 2.1 which is kinda old (released Sep 2007). Is there a way to use or port it to a newer LLVM version? It would make my experiment a lot easier and taking advantage of over three years development on LLVM would be great .
    As far as I understand alchemy adds a new backend to LLVM arch=avm2 to generate avm actionscript code from LLVM IL code. Am I correct that this addition is not open source? Would be too bad, as I hoped to get an better understanding of the avm2 by looking into it. Also that would make it possible for us users of alchemy to port it ourself.
    Thank you for any hints,
    Florian

    I think it's possible and I've been trying to do that for the last couple of days. I believe I've found out how the process works for compiling to iphone, using something similar to the alchemy toolchain. What I'd like to do is create an actioncript compiler with alchemy, so it basically is flash - flash, but taking advantage of all the optimizations that LLVM makes on bytecode, once you can understand it. I believe that adobe uses the following process:
    compile .as to ABC.
    Pass ABC into the GlobalOptimizer that exists inside the actionscript compiler (ASC.jar).
    It appears that GlobalOptimizer produces SSA IR code. I believe adobe slightly modifies this to be LLVM IR, and then they can just run llvm-as on the generated LLVM IR code.
    I'm working on getting this functioning right now, because if I can get these stages done, then the existing alchemy toolchain should do the rest of the job (that is, taking that llvm bytecode and outputting actionscript bytecode using the existing back end). This would also explain why Adobe hasn't updated alchemy to work with a new version of LLVM, because the LLVM IR spec changes from release to release, so they'd have to keep changing the process of formatting their GlobalOptimizer output to be LLVM IR, which is probably more work than they want to invest right now.
    In this list of processes, I'm on the last one. I'm currently figuring out how to convert the output from GlobalOptimizer to be valid LLVM IR but honestly, this is ALL new territory for me I need to find the specs on these things and do some reading. I had to customize the source code of the actionscript compiler to get this to work at all this far. The very fact that I had to do this also points to the fact that I'm on the right track, since posts I've seen from Adobe employees + documentation state that the actionscript compiler included in the alchemy toolkit is custom. Plus, this paper confirms many of these conclusions:
    http://llvm.org/devmtg/2009-10/Petersen_OptimizingActionScriptBytecode.pdf
    I think you might be the only person interested in this stuff so for the sake of not clogging up the forums with our discussions feel free to contact me directly if you'd like more info.

  • How to get the source code in PAR file

    Hi All,
    I used the PAR migration tool to migrate from PAR to EAR file. When I imported the EAR into NWDS 7.3, I was just able to see the structure and jsp files and could not find the java source code files. I would requires the java source code to make modifications so that deprecated APIs can be replaced and to also make the code compatible with JDK 1.6.
    I think the original 7.0 PAR file itself does not contain the source code. I decided to use the "Include source code" option when exporting the 7.0 PAR.
    I have the portal application DC project in my NWDS 7.0. However, when I try to export the PAR file using Export --> PAR File -- > Next... I am unable to select any project from the list. The list appears blank with disabled Next & Finish buttons.
    I also noticed that in the portal DC application structure, there is a .sda file under /gen/default/deploy. Also there is no PAR folder under /gen/default/public.
    How do I include the source in the PAR file so that I can edit the same after migrating to EAR format ?
    Regards,
    Melwyn

    DC and PAR/EAR stuff are different formats, SC/DC is an archive type used by NWDI, if I got it right.
    How do I go about generating the PAR file (with source) ?
    In fact through including the seources while creating the PAR/EAR in NWDS, but: no need to do that, you can also depack SDA (rename it to zip). If you wanna just see the Java sources you will find them there, otherwise decompile as Vijay already sad.
    cheers

  • How to read the Java source code (in Netbeans)

    I use OS X10.5.5, NetBeans 6.1 and JSE 6 on a 64 bit mac.
    When I downloaded NB6.1 it had JSE 5 as it's default (and only) java platform. I ran Software Update to get Java 6 from Apple, used the Java Prefrences utitlity to set JSE6 as default. In NB I added the JDK6 platform, registered the JDK6 javadocs and noticed that I also have the option of registering the Java source code.
    I have three questions:
    1) How do I make JDK6 the default in NetBeans. The JDK5 keeps being default after I did the steps above and I don't see anywhere to change that.
    2) How do I read the Java 6 source code? I can see sun provides [source code| http://download.java.net/jdk6/] for their supported platforms. I dont see Apple doing the same for its JDK port. What would I need to do to get to read the java SE6 sources? or is it actually hiding somewhere in the /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home hierarchy?
    3) Where does the JVM look for the binary code to run when I make a call to, say java.util.ArrayList or any other library. In my naivety I would have assumed it would be a .class file somewhere in the java Home folder, but I don't see anything like it.
    thanks in advance,
    chris

    This is taken from the help included with netbeans. In response to question 1.
    By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform
    for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the
    Detail tab. The JDK version is listed in the Java field.
    You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line
    or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters.
    In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you
    want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a
    platform and attach the source code and Javadoc to the platform.
    In  , you can switch the target JDK in the Project Properties dialog box. In  , you have to set the target JDK in the Ant script itself,
    then specify the source/binary format in the Project Properties dialog box.
    To register a new Java platform:
    Choose Tools > Java Platforms from the main window.
    Click New Platform and select the directory that contains the Java platform. Java platform directories are marked with a  
    in the file chooser.
    Use the Sources and Javadoc tabs to attach Javadoc documentation and source code for debugging to the platform.
    Click Close.
    To set the default Java platform for a standard project:
    Right-click the project's root node in the Projects window and choose Properties.
    In the Project Properties dialog box, select the Libraries node in the left pane.
    Choose the desired Java platform in the Java Platform combo box.
    Switching the target JDK for a standard project does the following:
    Offers the new target JDK's classes for code completion.
    If available, displays the target JDK's source code and Javadoc documentation.
    Uses the target JDK's executables (javac and java) to compile and execute your application.
    Compiles your source code against the target JDK's libraries.
    If you want to register additional Java platforms with the IDE, you can do so by clicking the Manage Platforms button.
    Then click the Add Platform button and navigate to the desired platform.
    To set the target Java platform for a free-form project:
    In your Ant script, set the target JDK as desired in the javac, java, and javadoc tasks.
    Right-click the project's root node in the Projects window and choose Properties.
    In the Sources panel, set the level of JDK you want your application to be run on in the Source/Binary Format combo box.
    When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the
    Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead.
    See Also
    Managing the Classpath
    Declaring the Classpath in a Free-Form Project
    Stepping Through Your Program
    Legal Notices

  • Upload and Download ABAP Source Code

    This is a program that I have had kicking around for a couple of years in various incarnations.
    Source Code Listing
    Report: ZKBPROGS *
    Function : Up/Download ABAP reports complete with texts *
    - this program does not update TRDIR with the *
    TRDIR entries that are in the program uploaded. Instead, *
    current users stats are used. *
    - this program allows selection of reports from a list or *
    a single report can be tuped in and uploaded *
    - this program also updates TADIR so that a development class*
    is assigned to the program *
    - this program checks to see if the program already has a *
    TRDIR entry, and if it does, warns the user *
    - this program will save/restore the program documenation too*
    REPORT ZKBPROGS
    NO STANDARD PAGE HEADING
    LINE-SIZE 255.
    Declare Database Objects *
    tables:
    DOKIL,
    TRDIR.
    Constants*
    CONSTANTS:
    MC_TRDIR_IDENTIFIER(72) TYPE C VALUE '%&%& RDIR',
    MC_REPORT_IDENTIFIER(72) TYPE C VALUE '%&%& REPO',
    MC_TEXT_IDENTIFIER(72) TYPE C VALUE '%&%& TEXP',
    MC_THEAD_IDENTIFIER(72) TYPE C VALUE '%&%& HEAD',
    MC_DOC_IDENTIFIER(72) TYPE C VALUE '%&%& DOKL',
    MC_TRDIR_SHORT(4) TYPE C VALUE 'RDIR',
    MC_REPORT_SHORT(4) TYPE C VALUE 'REPO',
    MC_TEXT_SHORT(4) TYPE C VALUE 'TEXP',
    MC_THEAD_SHORT(4) TYPE C VALUE 'HEAD',
    MC_DOC_SHORT(4) TYPE C VALUE 'DOKP'.
    Declare Module level data structures *
    DATA: BEGIN OF MTAB_PROGRAM_SOURCE OCCURS 0,
    LINE(72) TYPE C,
    END OF MTAB_PROGRAM_SOURCE.
    DATA: MTAB_PROGRAM_TRDIR LIKE TRDIR OCCURS 0 WITH HEADER LINE.
    DATA: MTAB_PROGRAM_TEXTS LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
    DATA: MSTR_THEAD LIKE THEAD.
    DATA: BEGIN OF MTAB_PROGRAM_FILE OCCURS 0,
    LINE(275) TYPE C,
    END OF MTAB_PROGRAM_FILE.
    DATA: BEGIN OF MTAB_DIRECTORY OCCURS 0,
    NAME LIKE TRDIR-NAME,
    DESC(72) TYPE C,
    SAVENAME LIKE RLGRAP-FILENAME,
    END OF MTAB_DIRECTORY.
    DATA: BEGIN OF MTAB_PROGRAM_DOCUMENTATION OCCURS 0,
    LINE(255) TYPE C,
    END OF MTAB_PROGRAM_DOCUMENTATION.
    Selection Screen *
    *-- Options for upload/download of programs
    SELECTION-SCREEN BEGIN OF BLOCK FRM_OPTIONS WITH FRAME TITLE TEXT-UDL.
    PARAMETERS:
    RB_DOWN RADIOBUTTON GROUP UDL DEFAULT 'X'. " Download reports
    SELECTION-SCREEN BEGIN OF BLOCK FRM_TRDIR WITH FRAME TITLE TEXT-DIR.
    SELECT-OPTIONS:
    S_NAME FOR TRDIR-NAME, " Program Name
    S_SUBC FOR TRDIR-SUBC " Program Type
    DEFAULT 'F' OPTION EQ SIGN E," Exclude Functions by default
    S_CNAM FOR TRDIR-CNAM " Created by
    DEFAULT SY-UNAME,
    S_UNAM FOR TRDIR-UNAM, " Last Changed by
    S_CDAT FOR TRDIR-CDAT, " Creation date
    S_UDAT FOR TRDIR-UDAT. " Last update date
    SELECTION-SCREEN END OF BLOCK FRM_TRDIR.
    *-- Options for uploading programs
    PARAMETERS:
    RB_UP RADIOBUTTON GROUP UDL. " Upload reports
    SELECTION-SCREEN BEGIN OF BLOCK FRM_UPLOAD WITH FRAME TITLE TEXT-UPL.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(29) TEXT-SNG.
    PARAMETERS:
    RB_FILE RADIOBUTTON GROUP HOW DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 33(42) TEXT-FNA.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS:
    RB_LIST RADIOBUTTON GROUP HOW.
    SELECTION-SCREEN END OF BLOCK FRM_UPLOAD.
    SELECTION-SCREEN END OF BLOCK FRM_OPTIONS.
    *-- Options for up/downloading programs
    SELECTION-SCREEN BEGIN OF BLOCK FRM_FILEN WITH FRAME TITLE TEXT-FIL.
    PARAMETERS:
    RB_DOS RADIOBUTTON GROUP FIL DEFAULT 'X', " Save to local
    RB_UNIX RADIOBUTTON GROUP FIL, " Save to UNIX
    P_PATH LIKE RLGRAP-FILENAME " Path to save files to
    DEFAULT 'c:\temp\'.
    SELECTION-SCREEN END OF BLOCK FRM_FILEN.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-LOW.
    CALL FUNCTION 'F4_PROGRAM'
    EXPORTING
    OBJECT = S_NAME-LOW
    SUPPRESS_SELECTION = 'X'
    IMPORTING
    RESULT = S_NAME-LOW
    EXCEPTIONS
    OTHERS = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-HIGH.
    CALL FUNCTION 'F4_PROGRAM'
    EXPORTING
    OBJECT = S_NAME-HIGH
    SUPPRESS_SELECTION = 'X'
    IMPORTING
    RESULT = S_NAME-HIGH
    EXCEPTIONS
    OTHERS = 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-LOW.
    PERFORM GET_NAME USING 'S_UNAM-LOW'
    CHANGING S_UNAM-LOW.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-HIGH.
    PERFORM GET_NAME USING 'S_UNAM-HIGH'
    CHANGING S_UNAM-HIGH.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-LOW.
    PERFORM GET_NAME USING 'S_CNAM-LOW'
    CHANGING S_CNAM-LOW.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-HIGH.
    PERFORM GET_NAME USING 'S_CNAM-HIGH'
    CHANGING S_CNAM-HIGH.
    TOP-OF-PAGE.
    IF RB_LIST = 'X'.
    FORMAT COLOR COL_HEADING.
    NEW-LINE.
    WRITE: AT 3 TEXT-H01,
    AT 15 TEXT-H03.
    FORMAT COLOR OFF.
    ENDIF.
    AT LINE-SELECTION.
    CHECK RB_LIST = 'X'. " only do in list mode
    READ LINE SY-CUROW FIELD VALUE MTAB_DIRECTORY-SAVENAME.
    *-- Read file into an internal table
    PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
    USING MTAB_DIRECTORY-SAVENAME.
    *-- Split table into TADIR entry, report lines, and report text
    PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
    MTAB_PROGRAM_SOURCE
    MTAB_PROGRAM_TEXTS
    MTAB_PROGRAM_DOCUMENTATION
    CHANGING TRDIR
    MSTR_THEAD.
    *-- Save all of the data
    PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
    MTAB_PROGRAM_TEXTS
    MTAB_PROGRAM_DOCUMENTATION
    USING TRDIR
    MSTR_THEAD.
    Start of processing *
    START-OF-SELECTION.
    FORMAT COLOR COL_NORMAL.
    IF RB_DOWN = 'X'.
    PERFORM DOWNLOAD_REPORTS.
    ELSEIF RB_UP = 'X'.
    PERFORM UPLOAD_REPORTS.
    ENDIF.
    END-OF-SELECTION.
    IF RB_DOWN = 'X'.
    CONCATENATE P_PATH
    'directory.txt'
    INTO P_PATH.
    PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_DIRECTORY
    USING P_PATH.
    ENDIF.
    FORM UPLOAD_REPORTS *
    FORM UPLOAD_REPORTS.
    *-- Can upload a reports entered in selection criteria or
    *-- select from a list. List can be from index.txt in same directory
    *-- (created by the download) or by reading the first line of each file
    *-- in the directory.
    IF RB_FILE = 'X'. " Upload single program from a file
    *-- Read file into an internal table
    PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
    USING P_PATH.
    *-- Split table into TADIR entry, report lines, and report text
    PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
    MTAB_PROGRAM_SOURCE
    MTAB_PROGRAM_TEXTS
    MTAB_PROGRAM_DOCUMENTATION
    CHANGING TRDIR
    MSTR_THEAD.
    *-- Save all of the data
    PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
    MTAB_PROGRAM_TEXTS
    MTAB_PROGRAM_DOCUMENTATION
    USING TRDIR
    MSTR_THEAD.
    ELSEIF RB_LIST = 'X'. " Show list for user to choose from
    *-- get list of report names/descriptions from directory text
    CONCATENATE P_PATH
    'directory.txt'
    INTO P_PATH.
    PERFORM READ_REPORT_FROM_DISK TABLES MTAB_DIRECTORY
    USING P_PATH.
    SORT MTAB_DIRECTORY.
    *-- Write out list of report names/descriptions
    LOOP AT MTAB_DIRECTORY.
    WRITE:
    / MTAB_DIRECTORY-NAME UNDER TEXT-H01,
    MTAB_DIRECTORY-DESC UNDER TEXT-H03,
    MTAB_DIRECTORY-SAVENAME.
    ENDLOOP.
    *-- Process user selections for reports to upload.
    ENDIF.
    ENDFORM. " upload_reports
    FORM DOWNLOAD_REPORTS *
    From the user selections, get all programs that meet the *
    criteria, and save them in ftab_program_directory. *
    Also save the report to disk. *
    FORM DOWNLOAD_REPORTS.
    DATA:
    LC_FULL_FILENAME LIKE RLGRAP-FILENAME.
    *-- The table is put into an internal table because the program will
    *-- abend if multiple transfers to a dataset occur within a SELECT/
    *-- ENDSELCT (tested on 3.1H)
    SELECT * FROM TRDIR
    INTO TABLE MTAB_PROGRAM_TRDIR
    WHERE NAME IN S_NAME
    AND SUBC IN S_SUBC
    AND CNAM IN S_CNAM
    AND UNAM IN S_UNAM
    AND CDAT IN S_CDAT
    AND UDAT IN S_UDAT.
    LOOP AT MTAB_PROGRAM_TRDIR.
    *-- Clear out text and source code tables
    CLEAR:
    MTAB_PROGRAM_FILE,
    MTAB_PROGRAM_SOURCE,
    MTAB_PROGRAM_TEXTS,
    MTAB_PROGRAM_DOCUMENTATION.
    REFRESH:
    MTAB_PROGRAM_FILE,
    MTAB_PROGRAM_SOURCE,
    MTAB_PROGRAM_TEXTS,
    MTAB_PROGRAM_DOCUMENTATION.
    *-- Get the report
    READ REPORT MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_SOURCE.
    *-- Get the text for the report
    READ TEXTPOOL MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_TEXTS.
    *-- Get the documentation for the report
    CLEAR DOKIL.
    SELECT * UP TO 1 ROWS FROM DOKIL
    WHERE ID = 'RE'
    AND OBJECT = MTAB_PROGRAM_TRDIR-NAME
    AND LANGU = SY-LANGU
    AND TYP = 'E'
    ORDER BY VERSION DESCENDING.
    ENDSELECT.
    *-- Documentation exists for this object
    IF SY-SUBRC = 0.
    CALL FUNCTION 'DOCU_READ'
    EXPORTING
    ID = DOKIL-ID
    LANGU = DOKIL-LANGU
    OBJECT = DOKIL-OBJECT
    TYP = DOKIL-TYP
    VERSION = DOKIL-VERSION
    IMPORTING
    HEAD = MSTR_THEAD
    TABLES
    LINE = MTAB_PROGRAM_DOCUMENTATION
    EXCEPTIONS
    OTHERS = 1.
    ENDIF.
    *-- Put the report code and texts into a single file
    *-- Put the identifier line in so that the start of the TRDIR line
    *-- is marked
    CONCATENATE MC_TRDIR_IDENTIFIER
    MTAB_PROGRAM_TRDIR-NAME
    INTO MTAB_PROGRAM_FILE-LINE.
    APPEND MTAB_PROGRAM_FILE.
    *-- Add the TRDIR line
    MTAB_PROGRAM_FILE-LINE = MTAB_PROGRAM_TRDIR.
    APPEND MTAB_PROGRAM_FILE.
    *-- Put the identifier line in so that the start of the report code
    *-- is marked
    CONCATENATE MC_REPORT_IDENTIFIER
    MTAB_PROGRAM_TRDIR-NAME
    INTO MTAB_PROGRAM_FILE-LINE.
    APPEND MTAB_PROGRAM_FILE.
    *-- Add the report code
    LOOP AT MTAB_PROGRAM_SOURCE.
    MTAB_PROGRAM_FILE = MTAB_PROGRAM_SOURCE.
    APPEND MTAB_PROGRAM_FILE.
    ENDLOOP.
    *-- Put the identifier line in so that the start of the report text
    *-- is marked
    CONCATENATE MC_TEXT_IDENTIFIER
    MTAB_PROGRAM_TRDIR-NAME
    INTO MTAB_PROGRAM_FILE-LINE.
    APPEND MTAB_PROGRAM_FILE.
    *-- Add the report texts
    LOOP AT MTAB_PROGRAM_TEXTS.
    MTAB_PROGRAM_FILE = MTAB_PROGRAM_TEXTS.
    APPEND MTAB_PROGRAM_FILE.
    ENDLOOP.
    *-- Put the identifier line in so that the start of the THEAD record
    *-- is marked
    CONCATENATE MC_THEAD_IDENTIFIER
    MTAB_PROGRAM_TRDIR-NAME
    INTO MTAB_PROGRAM_FILE-LINE.
    APPEND MTAB_PROGRAM_FILE.
    MTAB_PROGRAM_FILE = MSTR_THEAD.
    APPEND MTAB_PROGRAM_FILE.
    *-- Put the identifier line in so that the start of the report
    *-- documentation is marked
    CONCATENATE MC_DOC_IDENTIFIER
    MTAB_PROGRAM_TRDIR-NAME
    INTO MTAB_PROGRAM_FILE-LINE.
    APPEND MTAB_PROGRAM_FILE.
    *-- Add the report documentation
    LOOP AT MTAB_PROGRAM_DOCUMENTATION.
    MTAB_PROGRAM_FILE = MTAB_PROGRAM_DOCUMENTATION.
    APPEND MTAB_PROGRAM_FILE.
    ENDLOOP.
    *-- Make the fully pathed filename that report will be saved to
    CONCATENATE P_PATH
    MTAB_PROGRAM_TRDIR-NAME
    '.txt'
    INTO LC_FULL_FILENAME.
    PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_PROGRAM_FILE
    USING LC_FULL_FILENAME.
    *-- Write out message with Program Name/Description
    READ TABLE MTAB_PROGRAM_TEXTS WITH KEY ID = 'R'.
    IF SY-SUBRC = 0.
    MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
    MTAB_DIRECTORY-DESC = MTAB_PROGRAM_TEXTS-ENTRY.
    MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
    APPEND MTAB_DIRECTORY.
    WRITE: / MTAB_PROGRAM_TRDIR-NAME,
    MTAB_PROGRAM_TEXTS-ENTRY(65) COLOR COL_HEADING.
    ELSE.
    MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
    MTAB_DIRECTORY-DESC = 'No description available'.
    MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
    APPEND MTAB_DIRECTORY.
    WRITE: / MTAB_PROGRAM_TRDIR-NAME.
    ENDIF.
    ENDLOOP.
    ENDFORM. " BUILD_PROGRAM_DIRECTORY
    FORM SAVE_TABLE_TO_FILE *
    --> FTAB_TABLE *
    --> F_FILENAME *
    FORM SAVE_TABLE_TO_FILE TABLES FTAB_TABLE
    USING F_FILENAME.
    IF RB_DOS = 'X'. " Save file to presentation server
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    FILENAME = F_FILENAME
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = FTAB_TABLE
    EXCEPTIONS
    OTHERS = 4.
    IF SY-SUBRC NE 0.
    WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
    F_FILENAME COLOR COL_NEGATIVE.
    ENDIF.
    ELSE. " Save file to application server
    OPEN DATASET F_FILENAME FOR OUTPUT IN TEXT MODE.
    IF SY-SUBRC = 0.
    LOOP AT FTAB_TABLE.
    TRANSFER FTAB_TABLE TO F_FILENAME.
    IF SY-SUBRC NE 0.
    WRITE: / 'Error writing record to file;' COLOR COL_NEGATIVE,
    F_FILENAME COLOR COL_NEGATIVE.
    ENDIF.
    ENDLOOP.
    ELSE.
    WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
    F_FILENAME COLOR COL_NEGATIVE.
    ENDIF.
    ENDIF. " End RB_DOS
    ENDFORM. " SAVE_PROGRAM
    FORM READ_REPORT_FROM_DISK *
    Read report into internal table. Can read from local or *
    remote computer *
    FORM READ_REPORT_FROM_DISK TABLES FTAB_TABLE
    USING F_FILENAME.
    DATA:
    LC_MESSAGE(128) TYPE C.
    CLEAR FTAB_TABLE.
    REFRESH FTAB_TABLE.
    IF RB_DOS = 'X'.
    TRANSLATE F_FILENAME USING '/\'. " correct slash for Dos PC file
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    FILENAME = F_FILENAME
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = FTAB_TABLE
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TABLE_WIDTH = 4
    INVALID_TYPE = 5
    NO_BATCH = 6
    UNKNOWN_ERROR = 7
    OTHERS = 8.
    IF SY-SUBRC >< 0.
    WRITE: / 'Error reading file from local PC' COLOR COL_NEGATIVE.
    ENDIF.
    ELSEIF RB_UNIX = 'X'.
    TRANSLATE F_FILENAME USING '\/'. " correct slash for unix
    OPEN DATASET F_FILENAME FOR INPUT MESSAGE LC_MESSAGE IN TEXT MODE.
    IF SY-SUBRC = 0.
    DO.
    READ DATASET F_FILENAME INTO FTAB_TABLE.
    IF SY-SUBRC = 0.
    APPEND FTAB_TABLE.
    ELSE.
    EXIT.
    ENDIF.
    ENDDO.
    CLOSE DATASET F_FILENAME.
    ELSE.
    WRITE: / 'Error reading file from remote computer'
    COLOR COL_NEGATIVE,
    / LC_MESSAGE,
    / F_FILENAME.
    SY-SUBRC = 4.
    ENDIF.
    ENDIF.
    ENDFORM. " READ_REPORT_FROM_DISK
    FORM SPLIT_INCOMING_FILE *
    --> FTAB_PROGRAM_FILE *
    --> FTAB_PROGRAM_SOURCE *
    --> ` *
    --> FTAB_PROGRAM_TEXTS *
    FORM SPLIT_INCOMING_FILE TABLES FTAB_PROGRAM_FILE
    STRUCTURE MTAB_PROGRAM_FILE
    FTAB_PROGRAM_SOURCE
    STRUCTURE MTAB_PROGRAM_SOURCE
    FTAB_PROGRAM_TEXTS
    STRUCTURE MTAB_PROGRAM_TEXTS
    FTAB_PROGRAM_DOCUMENTATION
    STRUCTURE MTAB_PROGRAM_DOCUMENTATION
    CHANGING FSTR_TRDIR
    FSTR_THEAD.
    DATA:
    LC_DATATYPE(4) TYPE C, " Type of data, REPO, TEXP, RDIR
    LC_PROGRAM_FILE LIKE MTAB_PROGRAM_FILE.
    LOOP AT FTAB_PROGRAM_FILE.
    LC_PROGRAM_FILE = FTAB_PROGRAM_FILE.
    CASE LC_PROGRAM_FILE(9).
    WHEN MC_TRDIR_IDENTIFIER.
    LC_DATATYPE = MC_TRDIR_SHORT.
    WHEN MC_REPORT_IDENTIFIER.
    LC_DATATYPE = MC_REPORT_SHORT.
    WHEN MC_TEXT_IDENTIFIER.
    LC_DATATYPE = MC_TEXT_SHORT.
    WHEN MC_DOC_IDENTIFIER.
    LC_DATATYPE = MC_DOC_SHORT.
    WHEN MC_THEAD_IDENTIFIER.
    LC_DATATYPE = MC_THEAD_SHORT.
    WHEN OTHERS. " Actual contents of report, trdir, or text
    CASE LC_DATATYPE.
    WHEN MC_TRDIR_SHORT.
    FSTR_TRDIR = FTAB_PROGRAM_FILE.
    WHEN MC_REPORT_SHORT.
    FTAB_PROGRAM_SOURCE = FTAB_PROGRAM_FILE.
    APPEND FTAB_PROGRAM_SOURCE.
    WHEN MC_TEXT_SHORT.
    FTAB_PROGRAM_TEXTS = FTAB_PROGRAM_FILE.
    APPEND FTAB_PROGRAM_TEXTS.
    WHEN MC_THEAD_SHORT.
    FSTR_THEAD = FTAB_PROGRAM_FILE.
    WHEN MC_DOC_SHORT.
    FTAB_PROGRAM_DOCUMENTATION = FTAB_PROGRAM_FILE.
    APPEND FTAB_PROGRAM_DOCUMENTATION.
    ENDCASE.
    ENDCASE.
    ENDLOOP.
    ENDFORM. " SPLIT_INCOMING_FILE
    FORM INSERT_NEW_REPORT*
    --> FTAB_PROGRAM_SOURCE *
    --> FTAB_PROGRAM_TEXTS *
    --> F_TRDIR *
    FORM INSERT_NEW_REPORT TABLES FTAB_PROGRAM_SOURCE
    STRUCTURE MTAB_PROGRAM_SOURCE
    FTAB_PROGRAM_TEXTS
    STRUCTURE MTAB_PROGRAM_TEXTS
    FTAB_PROGRAM_DOCUMENTATION
    STRUCTURE MTAB_PROGRAM_DOCUMENTATION
    USING FSTR_TRDIR LIKE TRDIR
    FSTR_THEAD LIKE MSTR_THEAD.
    DATA:
    LC_OBJ_NAME LIKE E071-OBJ_NAME,
    LC_LINE2(40) TYPE C,
    LC_ANSWER(1) TYPE C.
    *-- read trdir to see if the report already exists, if it does, prompt
    *-- user to overwrite or abort.
    SELECT SINGLE * FROM TRDIR WHERE NAME = FSTR_TRDIR-NAME.
    IF SY-SUBRC = 0. " Already exists
    CONCATENATE 'want to overwrite report'
    FSTR_TRDIR-NAME
    INTO LC_LINE2 SEPARATED BY SPACE.
    CONCATENATE LC_LINE2
    INTO LC_LINE2.
    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
    EXPORTING
    DEFAULTOPTION = 'N'
    TEXTLINE1 = 'The selected report already exists, do you'
    TEXTLINE2 = LC_LINE2
    TITEL = 'Report already exists'
    CANCEL_DISPLAY = SPACE
    IMPORTING
    ANSWER = LC_ANSWER
    EXCEPTIONS
    OTHERS = 1.
    ELSE.
    LC_ANSWER = 'J'.
    ENDIF.
    IF LC_ANSWER = 'J'.
    *-- Create the TADIR entry. (TRDIR entry created by INSERT REPORT)
    LC_OBJ_NAME = TRDIR-NAME.
    CALL FUNCTION 'TR_TADIR_POPUP_ENTRY_E071'
    EXPORTING
    WI_E071_PGMID = 'R3TR'
    WI_E071_OBJECT = 'PROG'
    WI_E071_OBJ_NAME = LC_OBJ_NAME
    WI_TADIR_DEVCLASS = '$TMP'
    EXCEPTIONS
    EXIT = 3
    OTHERS = 4.
    IF SY-SUBRC = 0.
    *-- Create Report
    INSERT REPORT FSTR_TRDIR-NAME FROM FTAB_PROGRAM_SOURCE.
    *-- Create Texts
    INSERT TEXTPOOL FSTR_TRDIR-NAME FROM FTAB_PROGRAM_TEXTS
    LANGUAGE SY-LANGU.
    *-- Save Documentation
    CALL FUNCTION 'DOCU_UPDATE'
    EXPORTING
    HEAD = FSTR_THEAD
    STATE = 'A'
    TYP = 'E'
    VERSION = '1'
    TABLES
    LINE = FTAB_PROGRAM_DOCUMENTATION
    EXCEPTIONS
    OTHERS = 1.
    ELSE.
    WRITE: / 'Error updating the TADIR entry' COLOR COL_NEGATIVE,
    'Program' COLOR COL_NEGATIVE INTENSIFIED OFF,
    FSTR_TRDIR-NAME, 'was not loaded into SAP.'
    COLOR COL_NEGATIVE INTENSIFIED OFF.
    ENDIF.
    ELSE.
    WRITE: / FSTR_TRDIR-NAME COLOR COL_NEGATIVE,
    'was not uploaded into SAP. Action cancelled by user'
    COLOR COL_NEGATIVE INTENSIFIED OFF.
    ENDIF.
    ENDFORM. " INSERT_NEW_REPORT
    FORM GET_NAME *
    --> VALUE(F_FIELD) *
    --> F_NAME *
    FORM GET_NAME USING VALUE(F_FIELD)
    CHANGING F_NAME.
    DATA: LTAB_FIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
    LC_PROG LIKE D020S-PROG,
    LC_DNUM LIKE D020S-DNUM.
    TRANSLATE F_FIELD TO UPPER CASE.
    refresh ltab_fields.
    LTAB_FIELDS-FIELDNAME = F_FIELD.
    append ltab_fields.
    LC_PROG = SY-REPID .
    LC_DNUM = SY-DYNNR .
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = LC_PROG
    DYNUMB = LC_DNUM
    TABLES
    dynpfields = ltab_fields
    EXCEPTIONS
    OTHERS = 01.
    read table ltab_fields index 1.
    IF SY-SUBRC EQ 0.
    F_NAME = LTAB_FIELDS-FIELDVALUE.
    refresh ltab_fields.
    ENDIF.
    CALL FUNCTION 'F4_USER'
    EXPORTING
    OBJECT = F_NAME
    IMPORTING
    RESULT = F_NAME.
    ENDFORM. " GET_NAME
    Program Texts
    DIR File Download Options (File Selection)
    FIL File Options
    FNA Enter filename below (under File Options)
    H01 Prog Name
    H03 Program Description
    SNG Upload a single file
    UDL Upload to SAP/Download from SAP
    UPL File Upload Options
    R Backup/Restore program source code with texts
    P_PATH Path to save programs to
    RB_DOS Files on local computer
    RB_DOWN Download Programs
    RB_FILE Upload a single file
    RB_LIST Select program(s) from a list
    RB_UNIX Files on remote computer
    RB_UP Upload Programs to SAP
    S_CDAT Date Created
    S_CNAM Created by UserID
    S_NAME Program Name
    S_SUBC Program Type
    S_UDAT Date Changed
    S_UNAM Last Changed by UserID

    Hi
    you can use SAPLink for this
    http://code.google.com/p/saplink/
    Abhi

  • Debugger stopped on uncompilable source code.

    Dear Friends,
    I got the Error as like
    Debugger stopped on uncompilable source code.
    The code is down!!!
    I could not figure out the reason, why it comes. !!! I read data from a txt file and generate an XML file.
    please any 1 help me to solve this
    Priya
    package java.Associations;
    import java.io.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Scanner;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Text;
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    public class XMLCreatorExample {
    //No generics
    List myData;
    Document dom;
    public XMLCreatorExample() {
    //create a list to hold the data
    myData = new ArrayList();
    //initialize the list
    loadData();
    //Get a DOM object
    createDocument();
    public void runExample(){
    System.out.println("Started .. ");
    createDOMTree();
    printToFile();
    System.out.println("Generated file successfully.");
    * Add a list of books to the list
    * In a production system you might populate the list from a DB
    private void loadData(){
    Scanner inputFile = null;
    try {
    inputFile = new Scanner(new File("C:\\coding\\weka\\1.txt"));
    while(inputFile.hasNext()) {
    myData.add(inputFile.next());
    catch(FileNotFoundException fNFE) {
    System.out.println("The file was not found");
    finally {
    inputFile.close();
    //myData.add(new Book("Head First Java", "Kathy Sierra .. etc","Java 1.5"));
    //myData.add(new Book("Head First Design Patterns", "Kathy Sierra .. etc","Java Architect"));
    * Using JAXP in implementation independent manner create a document object
    * using which we create a xml tree in memory
    private void createDocument() {
    //get an instance of factory
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    try {
    //get an instance of builder
    DocumentBuilder db = dbf.newDocumentBuilder();
    //create an instance of DOM
    dom = db.newDocument();
    }catch(ParserConfigurationException pce) {
    //dump it
    System.out.println("Error while trying to instantiate DocumentBuilder " + pce);
    System.exit(1);
    * The real workhorse which creates the XML structure
    private void createDOMTree(){
    //create the root element <Books>
    Element rootEle = dom.createElement("Books");
    dom.appendChild(rootEle);
    //No enhanced for
    Iterator it  = myData.iterator();
    while(it.hasNext()) {
    Book b = (Book)it.next();
    //For each Book object  create <Book> element and attach it to root
    Element bookEle = createBookElement(b);
    rootEle.appendChild(bookEle);
    * Helper method which creates a XML element <Book>
    * @param b The book for which we need to create an xml representation
    * @return XML element snippet representing a book
    private Element createBookElement(Book b){
    Element bookEle = dom.createElement("Book");
    bookEle.setAttribute("Subject", b.getSubject());
    //create author element and author text node and attach it to bookElement
    Element authEle = dom.createElement("Author");
    Text authText = dom.createTextNode(b.getAuthor());
    authEle.appendChild(authText);
    bookEle.appendChild(authEle);
    //create title element and title text node and attach it to bookElement
    Element titleEle = dom.createElement("Title");
    Text titleText = dom.createTextNode(b.getTitle());
    titleEle.appendChild(titleText);
    bookEle.appendChild(titleEle);
    return bookEle;
    * This method uses Xerces specific classes
    * prints the XML document to file.
    private void printToFile(){
    try
    //print
    OutputFormat format = new OutputFormat(dom);
    format.setIndenting(true);
    //to generate output to console use this serializer
    //XMLSerializer serializer = new XMLSerializer(System.out, format);
    //to generate a file output use fileoutputstream instead of system.out
    XMLSerializer serializer = new XMLSerializer(
    new FileOutputStream(new File("C:\\coding\\book.xml")), format);
    serializer.serialize(dom);
    } catch(IOException ie) {
    ie.printStackTrace();
    public static void main(String args[]) {
    //create an instance
    XMLCreatorExample xce = new XMLCreatorExample();
    //run the example
    xce.runExample();/**/
    package java.Associations;
    public class Book {
    private String title;
    private String author;
    private String subject;
    public Book(String subject) {
    this.subject = subject;
    public Book() {
    public Book(String title, String author, String subject) {
    this.title = title;
    this.author = author;
    this.subject = subject;
    public String getAuthor() {
    return author;
    public void setAuthor(String author) {
    this.author = author;
    public String getTitle() {
    return title;
    public void setTitle(String title) {
    this.title = title;
    public String getSubject() {
    return subject;
    public void setSubject(String subject) {
    this.subject = subject;
    public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append(" { Book Details --");
    sb.append("Title:" + getTitle());
    sb.append(", ");
    sb.append("Author:" + getAuthor());
    sb.append(", ");
    sb.append("Subject:" + getSubject());
    sb.append(". } \n");
    return sb.toString();
    }

    One of your .java files doesn't compile (has compilation errors.). Make sure there are no compilation errors before you attempt to run/debug the program.
    P.S Why are you posting this across multiple forums?

  • How to get Source code of a Schedular Java concurrent program in Payments

    Hi Experts,
    I am very new to Java Concurrent program.
    I need java source code of a schedule java concurrent program.Following are the details of Executable.
    Executable :Format Payment Instructions
    Short Name :IBY_FD_PAYMENT_FORMAT
    Application : Payments
    Execution Method :Java Concurrent Program
    Execution File Name:FDExtractAndFormatting
    Execution File Path : oracle.apps.iby.scheduler
    I searched in execution file path,but i am unable to find required java source.
    Please someone help regarding this issue..
    It's Urgent Issue.
    Regards
    Amar

    Hi Srini,
    Thanks for reply...
    In the attached template of concurrent program "Format Payment Instructions", i need to add voucher number in the template.
    How can i do this?how to decompile the executable?
    It is a check printing.
    Please give me suggestions..
    Regards
    Amar

Maybe you are looking for