Problem in compiling with ant?

Hi,
I have problem with compiling using ant ..i have build file...and properly place directories.......
C:/>ant build
It's giving an error as "Exception in thread "main" java.lang.NoClassDefFoundError: build"
can any one help me to solve this problem

Cross-Post:
http://forum.java.sun.com/thread.jspa?threadID=589924&tstart=0

Similar Messages

  • Problem in compile with JDeveloper

    Compile with JDeveloper failded if the class didn't implement the abstract method of it's super abstract class. But it is ok wiht other IDE(VisualCafe, Eclipse, JBuilder...).
    It seems that JDeveloper is more strict than other IDEs.
    Anyone can tell me how to avoid this error? TIA.

    I've found out the reason.
    JDeveloper will try to compile all the source files the project used even they're not added into the project.
    I have ClassA extend abstract ClassB, and ClassB extend abstract ClassC and implement the abstract methods of ClassC, they can all be compiled. And then I got a wrong source file of classB which didn't has the methods. Maybe I've kept this wrong source file for a long time but didn't get any trouble until I began to use JDeveloper and got the error.
    Since I didn't add ClassB into the project and classB.class didn't changed. So I didn't noticed that a wrong source file caused the problem.
    Thank you! :-)

  • Codepage problem when compiling with fastjavac

    Hi,
    I'm getting the following warnings when compiling with fastjavac:
    fastjavac: warning: Can't find codepage for "Cp1250" encoding.
    fastjavac: warning: Use default ANSI codepage.
    2 warnings
    How could I suppress these warnings?
    Thanks in advance

    I think you are posting it on the wrong Forum. This is for Forte 4GL not Forte for Java.

  • Problem in compiling with -g option

    I am using forte5.1 compiler. While compiling my whole source code with -g option, for some of the files, the compilation is successfully but for some files I am getting en error as ">> Assertion (../link/dbg_stcomm.cc, line 271) while processing srsCallbacks.C at line 0. Error code 1. make:Fatal error". If I try to compile the whole source code without -g option my whole compilation is successfull. I have downloaded all the required patches for this. Previously I was using compiler 5.0 and I was not getting any error with -g option. Can u just tell me why am I facing this problem specifically with forte5.1 and not with 5.0. How can I resolve this problem so as to compile the whole source code with -g option?

    Hi,
    I think you will need patch:
    Patch-ID# 109490-01
    Synopsis: C++ 5.1: Patch for Forte Development 6 C++ compiler
    As it appears that you are hitting bug id # 4312608
    "Assertion: (../links/dbg_stcomm.cc, line 271)"
    Can you confirm whether you are having this patch by doing:
    "CC -V" or "showrev -p"
    Thanks,
    Gopinath.
    Sun - DTS.

  • Manifest problem in compiling through ant (csc)

    Hi All,
    I have been trying to compile reports in Dot Net 2003 using ant script (by calling csc). But after compilation, when I try to see any report, I get the message - Unable to find the report in the manifest resources...-. I checked the generted DLL through ildasm.exe and found that the manifest does not have complete path with the rpt file as a namespace, where as the corresponding .cs file has complete path as namespace. For example, if report is present under:
    Project - Sales
    Folder - SalesReports
    Sub Folder - reports
    Report (present under sub folder) - SalesTrack.rpt
    then the namespace for .cs file is SalesReport.reports, but for the report file, it is just SalesTrack.rpt. But if the same report is compiled in DotNet studio, then the namespace is properly attached as SalesReports.reports.
    Is there any way to attach SalesReports.reports with the report name?
    Regards,
    Manish

    try copying the Csc.exe command line from the Output window when building in the IDE to see what you may be missing.

  • Compiling with ant.

    Hello all,
    I wonder why I´m having always this error:
    Error: Unable to locate specified base class
    'mx.core.Application'
    when i compile my application via ant by using an exec task:
    <exec executable="${flex.mxmlc}" failonerror="true">
    <arg line="${src.dir}/Matsplayer.mxml" />
    <arg line="-output ${bin.dir}/${locale}/Matsplayer.swf"
    />
    <arg line="-actionscript-file-encoding UTF-8" />
    <arg line="-locale ${locale}"/>
    <arg line="-allow-source-path-overlap=true"/>
    <arg line="-library-path
    ${FLEX_HOME}/frameworks/${locale.dir}/
    {locale}" />
    </exec>
    In the other hand, If i use mxmlc task, the app compiles
    correctly:
    <mxmlc file="${src.dir}/matsplayer.mxml"
    output="${bin.dir}/${locale}/Matsplayer.swf"
    actionscript-file-encoding="UTF-8"
    locale="${locale}"
    allow-source-path-overlap="true"
    keep-generated-actionscript="true">
    <compiler.library-path dir="${FLEX_HOME}/frameworks"
    append="true">
    <include name="${locale.dir}/{locale}" />
    </compiler.library-path>
    <default-size width="1024" height="768" />
    </mxmlc>
    The problem is that I have to use a exec task, since I will
    have to
    add some RSL dynamically, and the directive
    -runtime-shared-libraries
    is not implemented for mxmlc task, so I will make it via exec
    from a
    custom ant task.
    Any idea???
    TIA.

    I have the same problem. Even If I have something like this.
    <javac debug="on" debuglevel="lines,vars,source" ... />

  • Runtime exception with ADG when compiled with ANT

    Hi,
    We are using Advanced Data Grid in our project and it compiles and produces a correct SWF file when compiled using the licensed FlexBuilder. This work fine for the development environment, but for the testing and staging environments we use ANT to automate the build process of both Flex and Java components.
    When the swf is built using ANT, we get a runtime exception when the page containing the ADG is accessed in web browser. The exception is
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
    at mx.controls::AdvancedDataGridBaseEx/getSeparator()
    at mx.controls::AdvancedDataGridBaseEx/createHeaderSeparators()
    at mx.controls::AdvancedDataGrid/createHeaderSeparators()
    at mx.controls::AdvancedDataGridBaseEx/drawSeparators()
    at mx.controls::AdvancedDataGridBaseEx/updateDisplayList()
    at mx.controls::AdvancedDataGrid/updateDisplayList()
    at mx.controls.listClasses::AdvancedListBase/validateDisplayList()
    at mx.managers::LayoutManager/validateDisplayList()
    at mx.managers::LayoutManager/doPhasedInstantiation()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()
    at mx.core::UIComponent/callLaterDispatcher()
    Can you please suggest me how to fix this error?
    Thanks in advance.

    On forums of slackware there was a reference towards the program "free" which is being executed from /usr/bin/free whereas the program on slcakware resides in /bin/free or vice versa. Creating a ymlink should solve the problem. Dunnow (yet) if that works
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Heather Connery ([email protected]):
    I have installed Oracle 8.1.7 on Red Hat 6.2.
    When I attempt to create a database using dbassist i get an exception during event dispatching:
    java.lang.NumberFormatException 41%
    at java.lang.RuntimeException.<init>(Compiled Code)
    etc.......
    Does anyone know if this is a JRE bug? Any ideas what could be wrong here?<HR></BLOCKQUOTE>
    null

  • Compiling with ant--getting 'Unknown Source' in my exceptions

    I am compiling using this ant stanza:
         <property name="src" value="src"/>
         <property name="resources" value="src/resources"/>
         <property name="target" value="target"/>
        <target name="compile">
               <javac sourcepath="" srcdir="${src}"
                      destdir="${target}"  compiler="javac1.5" debuglevel="lines,source">
                    <include name="**/*.java"/>
               </javac>   
             <copy todir="${target}/resources">
                 <fileset dir="${resources}"/>
               </copy>
        </target> Note the debuglevel="lines,source" specification. But I'm still getting 'Unknown Source' in exceptions in this code. Yes, I've done a clean compile. Yes, I checked, and it's recreating the files and the jars. I'm reasonably sure there aren't any other build.xml files I could be running.
    I don't see why this wouldn't work.

    I have the same problem. Even If I have something like this.
    <javac debug="on" debuglevel="lines,vars,source" ... />

  • Problem in compilation with very large number of method parameters

    I have java file which I created using WSDL2Java. Since the actual WSDL has a complex type with a large number of elements(around 600) in it, Consequently the resulting java file(from WSDL2Java) has a method that takes 600 parameters of various types. When I try to compile it using javac at command prompt, it says "Too many parameters" and doesn't compile. The same is compiling successfully using JBuilder X . The only way I could compile successfully at command prompt is by reducing the number of parameters to around 250 but unfortunately that it's not a workable solution. Does Sun specify any upper bound on number of parameters that can be passed to a method?

    ... a method that takes 600 parameters ...Not compatible with the spec, see Method Descriptors.
    When I try to compile it using javac at
    command prompt, it says "Too many parameters" and
    doesn't compile.As it should.
    The same is compiling successfully using JBuilder X .If JBuilder produces a class file, that class file may very well be invalid.
    The only way I could compile
    successfully at command prompt is by reducing the
    number of parameters to around 250Which is what the spec says.
    but unfortunately that it's not a workable solution.Pass an array of objects - an array is just one object.
    Does Sun specify
    any upper bound on number of parameters that can be
    passed to a method?Yes.

  • Compile with ant...

    Hi guys,
    i'm a newbie user of java...
    i'm a question for you.
    Can you explain me simply how configure apache ant and how build a web.xml in the directory prog?
    Thanks very much,i've read documentation but i'm bit confused...

    get the ant package from ant.apache.org either a binary distribution or source code distribution.
    add <apacheantfolder>/bin in your classpath.
    write a build.xml in your prog directory and in the command prompt
    change the directory to your prog directory and give the command ant <target-name>
    you can use IDE say netbeans or eclipse for web.xml
    The format for web.xml is
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    Place this web.xml in your <progdirectory>/WEB-INF/

  • Help with Compiling with ant

    Hi,
    I have a build.xml like this in current directory:
    <?xml version="1.0"?>
    <!-- Build file for our first application -->
    <project name="Ant test project" default="build" basedir=".">
    <target name="build" >
    <javac srcdir="src" destdir="build/src" debug="true"
    includes="**/*.java"
    />
    </target>
    </project>
    There are a ".\src\test1.java" and a ".\build\src\".
    When I type
    ant
    I got this message:
    Buildfile: build.xml
    BUILD SUCCESSFUL
    Total time 0 seconds
    But no test1.class was generated in the destination dir.
    What is wrong? Please help. Thank you in advance.
    myao1

    Delete the original *.class, stupid!

  • How to compile swf with ANT en ASC 2.0?

    He All,
    I used to compile a swf in Flash builder with this antscript below. But mxmlc in not supported anymore. Any idea how to compile the swf with ASC 2.0?
    <target name="compile.apple" depends="clean.apple">
      <echo message="Compiling swf"/>
      <mxmlc file="${app.projectfile}" output="${app.rootfile}" optimize="true" configname="airmobile" debug="false">
      <load-config filename="${app.rootdir}/resources/ant/build.config"/>
      <source-path path-element="${flex.sdkPath}/frameworks"/>
      <source-path path-element="${app.sourcedir}"/>
      <source-path path-element="${app.rootdir}/libs"/>
      <static-link-runtime-shared-libraries/>
      <compiler.library-path dir="${flex.sdkPath}/frameworks" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      <arg line="-swf-version=17" />
      <arg line="-define=CONFIG::debug,false" />
      <arg line="-define=CONFIG::device,true" />
      <arg line="-define=CONFIG::local.false" />
      <compiler.library-path dir="${app.rootdir}" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      </mxmlc>
      </target>

    He Peter,
    Thanks for your reply. I've made some steps, but still no perfect solution. I've managed to compile a swf with ant using only the AIR SDK.
    But, check these results
    - Compiled using Flash Builder release : 455 kb
    - Compiled with ant using mxmlc : 104 kb
    - Compiled with ant using compc : 139 kb
    Can you provide us an example, how to compile a swf using ant. For example, with an AIR mobile project.
    Thanks Peter.
    Tim.

  • Compile AIR application with Ant (WindowedApplication could not be found)

    I'm trying to compile my AIR application with Ant, using the mxmlc Ant Task. It seems to compile fine, and I get a .swf, but when I try to run it with ADL, I get the message "Class mx.core::WindowedApplication could not be found." It looks like the AIR libraries aren't being included properly.
    Here's my mxmlc task:
    Class mx.core::WindowedApplication could not be found.
    <mxmlc
         file="${MAIN_MXML}"
         output="${DEPLOY_DIR}/MyApp.swf"
         compatibility-version="3"
         locale="en_US"
         static-rsls="true"
         debug="${DEBUG_FLAG}"
         optimize="true"
         link-report="${DEPLOY_DIR}/report.xml"
         configname="air">
         <load-config filename="${FLEX_HOME}/frameworks/air-config.xml" />
         <library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
              <include name="*.swc" />
         </library-path>
         <library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
              <include name="*.swc" />
         </library-path>
         <library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
              <include name="{locale}" />
         </library-path>
         <source-path path-element="${SRC_DIR}" />
    </mxmlc>
    Any idea why this is happening? I've tried not including the load-config section and not including the library paths, but it's always the same result - it can't find WindowedApplication.
    Thanks!

    Hi, Guys!
    I ran into the same problem when i tried to write an ant-script to compile the asDocs for my project.
    After reading shades post i added the air-config (This resolved the WindowApplication couldn't be found error, because it adds all the air libs i guess)
    but lead to the problem that the flex vector-class wasn't found. As Vector is flashplayer 10.0.0 i also
    used the target-player parameter (This fixed that nicely).
    But now i got the problem that i get lots of this error msgs: DepartmentItemRendererClass.as(11):
    Error: The private attribute may be used only on class property definitions.
    I guess the problem now is that ant doesn't understand that the AS-Classes producing that errors are not used as
    standalone-classes. To divide my mxml and AS-Code i import external AS-Classes to my MXML
    like that <mx:Script source="ascodeClass.as" />
    Is there a solution allowing me to use this pattern and still compile my asDoc with ant?
    It confuses me a little, because Ant-Scripts worked to compile the project.
    Thanks in advance!
    Florian
    My Ant-Script producing that error:
    <project name="Red bull BPT 2.0: Generate ASDoc" basedir=".">
        <description>
           Creates the ASDoc for Red Bull BPT 2.0
        </description>
        <property file="FlexbuilderASDocAntTask.properties" />
        <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
        <target name="cleanAndCreateASDoc"
                depends="cleanASDoc, compileASDoc"
                description="Cleans and creates Actionscript-Documentation"
                />
            <!-- Delete the existing output folder and files and then regenerate the output folder -->
                <target name="cleanASDoc">
                    <echo>Deleting ASDoc Directory...</echo>
                        <!--Delete the folder specified for the Asdoc.dir variable-->
                        <delete dir="${Asdoc.dir}" failOnError="false" includeEmptyDirs="true" />
                        <echo>Deleted ASDoc Directory</echo>
                        <echo>Creating ASDoc Directory...</echo>
                        <!--Creates the folder specified for the Asdoc.dir variable-->
                        <mkdir dir="${Asdoc.dir}" />
                    <echo>Created ASDoc Directory</echo>
                </target>
            <!-- Run the ASDoc executable and generate the ASDocs to the new output folder -->
                <target name="compileASDoc">
                    <echo>ASDoc Compiling...</echo>
                        <exec executable="${AsDocs.executable}" failonerror="true">
                        <!--THIS SEEMS TO SOLVE THE WINDOWEDAPPLICATION AND FOLLOWING VECTOR ERROR -->   
                            <arg line="-load-config ${FLEX_HOME}/frameworks/air-config.xml" />
                            <arg line="-target-player 10.0.0" />
                        <!--THIS SEEMS TO SOLVE THE WINDOWEDAPPLICATION AND FOLLOWING VECTOR ERROR -->
                        <!--Main title for the top of all ASDoc pages-->
                            <arg line="-main-title '${Main.title}'" />
                        <!--Prefix Title of the window-->
                            <arg line="-window-title '${Window.title}'" />
                        <!--Defines the output directory for the ASDoc-Files-->
                            <arg line="-output '${Asdoc.dir}'" />
                        <!--Footer added to each ASDoc page-->
                            <arg line="-footer '${Footer.text}'" />
                        <!--Adding the source folders the ASDoc should be created from (Start)-->
                            <arg line="-doc-sources '${ModuleBaseDir}/source'" />
                        <!--Adding the source folders the ASDoc should be created from (End)-->
                        <!--Adding the folders for external Libraries needed to compile the application(Start)-->
                            <arg line="-external-library-path '${ModuleBaseDir}/libs'" />
                        <!--Adding the folders for external Libraries needed to compile the application(End)-->
                        </exec>
                    <echo>ASDoc Compile Complete!</echo>
        </target>
    </project>

  • Compiling Flash Builder Projects with ant - error

    I'm fairly new to FlashBuilder as well as using ant to build projects.
    I'm working on a project in FlashBuilder 4.5. I'm using a 3rd party SWC that contains an alchemy-compiled C application in the SWC. Building my entire project within FlashBuilder is working fine. However, due to other parts of the project (not imported into FlashBuilder) I need to build with ant on occasion.
    The Class specific to the C app within the SWC is throwing errors when building with ant - it says it can not find the source. I had one recommendation to look into adding/editing something within the build.xml file, but I don't know what that addition/edit would be.
    Any help appreciated.

    Apparently related to switching workspaces... the error log identifies a path to an old workspace I changed out of weeks ago. I created a new workspace and moved the project (just the source, etc, not the settings) into it. been running fine for a while now... though funny how this problem didn't show up until yesterday.

  • Problem building with ant

    Hi all,
    For some reason i get the following error message when trying to build any of the code in the j2ee tutorial.
    C:\WINDOWS\system32\ntvdm.exe
    Error while setting up environment for the application. Choose 'close' to terminate the application
    If anyone has any ideas as to why this happens, any help would be much appreciated.
    thanks

    i'm using windows xp pro. i have actually sorted that problem out by replacing ant 1.3 with ant 1.5
    I now have another error message. When i try to run the application client with the foolowing command:
    C:\forte4j\j2sdkee1.3\bin>runclient client \examples\ears\SavingsAccountApp.ear -name SavingsAccountClient -textauth
    I get the following
    Initiating login ...
    Username = null
    Enter Username:guest
    Enter Password:guest123
    Binding name:`java:comp/env/ejb/SimpleSavingsAccount`
    Application threw an exception:java.lang.NoClassDefFoundError: SavingsAccountHome
    Unbinding name:`java:comp/env/ejb/SimpleSavingsAccount`
    Not sure why i am getting the exception.

Maybe you are looking for