Ant run right on eclipse but on prompt dosen't run

Hi
All
I need run this build.xml on prompt.
I have this build.xml on eclipse compiling right, but if i run on promp it dosen't run.
I'm executing so:
ant, where the build.xml is.
Following the build.xml.
<project name="HelloWorld" >
    <property name="src.dir"     value="src"/>
    <property name="build.dir"   value="build"/>
    <property name="classes.dir" value="${build.dir}/classes"/>
    <target name="clean">
        <delete dir="${build.dir}"/>
    </target>
    <target name="compile" >
         <echo> compiling  the java source.</echo>  
        <mkdir dir="${classes.dir}"/>
        <javac srcdir="${src.dir}" destdir="${classes.dir}"/>
    </target>
    <target name="clean-build" depends="clean"/>
</project>Thanks.
Edited by: silvaneto on Apr 15, 2009 6:19 AM
Edited by: silvaneto on Apr 15, 2009 6:20 AM

Something like
<project name="HelloWorld" default="compile" >
silvaneto wrote:I have no experience with ant, ..
ThanksPerhaps you should read an ant tutorial then?

Similar Messages

  • Program runs in eclipse but in command line I need java -cp .

    I thought I understood what the classpath variable was all about. I thought it was the directory where the java standard classes were, namely the bin directory of your Java directory. However I've been using Eclipse for the first time and the programs compile and run fine in Eclipse, but in my command line I need to do java -cp . [compiled class] to make it run. Can somebody explain why? Doesn't java normally look in the current directory for the executing classes?
    Also I just checked out my CLASSPATH variable and I see C:\Program Files\Java\jre1.5.0_04\lib\ext\QTJava.zip which doesn't seem right to me. Can somebody explain what this is all about? I thought when you installed the Java SDK (JDK) it sets your classpath and everything.

    I thought I understood what the classpath variable
    was all about. I thought it was the directory where
    the java standard classes were, namely the bin
    directory of your Java directory.There is nothing correct about this statement. The classpath defines where your classes, packages and JARs are. /bin should be in PATH, and the J2SE standard classes don't need to be referenced in any variable.
    However I've been
    using Eclipse for the first time and the programs
    compile and run fine in Eclipse, but in my command
    line I need to do java -cp . [compiled class] to make
    it run. Can somebody explain why?Because the Eclipse project defines a classpath of its own (see Proprties-> Build Path) and doesn't give a damn about any system variable.
    Doesn't java
    normally look in the current directory for the
    executing classes?No. It looks in the classpath, nowhere else.
    Also I just checked out my CLASSPATH variable and I
    see C:\Program
    Files\Java\jre1.5.0_04\lib\ext\QTJava.zip which
    doesn't seem right to me. Can somebody explain what
    this is all about? Another superfluous setting. Libs in /lib/ext are automatically in the classpath.
    I thought when you installed the
    Java SDK (JDK) it sets your classpath and everything.How would it know where your classes are?

  • Build Error while Running Ant Build File in Eclipse

    I am getting the following error while running the Ant build file in eclipse ,
    Can someone help me on this ?
    Error:
    weblogic.utils.compiler.ToolFailureException: com.bea.xml.XmlException

    You need to add the JAR containing the servlet API in the external JARs for the project.
    Regards,
    Carol.

  • Java code runs normally through Eclipse but gives Encoding error thru cmd

    I am executing the following query given below through Eclipse and cmd in Windows NT enviroment.
    Statement stBMS = ConBMS.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
             String myQuery = "SELECT AL1.APPL_NM, AL1.DATA_CAT_CD, AL1.GEO_NM, AL1.CTRY_CD, AL1.CMPNY_CD, AL1.JOB_NM, AL1.JOB_RUN_TMS, AL1.JOB_CMPLTN_IND FROM BMS.IW_CONTRO AL1 WHERE (AL1.APPL_NM='BCSDM       ' AND AL1.DATA_CAT_CD='CURRLBR     ' AND DATE(AL1.JOB_RUN_TMS) >= CURRENT DATE AND AL1.JOB_CMPLTN_IND='Y')";
    ResultSet rsBMS = stBMS.executeQuery(myQuery);It runs normally through Eclipse but when i run it thru cmd i get the following error:-
    Exception:Encoding not supported!! DB2ConnectionCorrelator: G9339865.ND54.
    01F9C9142526encoding not supported!! DB2ConnectionCorrelator: G9339865.ND54.01F
    9C9142526
    com.ibm.db2.jcc.b.DisconnectException: encoding not supported!! DB2ConnectionCo
    rrelator: G9339865.ND54.01F9C9142526

    Like most IDEs JBuilder too can be configured to not only use several compilers (in fact it can use a lot more than can Eclipse, basically any compiler you want it too rather than just a few built-in ones) and can also be set to accept different language compliance settings for each of them.
    So even if your teacher has a 1.5 compiler installed it doesn't mean JBuilder will use it (it has to be told to use it) nor that his project settings will use 1.5 language compliance.
    If he has a version older than JB 2005 he won't get syntax highlighting and things like that for 1.5 whatever he does, and won't get 1.5 level language features either (as those versions predate 1.5). He can plug in the 1.5 compiler but the IDE will reject the new language features because it simply doesn't recognise them.
    Pre 3.1 Eclipse versions do the same.

  • Native library working in Eclipse but not in command line ...

    I was working on a Nutch project combing CMeCab with the analyzer.
    It uses:
    System.load('CMeCab');
    where the problem occured. I have the file libCMeCab.so in /usr/lib/ and it was working fine inside eclipse.
    But when I complie with ant (by the way I'm not familiar with this great tool, but followed the easy tutorial), and then run everything inside terminal like normal Nutch project. Everything was fine until the index process which uses native library CMeCab to analyze.
    The error was:
    java.io.IOException: Job failed!
    And in the hadoop.log in detail:
    java.lang.UnsatisfiedLinkError: no CMeCab in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
         at java.lang.Runtime.loadLibrary0(Runtime.java:823)
         at java.lang.System.loadLibrary(System.java:1028)
    I didn't have runtime -D option in Eclipse run configuration for library path, and didn't know what was the difference that's causing the trouble. I googled trying hard, but most of the MeCab documentations is in Japanese and merely had the problem I had.
    Please help me.
    Thanks in advance.

    Hello,
    I was working on a Nutch project combing CMeCab with the analyzer.No idea what Nutch and CMeCab are (but apparently this latter has unkempt hair ;o).
    I didn't have runtime -D option in Eclipse run configuration for library path, and didn't know what was the difference that's causing the trouble.I won't know either why it works in Eclipse, but have you tried adding -Djava.library.path=/usr/lib to the command line, to check how it works? If it works, would this be a problem to use this configuration?
    Regards,
    J.

  • Applet Works in Eclipse but not Online?

    I've got everything working in eclipse but now when I uploaded it to unix it wouldn't run. Any ideas? I chmod 664 all the java and class files. It won't print to the TextArea for some reason when I uploaded it.
    Here is my source
    http://www2.hawaii.edu/~akinsey/CD.java
    http://www2.hawaii.edu/~akinsey/CDStorage.java
    http://www2.hawaii.edu/~akinsey/CDStorage.html
    That will all compile and run in eclipse but doesn't work online :(

    If it runs in Eclipse, but not when deployed, the problem is probably classpath or security related. This is why those of us who use Eclipse in real production work, rarely use its builds. I always build with ANT and never run from within Eclipse. I alway use what Eclipse calls an "Externally Launched Server".

  • Ant File Problem in Eclipse

    Hey guys,
    I am having alot of trouble getting a simple ant buildfile to work in eclipse.
    I am following the tutorial on here (the part about ant files):
    http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-93_project_builder.htm
    I have created a simple java project called HelloWorld and created a build file below in a package 'org':
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="HelloWorld" default="Hello" basedir=".">
    <property name="HelloText" value="Hello"/>
        <target name="Hello">
            <echo>${HelloText}</echo>
        </target>
    </project>According to the tutorial, I should get an outline in Eclipse (i use 3.2), etc, etc however I only get problems:
    - Whenever I save the file I get "Save Failed: org/apache/tools/ant/launch/AntMain"
    - When I attempt to add the buildfile to the 'Ant' pane on the right, I get error:
    "failed to parse ant build file"
    If anyone has any advice on how to get a simple ant file like the one above working, it would be so much appreciated!
    Thanks
    Gerry
    ant newbie

    doremifasollatido wrote:
    cotton.m wrote:
    Hey dore! What a pleasant surprise seeing you here.Thanks! Yep, I'm here. Not so late as there. :-P
    Just thought I'd see what was going on around here these days (not that I figured much would change,the more things change...
    but always good to log in and answer a few questions at least now and again).Indeed, very much so.
    PS NR sent me an invite to another job networking site I will respond but I don't think I will be of much help, but I do know who NR is because sometimes he seems to think I won't know though I don't know many other NRs so it's hard to not know. You know. ;)

  • Ant run fails every time; ant cleancompile seems to run fine

    Following both DataExtraction samples, I get snagged on the "ant run" step and don't know where to look for a solution. Here's a snippet of what I type and what results:
    localhost:/opt/adobe/livecycle8/LiveCycle_ES_SDK/samples/Forms/DataExtractionandUpdateDB/b uild # ant run
    Buildfile: build.xml
    run:
    [java] java.lang.IllegalStateException
    [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180)
    [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
    [java] at
    [java] at java.lang.reflect.Method.invoke(Method.java:585)
    [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
    [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
    [java] ... 15 more
    [java] Caused by: java.lang.NoClassDefFoundError: javax/ejb/EJBException
    [java] at com.adobe.idp.dsc.clientsdk.ServiceClientFactory.evaluateMessageDispatcher(ServiceClientF actory.java:512)
    [java] at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:215)
    [java] ... 23 more
    BUILD SUCCESSFUL
    Total time: 0 seconds

    Eureka!
    <br />
    <br />I am still struggling with my linux installation, but my winxp turnkey looks ok on the DataExtractionAndUpdateDB sample finally. One obstacle I had to overcome was already divulged in another post; it just didn't make it here: the first xml processing instruction (<?xml version="1.0" ..="" etc=""?>
    followed by comments on what test-ds.xml does needed to be removed. Following this, the xml file was well formed and could be parsed by the app.
    <br />
    <br />This doesn't fix this thread's specific issue, but I am confident that I can continue eval using winxp for the time being. Hope this helps someone.

  • I have an iPhone 4 on IOS5. I signed up for itunes match. After everything uploaded to the cloud, my songs are messed up. I'll select a song and the title will show with the right art work but a different song will start playing.  Anyone have a solution?

    I have an iPhone 4 on IOS5. I signed up for itunes match. After everything uploaded to the cloud, my songs are messed up. I'll select a song and the title will show with the right art work but a different song will start playing.  Some songs won't play at all even though they do appear in the itunes store. The artwork almost always shows u blank until you turn it to landscape then it will appear. Anyone know what's going on?

    I have found that scrolling through the album list (past albums without art) triggers the progress wheel next to the wifi symbol. You can scroll quickly through the whole collection and then wait! Artwork will appear gradually...
    However, repeat visits to the Music App might initially show no artwork again, but it might spontaneously appear more quickly this time. The bad news is that the whole Music App is now sluggish as ****...

  • How do I change my flash settings? I said I wanted to be prompted about flash wanting to store things on my computer but the prompts are too frequent and annoying!

    How do I change my flash settings? I said I wanted to be prompted about flash wanting to store things on my computer but the prompts are too frequent and annoying!

    New versions of Flash have a panel installed on your system for control of settings.
    In Windows XP, Windows Start > Settings > Control Panel > Flash Player, click on each tab and change the "Ask..." setting. Most likely your prompts are coming from the "Storage" tab. Using any of the "Block..." settings may make Flash inoperative on some sites.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • I had to change my Hard Drive, now I want to work on files in iWeb, but can't access Time Machine before yesterday. The dates are there on the right hand side but are greyed out before yesterday when I changed my HD. How do I access anything from before.

    I had to change my Hard Drive, now I want to work on files in iWeb, but can't access Time Machine before yesterday. The dates are there on the right hand side but are greyed out before yesterday when I changed my HD. How do I access anything from before?

    Start with B5/6 in the 1st linked article.
    Time Machine Troubleshooting
    Time Machine Troubleshooting Problems

  • TS4009 I have followed the steps above but when I get to the screen to select a downgraded option, the  Done button is grayed out and won't let me select a new option. I see a lock up in top right-hand corner, but not sure how to unlock it.

    I have followed the steps above for downgrading iCloud storage options, but when I get to the screen to select a downgraded option, the  Done button is grayed out and won't let me select a new option. I see a lock in top right-hand corner, but not sure where to go to unlock it.

    Choose Apple () menu > System Preferences, then click the iCloud icon.
    Click the Manage button.
    Click Change Storage Plan.
    Click Downgrade Options.
    Enter your Apple ID password, then click Manage.
    Choose your current plan, then click Done.
    (from http://support.apple.com/kb/HT5527 )

  • I can't get my new iPad to record a video I see the video right above camera but it is not active yet I can't touch it to activate it.

    I can't get my new iPad to record a video I see the video right above camera but it is not active yet I can't touch it to activate it.

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased.
     Cheers, Tom

  • I was on facebook and deleted an icon by using the right-click menu but then all my pictures and all profile pictures, could no longer be seen. I was able to view them in Explorer so this is something I did in Firefox. How can I unblock a site?'

    '''I was on facebook and deleted an icon by using the right-click menu but then all my pictures and all profile pictures, could no longer be seen. I was able to view them in Explorer so this is something I did in Firefox. How can I unblock a site?'''

    If you select that right-click context menu entry then you block all images from that domain and not one specific image, so do not use that.
    * Check the exceptions in Tools > Options > Content: Load Images > Exceptions (e.g. sphotos.ak.fbcdn.net)
    You can use these steps to check if images are blocked:
    * Open the web page that has the images missing in a browser tab.
    * Click the website favicon ([[Site Identity Button]]) on the left end of the location bar.
    * Click the "More Information" button to open the "Page Info" window with the Security tab selected (also accessible via "Tools > Page Info").
    * Go to the <i>Media</i> tab of the "Tools > Page Info" window.
    * Select the first image link and scroll down through the list with the Down arrow key.
    * If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • How can I get the picture to show in Photoshop?  The thumbnail image appears in the right side panel but the full image isn't showing at all.

    How can I get the picture to show in Photoshop CS3?  The thumbnail image appears in the right side panel but the full image isn't showing at all.

    What specific information would you need?  The program was working just fine early yesterday morning and than when I came back in the afternoon to edit  some more pictures that is when I wasn't able to see the full image anymore.  It is providing me with all of the editing options as if the picture is there but it is just a blank screen with the thumbnail pic showing in the right panel. 

Maybe you are looking for