• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Netbeans Ant Error

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey everyone,

I have a Java SE 6 project I built using Netbeans 6.1. Today Netbeans told me it had some updates, so I installed them. One of them was for Ant.

Now when I try to build my project I get the following:

ERROR - Ant is misconfigured and cannot be run.
java.lang.ClassNotFoundException: org.apache.tools.ant.input.InputHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.apache.tools.ant.module.bridge.AuxClassLoader.findClass(AuxClassLoader.java:85)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.tools.ant.module.bridge.AntBridge.createAntInstance(AntBridge.java:283)
at org.apache.tools.ant.module.bridge.AntBridge.getAntInstance(AntBridge.java:264)
at org.apache.tools.ant.module.bridge.AntBridge.getInterface(AntBridge.java:253)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)



I'm not sure what the issue is, does anyone have any suggestions?

Thanks.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Jon,

The same problem happened to me. I tried to uninstall and reinstall Ant (in Tools/Plugins/Installed) to no avail.
What worked for me was doing a search for "ant.jar" on my Netbeans 6.1 install folder ... which returned: "C:\Program Files\NetBeans 6.1\java2\update\backup\netbeans\ant\lib" - note that it's the backup folder from the update that screwed everything up - Then you go to "Tools/Options/Miscellaneous" and look if the "Ant Home" field is empty - it was for me - if it is empty, you'll have to add the path you found in your above search, minus the "lib" folder ... hence, in my case I copied the following path:"C:\Program Files\NetBeans 6.1\java2\update\backup\netbeans\ant", and IT WORKED ;o)
Good luck,
Damien.
 
Jon Parise
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ended up just uninstalling and reinstalling all of Netbeans...

I will think twice before clicking the update button again. Thanks for the info.

Everything is working again for now.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Damien Bertot:
Hey Jon,

The same problem happened to me. I tried to uninstall and reinstall Ant (in Tools/Plugins/Installed) to no avail.
What worked for me was doing a search for "ant.jar" on my Netbeans 6.1 install folder ... which returned: "C:\Program Files\NetBeans 6.1\java2\update\backup\netbeans\ant\lib" - note that it's the backup folder from the update that screwed everything up - Then you go to "Tools/Options/Miscellaneous" and look if the "Ant Home" field is empty - it was for me - if it is empty, you'll have to add the path you found in your above search, minus the "lib" folder ... hence, in my case I copied the following path:"C:\Program Files\NetBeans 6.1\java2\update\backup\netbeans\ant", and IT WORKED ;o)
Good luck,
Damien.



Thank you Damien. This worked for me also.
[ November 10, 2008: Message edited by: Chaitanya Boyapati ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic