Copying files from same directory as *.java files and moving to WEB-INF/classes/ package name

In our current application we have the following source directory structure:
          src -
          - com
          - edeploy
          - subdirs ... (many directories here)
          - jsp
          -subdirs ... (many directories here)
          In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
          files). I would like to modify my build.cmd script to copy the *.gxq files
          into the same directory as the class files.
          Here's my script so far:
          @REM Create list of files to compile
          DIR /S /B /A:-D src\com\*.java >class.list
          @REM Create list of query files
          DIR /S /B /A:-D src\com\*.gxq >query.list
          @REM Compile
          javac -d stage\WEB-INF\classes @class.list
          @REM Copy query files into class directory
          .......... code needed here ......
          Can anyone help me with this?
          Thanks,
          Matt
          

You may want to check out:
          http://jakarta.apache.org/ant/index.html
          Gary
          "Matt Raible" <[email protected]> wrote in message
          news:[email protected]..
          > In our current application we have the following source directory
          structure:
          >
          > src -
          > - com
          > - edeploy
          > - subdirs ... (many directories here)
          > - jsp
          > -subdirs ... (many directories here)
          >
          >
          > In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
          > files). I would like to modify my build.cmd script to copy the *.gxq
          files
          > into the same directory as the class files.
          >
          > Here's my script so far:
          >
          > @REM Create list of files to compile
          > DIR /S /B /A:-D src\com\*.java >class.list
          >
          > @REM Create list of query files
          > DIR /S /B /A:-D src\com\*.gxq >query.list
          >
          > @REM Compile
          > javac -d stage\WEB-INF\classes @class.list
          >
          > @REM Copy query files into class directory
          > .......... code needed here ......
          >
          > Can anyone help me with this?
          >
          > Thanks,
          >
          > Matt
          >
          >
          

Similar Messages

  • Reading file from oracle directory at client side

    Hi,
    I have a SWING app. which connects to an Oracle db.
    My goal is to read files from oracle directory with java through JDBC. I export some dumps with datapump and they need to be transferred to a client machine. There is no access to oracle directory at network filesystem level.
    Please advice!
    TIA, Sandor

    An Oracle Directory has an underlying OS directory associated with it, Oracle just overlays it's control structure onto an existing folder in the OS. You can manipulate the files with stored procedures in Oracle or at the OS level from outside of Oracle.
    If you manipulate the files from the OS level, outside of Oracle, you may need a refresh of the Oracle Directory structure.

  • Java Program to copy file from one directory to another failing

    Hello All,
    Oracle Applications 12.1.3
    RDBMS: 11.2.0.30
    SQL*Plus: 10.1.0.5.0
    Java beginner here so help is much appreciated.  I'm have some java code that I'm using to copy a file from one directory to another in an Oracle Applications Server.  I notice that when moving to a new instnace I started to get file not found errors.  I think it's because of the directory.  My question is, does the directory in which I trying to pick up the file have to be a DBA_DIRECTORY, or a UTL_FILE directory in order for the java to find the file and move it?
    Here is my code...
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "COPY_FILE_JVS" AS
    import java.io.*;
    public class COPY_FILE_JVC{
      public static void copy(String SourceFile, String DestDir) {
        File source = new File(SourceFile);
        File dest = new File(DestDir);
        File cpDestFile = null;
        try {
          if (dest.isDirectory()) {
              if(source.isFile()) {
                System.out.println("File name = " + source.getName());
                System.out.println("File name dest = " + dest.getPath() );
                System.out.println("File name cpDestFile = " + dest.getPath() + File.separator + source.getName());
                cpDestFile = new File(dest.getPath() + File.separator + source.getName());
              else {
                System.out.println("Directory or File Not Found");
                return;
          BufferedInputStream  br = new BufferedInputStream (new FileInputStream (source));
          BufferedOutputStream  bw = new BufferedOutputStream (new FileOutputStream (cpDestFile));
          int read = 0;
          while((read = br.read()) != -1) {
            //System.out.println((char)read);
            bw.write(read);
          br.close();
          bw.close();
        catch (FileNotFoundException e) {
        e.printStackTrace();
        catch (IOException e) {
        e.printStackTrace();

    I get these messages when calling the java from SQL Plus as follows...
    serveroutput on size 100000;
    dbms_java.set_output(1000000);
    MY_PKG.CopyFile('/home/my_user/set_env.sh','/interface/home'); (this is call to oracle pl/sql package which calls the java.)
    PL/SQL procedure successfully completed.
    Directory or File Not Found
    PL/SQL procedure successfully completed.
    If I change the directory from /home/my_user/ to any directory that is defined in DBA_DIRECTORIES or is a UTL_FILE directory to program works.  Is it perhaps because the java is in a PL/SQL package as seen below?  The PL/SQL program runs as the APPS user and I have issued the following the command grant JAVASYSPRIV to APPS.
    Here is the PL/SQL Package....
    CREATE OR REPLACE PACKAGE BOLINF.MY_PKG AUTHID CURRENT_USER AS
    CopyFile(p_SourceFile IN VARCHAR2, p_DestDir IN VARCHAR2);
    +++++++++++++++++++++++++++++
    CREATE OR REPLACE PACKAGE BODY BOLINF.MY_PKG  is
    CopyFile(p_SourceFile IN VARCHAR2, p_DestDir IN VARCHAR2)
    AS LANGUAGE JAVA NAME 'COPY_FILE_JVC.copy(java.lang.String, java.lang.String)';

  • How do I copy files onto a hard drive (device) from Mac 2 7 pc. I'm able to transfer files from device but cannot transfer files to device. Anyone had same problem or can help solve this problem? Help pls

    how do I copy files onto a hard drive (device) from Mac 2 7 pc. I'm able to transfer files from device but cannot transfer files to device. Anyone had same problem or can help solve this problem? Help pls

    Welcome to Apple Support Communities
    When you try to copy data to the external drive, what happens? If you don't see any error, the external drive is formatted in NTFS, and OS X can't write in it.
    To be able to write on this external drive, you have to use an app like Paragon NTFS. Another solution would be to format the external drive in FAT32 or exFAT with Disk Utility > http://pondini.org/OSX/DU1.html Make sure you copied all the files of the external disk to the internal disk before doing it

  • Unix command to create a copy of file from unix directory

    Hi guys,
    what is the Unix command to create a copy of file from unix directory?
    Thanks a lot!

    If you haven't noticed, this is a ABAP forum.
    You can go to the UNIX thread instead and post it there,
    SAP on UNIX
    You can expect answers there

  • I need to upload my files from one directory into other directory.

    i need to upload my files from one directory into other directory.( all its contents,folders,sub folders, files etc)
    for this task
    suppose my source folder is C:/test/test1/test2/test3
    and my destination is D:/
    first i have to check whether my dest dirctory already contains source directory..and its files
    if it contains the same structure then i have to replace the destination dir structure to source dir structure( to upadte changes)
    if it(dest dir) not contains source dir ..means it doesn't contain source folder then
    i have to create same source folder directory structure ( test.test1/test2/test3...) at destination(D:/) and copy all its contents frm source directory...
    ( means i don;t want to create manually same dir structure as source at destnation dir to copy all contents)

    I believe you need to read up on the class File.java (it comes with java).
    Some examples:
    File file = new File("C:/myDirectory");
    if(file.isDirectory())
    System.out.println("this is a directory");
    if(file.isFile())
    System.out.println("this is a file").
    You will then need to read up on other classes to read/write to the file such as FileReader and FileWriter.

  • FTP Adapter to read multiple files from a directory. Not through polling.

    Dear Friends,
    I would like to know is it possible to configure the FTP adapter in Oracle BPEL 10.1.3.4 to read multiple files (different names, same structure) from a given directory. I do not want the BPEL to do a polling. Instead when I submit the BPEL process it should read all files from the directory.
    I was looking at the option of Synchronous read but I am not able to specify wild card in the file name field. I do not know the file names at the time of reading.
    Thanks for your help!

    Hi,
    While you read the file, you can configure an adapter property in 'Receive'. This will store the filename, this filename can be used for sync read as the input parameter.
    1. Create a message type variable called 'fileheader'. This should be of type Inboundheader_msg (whatever relevant Receive activity).
    2. This variable will contain three parts - filename, FTPhost, FTPPort
    3. Copy this fileheader to 'Syncheader'.
    4. syncheader can be passed as an adapter proerty during sync read of the file.
    During Receive and Invoke, you need to navigate to 'Adapter' tab to choose the created message type variable.
    Let me know if you have further questions.
    regards,
    Rev

  • Anyone knows how to delete a file from a directory?????

    hi there
    anyone has any idea on how to delete a file from a directory? delete(String filename)? thank you.

    Hi,
    Check this link.
    Gives you an example code to show how to delete a file.
    http://examples.oreilly.com/jenut/Delete.java
    Hope this helps.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • Open file from a directory that is not web accessible?

    Subject says it all really, I'd like users to be able to download files from a directory that is otherwise not accessible by the browser. There is a way to do this is PHP, the readfile() function. Is there something equivalent in Java?
    Thanks!

    You can do that with a Servlet and a shot of java.io API.
    Here's an example: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • To Move Multiple Files from one directory to another.

    Hi,
    I need to move multiple files from one directory in UNIX (application server ) to another. I need something like an FM 'STRALAN_COPY_FILES' which is also valid in ECC 6.0.
    Thanks in advance.

    Hello Sachin
    Below you see a copy of how to use EPS_FTP_PUT using transaction SE37.
    Import parameters               Value             
    RFC_DESTINATION =                 NONE              
    LOCAL_FILE             =         filename          
    LOCAL_DIRECTORY   =              /dir1/dir2        
    REMOTE_FILE             =        filename          
    REMOTE_DIRECTORY   =             /dir1             
    OVERWRITE_MODE        =          F        " force -> overwrite existing file                 
    TEXT_MODE                    =   B               " binary
    TRANSMISSION_MONITOR            X       " display transmission monitor            
    *RECORDS_PER_TRANSFER            10                
    *REQUESTED_FILE_SIZE             0                 
    *MONITOR_TITLE                                     
    *MONITOR_TEXT1                                     
    *MONITOR_TEXT2                                     
    *PROGRESS_TEXT                                     
    *OBJECT_NAME  
    Regards,
      Uwe

  • I have read 118 files (from a directory) each with 2088 data and put them into a 2 D array with 2cols and 246384row, I want to have aeach file on a separate columns with 2088 rows

    I have read 118 files from a directory using the list.vi. Each file has 2 cols with 2088rows. Now I have the data in a 2 D array with 2cols and 246384rows (118files * 2088rows). However I want to put each file in the same array but each file in separate columns. then I would have 236 columns (2cols for each of the 118 files) by 2088 rows. thank you very much in advance.

    Hiya,
    here's a couple of .vi's that might help out. I've taken a minimum manipulation approach by using replace array subset, and I'm not bothering to strip out the 1D array before inserting it. Instead I flip the array of filenames, and from this fill in the end 2-D array from the right, overwriting the column that will eventually become the "X" data values (same for each file) and appear on the right.
    The second .vi is a sub.vi I posted elsewhere on the discussion group to get the number of lines in a file. If you're sure that you know the number of data points is always going to be 2088, then replace this sub vi with a constant to speed up the program. (by about 2 seconds!)
    I've also updated the .vi to work as a sub.vi if you wa
    nt it to, complete with error handling.
    Hope this helps.
    S.
    // it takes almost no time to rate an answer
    Attachments:
    read_files_updated.vi ‏81 KB
    Num_Lines_in_File.vi ‏62 KB

  • PI sender communication channel not reading files from NFS directory

    Hello,
    I have a sender communication channel configured to read file from NFS directory which is on ECC server. A program in ECC generates the file and puts it on the ECC server in the output directory. PI sender communication channel is supposed to pickup this file and process it. If I give the NFS path as the source directory, I am getting error: Configured source directory '//Server/DIR/OUT' does not exist. I tried putting '
    Server\DIR\OUT' too but same error. Do I have to add the NFS path of ECC into PI as logical path?
    Any suggestions?
    Thanks,
    Sangita

    Hello Sangita,
    Your ECC server is an external system, therefore you need to activate FTP service in that system and use the transport protocol FTP:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    You can use NFS protocol when you have a local directory in XI server.
    Best Regards,
    .Luis Bernal.

  • How to copy/send text file from FTPS to SAP ECC File Port

    Hi Frdns,
    I am working on one design, actually my requirement as follows
    I am receiving financial information document from Banks, which is in the form of BIA2 message format, it looks like text file. This information needs to be sending to SAP ECC system.
    I identified some approaches to full fill the requirement
    1)Using Conversion agent/or third party tools to convert BIA2 message in to XML, then using PI I will pick up the XML message, convert it in to IDoc.
    2)Without any conversion I will copy the same file (original BIA2 message) in to SAP ECC file port, in this case no conversion required, calling some program I will schedule it.
    I am looking forward t implement the second approach because it saves lot of money to my client.
    Now I am wondering using File adapter can i copy to SAP ECC File Port or I required ABAP proxy?
    What is the best approach to copy the BIA message text file from FTPS to SAP ECC File Port.??
    Regards,
    Raj

    Hi Raja,
    >>Now I am wondering using File adapter can i copy to SAP ECC File Port or I required ABAP proxy?
    Yes you can do this copy, the only restriction that can happen is the file size.. If you are sure that the fiel will be of few MB at the max then you can use the Configuration part alone and copy it to ECC folder. For doing this you need the following:
    1. Sender agreement (mention the sender interface as anything XYZ)
    2. Sender communication channel. Pick the file in binary mode
    3. Receiver determination (keep both the sender and receiver service as same)
    4. Interface Detemiantion (dont specify any mapping and keep the receiver interface name as XYZ)
    5. Create receiver agreement (with same service and interface)
    6. Use file adapter here
    Regards
    Suraj

  • How to pick files from ECC directory

    Hi All,
    I have to pick files from the directory of ECC. can anyone tell me how to configure the sender File apapter? Can i use NFS for the same?
    Regards,
    Lavanya R

    Hi Lavanya,
    With my knowledge two ways to pick the file from ECC using File adapter.
    1. If you use NFS, mount point should be created in ECC for the Directory to access from PI.
    2. If you use FTP, FTP ports must be opened between PI and ECC.

  • When copying pic from iPhoto 09 to a file, to burn a CD, after 35 photos it stops copying and I get "Unable to create/users/dividrublesr/ documents/I don't know what is going on.

    When copying pic from iPhoto 09 to a file, to burn a CD, after 35 photos it stops copying and I get "Unable to create/users/dividrublesr/ documents/I don't know what is going on. Forgive me for any mistakes, I am a first timer.

    Given that the file is selected then the next possibility is that you're exporting two files with the same name. When you do this the export breaks down as the second file would overwrite the first. Check the filenames.
    Regards
    TD

Maybe you are looking for

  • Amount of open cursor problem

    I am trying to display a tree-like data with a varchar2 field called ancestor indicating its family nodes, e.g. 1:2:5:16. A quick solution would be recurssion: procedure data_list(id in number default null) as cursor c1 is select * from table1 where

  • Unable to see Planning Classic Application Administration 11.1.1.3

    Hi Gurus, I successfully installed full suit of Hyperion 11.1.1.3 When I go to workspace I can see Classic Application Administration for Consolidation, but I cannot see Classic Application Administration for Planning. I re-configured planning as wel

  • Caller ID not displaying correctly on some call recipients' phones

    This isn't necessarily an iPhone issue - a similar issue appears on other boards.  But I haven't seen an answer that will help me, so here goes: My wife and I share a VZW account.  She has the iPhone, and today she found out that when she makes a cal

  • Changing date format to look like dd-mm-yyyy

    I want to use the date format as 25-12-2010 (day-month-year). I could not find how. Is there a place to change that? Can I make custom formats for dates? Hursat

  • How do i install adobe create pdf printer

    How do I install the printer driver under "Create PDF"? I have Adobe PDF pack