Help for javac task in ant?

Here I have 5+ folders, ervery has many java source files. And all the java source files in these folders is the same package name, also there may have same file name in different folder. And now I want the javac to compile these files and save the classes file to each own folder.
folder--fd1
| |--a1.java (package org.apache.jsp)
| |--b1.java (package org.apache.jsp)
| |--c1.java (package org.apache.jsp)
|---fd2
| |--a1.java (same file name as in fd1) (package org.apache.jsp)
| |--b2.java (package org.apache.jsp)
| |--c2.java (package org.apache.jsp)
|--
foler--fd1
| |--a1.java
| |--a1.class (also the package is org.apache.jsp, but it store in here.)
| |--b1.java
| |--b1.class
| |--c1.java
| |--c1.class
|---fd2
| |--a1.java (same file name as in fd1)
| |--a1.class
| |--b2.java
| |--b2.class
| |--c2.java
| |--c2.class
|--
And now I can complete the compile work through 2 steps in up condition, first to compile fd1 folder, and then to compile fd2 folder. For if I just compile with folder(root folder), it will return duplicate class error. How could I do with this?
below is my javac config in build.xml:
<target name="compile" >
<path id="javac.classpath">
<fileset dir="${tomcat.home}\common\lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${tomcat.home}\server\lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${basedir}\classes" />
<fileset dir="${basedir}\web\WEB-INF\lib">
<include name="*.jar"/>
</fileset>
</path>
<javac failonerror="true" debug="off" verbose="2" deprecation="off" classpathref="javac.classpath">               
<src path="${basedir}/folder/fd1"/>                         
</javac>          
<javac failonerror="false" debug="off" verbose="2" deprecation="off" classpathref="javac.classpath">               
<src path="${basedir}/folder/fd1"/>                         
</javac>
</target>

But the problem is that this project may have same
e files in 5 folders, and another may more than 5,
like 20+, then also step to compile it, I think it can
not imagine.As I said, the basic problem is that the class path has to be different for each folder.
So what I want is just compile once, and is there
e any solution to escape the duplicate class error.
And the jikes compile you refered, I don't know how
w to call this task, for jikes is just a binary
file.(how to set parameter in <javac/> in build.xml
used by ant)
Jikes is a compiler from IBM. If you look in the ant docs it tells you how to set it up.

Similar Messages

  • Help for javac task in ant? (urgent!!!!)

    Here I have 5+ folders, ervery has many java source files. And all the java source files in these folders is the same package name, also there may have same file name in different folder. And now I want the javac to compile these files and save the classes file to each own folder.
    folder--fd1
    | |--a1.java (package org.apache.jsp)
    | |--b1.java (package org.apache.jsp)
    | |--c1.java (package org.apache.jsp)
    |---fd2
    | |--a1.java (same file name as in fd1) (package org.apache.jsp)
    | |--b2.java (package org.apache.jsp)
    | |--c2.java (package org.apache.jsp)
    |--
    foler--fd1
    | |--a1.java
    | |--a1.class (also the package is org.apache.jsp, but it store in here.)
    | |--b1.java
    | |--b1.class
    | |--c1.java
    | |--c1.class
    |---fd2
    | |--a1.java (same file name as in fd1)
    | |--a1.class
    | |--b2.java
    | |--b2.class
    | |--c2.java
    | |--c2.class
    |--
    And now I can complete the compile work through 2 steps in up condition, first to compile fd1 folder, and then to compile fd2 folder. For if I just compile with folder(root folder), it will return duplicate class error. How could I do with this?
    below is my javac config in build.xml:
    <target name="compile" >
    <path id="javac.classpath">
    <fileset dir="${tomcat.home}\common\lib">
    <include name="*.jar"/>
    </fileset>
    <fileset dir="${tomcat.home}\server\lib">
    <include name="*.jar"/>
    </fileset>
    <pathelement location="${basedir}\classes" />
    <fileset dir="${basedir}\web\WEB-INF\lib">
    <include name="*.jar"/>
    </fileset>
    </path>
    <javac failonerror="true" debug="off" verbose="2" deprecation="off" classpathref="javac.classpath">
    <src path="${basedir}/folder/fd1"/>
    </javac>
    <javac failonerror="false" debug="off" verbose="2" deprecation="off" classpathref="javac.classpath">
    <src path="${basedir}/folder/fd1"/>
    </javac>
    </target>

    To compile recursively you'll need of these for each directory:
    <target name="compilef1" depends="init">
    <javac srcdir="f1/" destdir="f1/" debug="true" deprecation="true"/>
    </target>
    But, you'll need to set up the build tree correctly before it'll work:
    f1/org/apache/jsp defines the org.apache.jsp package in directory f1, so compiling in f1/ will correctly find other related files.
    Regards,
    Bhaveet

  • Search help for general task list

    Hi,
    I have problem when searching for general task list via classification (in service order, extras>task list selection>direct entry). When I doubleclick a task list, group counter is not copied back in first selection screen; only group has copied. How can I solve this problem?
    Regards,
    Robert

    hi Ashok,
    I've checked classification data for general task list, it's ok. but, I still don't have group counter copied. In other tabs of search help is everything ok.
    - Robert

  • First time user--help for first task

    How do I take 2 pages from a PDF file sent to me, isolate them so I can copy/edit those two pages, and return those 2 pages to sender?

    Hi there,
    My recommendation is for you to follow these steps:
    1) Log into createpdf.acrobat.com and select "Export from PDF" on the right pane.
    2) Select your PDF file, select docx and click Export to export your file to *.docx.
    3) Once the export operation is complete, Download your converted file locally.
    4) Open the downloaded file using MS Word and make your necessary Edits.
    5) Save your edited file.
    6) In createpdf.acrobat.com, click Convert to PDF on the right pane.
    7) Select your edited docx file and convert the file to PDF.
    8) Download the file locally and send it to the appropriate sender using email or using Adobe's SendNow service (https://www.acrobat.com/sendnow/en/home.html).
    I hope this helps.
    Laura.

  • How to build ear files for ADF application using Ant task

    How to build ear files for ADF applications using Ant. The ojdeploy ant task can not find application-level deployment profiles. I am trying to automated build and release for ADF application.
    Any help is highly appreciated.
    Thanks
    Shiva

    Hi Timo
    Thanks for your reply.
    I have successfully created ear file using ojdeploy on jenkins. however when am trying to auto deploy using WLDeploy ant task am getting the following
    error :
    weblogic.application.ModuleException: :oracle.mds.config.MDSConfigurationException:MDS-01335: namespace "/oracle/webcenter/quicklinks/scopedMD" mapped to metadata-store-usage "WebCenterFileMetadataStore" but its definition was not found in MDS configuration
    Please advise how to handle this.
    As am a newbie to ADF, could you please advise if it is possible for the ADF application deployments can be automated for different environments using jenkins due to this MDS dependencies.
    Appreciate your help.
    Thanks
    Shiva

  • [svn] 4001: Adding support for asdoc in flex ant tasks

    Revision: 4001<br />Author:   [email protected]<br />Date:     2008-11-03 13:46:13 -0800 (Mon, 03 Nov 2008)<br /><br />Log Message:<br />-----------<br />Adding support for <asdoc> in flex ant tasks<br /><br />QE Notes: Tests need to be added to the flextasks test suite.<br />Doc Notes: flex tasks documentation should be updated with example for <asdoc> task. <br />Reviewer: Paul<br />Bugs: SDK-9775<br />tests: checkintests<br /><br />Ticket Links:<br />------------<br />    http://bugs.adobe.com/jira/browse/SDK-9775<br /><br />Modified Paths:<br />--------------<br />    flex/sdk/trunk/modules/antTasks/flexTasks-internal.tasks<br />    flex/sdk/trunk/modules/antTasks/flexTasks.tasks<br /><br />Added Paths:<br />-----------<br />    flex/sdk/trunk/modules/antTasks/src/flex/ant/AsDocTask.java

    You should use compiler.library-path to include libraries.
    Try the following
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <project basedir="." default="build" name="Project_name">
    <property environment="env"/>
    <property name="FLEX_HOME" value="C:/Program Files/Flex 3.4"/>
    <property name="APP_ROOT" value="./src"/>
    <property name="Project_name.location" value="../Project_name"/>
    <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
    <target name="build">
    <mxmlc file="${APP_ROOT}/AdminConsole.mxml">
    <source-path path-element="${FLEX_HOME}/frameworks"/>
    <compiler.library-path>
    <include name="${Project_name.location}/src" />
    </compiler.library-path>
    </mxmlc>
    </target>
    </project>
    Although, I don't know what are you planning to include, and whether you should use compiler.library-path for that.

  • Hi my daughter did some changes in the settings,now i am getting voice support for every task i do,i am not able to access anything cause unable to toggle down to the reset option,pls help as to what to do

    hi my daughter did some changes in the setting,now i am getting voice support for every task i am doing,plus cannot toggle between the pages,unable to do the changes as not able to toggle to reset option either,pls help.

    You probably have the Voiceover accessibility feature turned on. It's difficult to navigate as you need to use specific voiceover gestures. The easirest thing to do is connect the phone to iTunes. Select the Summary pane and click the "Configure Universal Access..." button.  In  the window that opens,select "Neither" in the seeing options and click "OK".

  • Need to pass field value as input parameter for a task

    I have the following scenario:
    User opens a task from UWL and sees a UI in which a Quote no. is generated, which is saved in the backend. Next time the user comes to this UI(from the same task in his UWL) he should see the Quote no. generated. Also, the data is fetched from backend by calling BAPI which takes the Quote no. as input, which was generated the first time user visited this UI.
    My concern is how can I store this Quote no. in GP, which was generated the first time, so that user sees the data specific to quote no., as relevant for that task.
    Please help.
    Thanks and Regards
    Aanchal

    Hi Srinivasan,
    Thanks for ur quick response.
    I am explaining my issue further.
    User comes to this UI (first time), Quote no. is generated. User fills some other fields( but does not complete whatever he has to) and saves the data to backend. Now user closes the window (task remains in his UWL), but now when he opens the task, he should see the Quote no. which was generated earlier and also data which he saved(by calling BAPI). How can I get this quote no.?
    Can you please explain what you mean by "expose the quote no. at process level"?
    Thanks and Regards
    Aanchal

  • Custom search help for a custom field in SRM 7

    EDIT: I'm gonna clarify on this thread since my first post wasn't explicative enough... thanks for the patience
    Hi all gurus,
    the question is about a search help in SRM7 but since the task is about abap development, I guess this is the right section to ask for.
    Shortly; every purchase doc in our SRM7 has a custom header table which contains data which are retrieved from the connected backends. In this custom table, the user has the opportunity to add manually a line, and for a specific input field in table, we have to define a search help which should retrieve the appropriate possible values w.r.t. the "target" backend for the document.
    A bit of technical data: say the field is called ZZ_R3_ROLE; it's included in a custom structure ZR7_HEADER_CST_GEN which is itself an append for BBP_PDHCF.
    I defined a Search Help for that field and the corresponding exit FM to manage our task.
    Unfortunately, to retrieve the possible values for the specific backend I need some informations like:
    - the backend on which the document will be distributed;
    - the process type of the document.
    This means that my search help should take into account additional informations that comes from the document I'm processing; I don't know what's the "clean" solution to do this.
    I've seen on an old system (a SAP SRM 3.0) a workaround based on IMPORT/EXPORT ... TO MEMORY ID has been used. Actually, I'd like to find a more elegant solution, if any.
    So... as you can see, I'm absolutely a newbie on the argument, but since I can trigger the search help only from a purchase document (PO, contract) process, I should need at least the GUID of the document to retrieve, for example, what's the target backend for that document in order to provide proper values.
    Any hint/suggestion and in particular, a sketch of code as example is welcome.
    Edited by: Matteo Montalto on Oct 22, 2010 3:01 PM

    Hi,
    into your modify view,
    extract data you need in your search help in an itab (do it into a class do not perform select directly into modify view) and then bind it as value help to your WD element.
    Regards,
    Ivan

  • Get earliest finish date for a task of cProject

    i found this method CL_DPR_TASK GET_SCHEDULE_ATTRIBUTES to retrieve earliest finish date.
    but i don't know how to assign the parameter IR_SCHEDULE_OBJECT to this method.
    could you help me with this?
    if i don't use this class, is there any other way to fetch the earliest finish date for a task of project?
    Edited by: Duan ZZ on Aug 26, 2010 5:11 PM

    Hi,
    Have you passed the correct GUID?
    I have tested it in my system. It returns the required data.
    Regards
    Sejo

  • CL_DPR_TASK  how to get earliest fiish date for a task of cProject

    i found this method CL_DPR_TASK GET_SCHEDULE_ATTRIBUTES to retrieve earliest finish date.
    but i don't know how to assign the parameter IR_SCHEDULE_OBJECT to this method.
    could you help me with this?
    if i don't use this class, is there any other way to fetch the earliest finish date for a task of project?
    Edited by: Duan ZZ on Aug 26, 2010 5:09 PM

    BAPI_BUS2175_GET_DETAIL

  • How to get F4 help for Standard Text Key of a operation based on Order type

    Hi Experts,
      How to get F4 help for Standard Text Key (STK) of a operation based on Order type entered in selection screen. The F4 help should give the STK of related order type. At the same time the F4 help for Task Types based on Notification type. How to acheive the above two. Please provide the table names or any search help name if exists or Function modules...
    Thanks in Advance.
    Regads,
    Bujji

    Hi Guys,
       Any help on this...
    Regards,
    Bujji
    Edited by: Bujji on Dec 22, 2008 12:42 PM
    Edited by: Bujji on Jan 5, 2009 2:00 PM

  • Is there a way to allow setting of "Due Date for All Tasks" to current date in OOB Workflow

    Is there a way to allow setting of "Due Date for All Tasks" to current date in OOB Workflow
    I need to set it today because there are tasks that is needed to be completed on the same day.
    Is there a way without modifying the page/form. like a configuration or something?
    ----------------------- Sharepoint Newbie

    Hi ,
    As Ajeet said,  for implement your requirement, you can change the data validation on the Due data field.
    You can do as the following :
    Open the site with SharePoint Designer 2010
    Click on Workflows on the left launch, then find ‘Approval-SharePoint 2010’, click on it
    On the Forms section, click ‘ReviewApproval_***.xsn’
    Then you can find Due Data for All Tasks, and change the validation
    In addition, if you create an approval workflow with SharePoint Designer, you can use a specific date, it contains hour and minute.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Difference between Due Date for All Tasks and Duration per task in an approval workflow

    Hello,
    I'm starting to read up and learn about approval workflows in Designer 2010.  I am confused by the fields "Due Date for all Tasks" and the "Duration per task".  I understand that the Due date for all Tasks is the date that all
    of the tasks in the workflow must be completed by.  And I understand that the duration means each task has x number of days to complete.
    But I dont know whey we need them both.  If I have the task duration set to two days and there are 3 tasks involved, then wouldn't the due date be 6 days from the start?  Why would I have a due date for all tasks that is completely different than
    the sum of the duration of days for each task? 
    Please help shed some light!

    Hi Michelle,
    Due date for all tasks, this setting specifies the date by which all tasks are due. It’s used for serial and parallel
    task.
    Duration per tasks, this setting specifies the date by which an individual
     task is due, it’s used for serial workflow participants.
    Note, when you create an approval workflow, select task process participants(approvers oob approval workflow), we can also
    select once at a time(serial) or all at once(parallel).
    For more information, see
    http://office.microsoft.com/en-us/sharepoint-server-help/use-an-approval-workflow-HA101793831.aspx
    Best Regards.
    Kelly Chen
    TechNet Community Support

  • Need help for my project(how to call function in ancestor object)

    dear all, i need your help for my project.My problem is stated as follow:
    say i have a class call frameA and frameB, both of them are extend from
    JFrame, frameA structure can be described briefly as follow:
    //frameA.java
    public class frameA extends JFrame{
    private frameB fb;
    public frameA()
    fb=new frameb();
    show();
    public void func()
    JOptionPane.showMessageDialog(null,"OK");
    now, my problem raised, after frameA and fb is created, how can i access the ancestor object(which is frameA) within fb's code,
    what should i add inside frameB? i need the answer urgently......
    thanx a lot!!!
    cheers

    Hi,
    For this kind of problem, I believe you can use the inner class.
    Here's the sample code I hope will help:
    class MyApp{ 
    B bFrame;
    A aFrame;
    class A extends JFrame{
    public void doSomething(){
    bFrame = new B();
    bFrame.doSomething();
    class B extends JFrame{
    public void doSomething(){
    aFrame = new A();
    aFrame.doSomething();
    If you have further question, you can email me your task sample code at [email protected] and I will solve it for you.
    With my best,
    Zike Huang(Jim)

Maybe you are looking for