[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

java error

I have getting used to the Ant deployment tool and in the process something went wrong.  I get the following error

C:\dev\AntTest>ant
java.lang.InstantiationException: org.apache.tools.ant.Main
      at java.lang.Class.newInstance0(Class.java:293)
      at java.lang.Class.newInstance(Class.java:261)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:195)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
C:\dev\AndTest>

I never used to get this error, what is goin on here.  I tried reinstalling and still get the error.
0
benk-master-flash
Asked:
benk-master-flash
1 Solution
 
rsripracCommented:
Hello,

There might be some path setting issues, have you read:

http://forum.java.sun.com/thread.jsp?forum=7&thread=485924&tstart=30&trange=15
0
 
benk-master-flashAuthor Commented:
I haven't read it.  if the path is to a directory or traverses a directory with spaces in the name is that ok?  In otherwords should it be a problem if ANT is in C:\Program Files\Apache Software Foundation\apache-ant-1.6.2
and that is part of the path, or does the path then need to be in quotations?
0
 
MogalManicCommented:
I've had problems using ant with spaces in the name.  You will have to quote all your paths.  I finally gave up and just moved ALL of my java stuff out of c:\program files into c:\java
0
 
arataniCommented:
Yeah, I would just put ant into a directory like,

c:\ant

And put java into a directory like,

c:\java

take care and beset of luck

aj
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now