You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dan Checkoway <dc...@gmail.com> on 2012/01/10 16:12:31 UTC

Java 7 incompatibility?

With Java 6 all is well...

$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

$ ant -version
Apache Ant version 1.6.5 compiled on January 6 2007

...but once I upgrade to Java 7:

$ java -version
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

$ ant -version
Error: Could not find or load main class
org.apache.tools.ant.launch.Launcher

Any advice?

Re: Java 7 incompatibility?

Posted by Donald McLean <dm...@stsci.edu>.
The most likely cause is a classpath problem.

Is the environment still pointing to Java6 jar files?

Try enabling verbose output and see what you get.

Donald

On 1/10/12 10:12 AM, Dan Checkoway wrote:
> With Java 6 all is well...
>
> $ java -version
> java version "1.6.0_26"
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
>
> $ ant -version
> Apache Ant version 1.6.5 compiled on January 6 2007
>
> ...but once I upgrade to Java 7:
>
> $ java -version
> java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
>
> $ ant -version
> Error: Could not find or load main class
> org.apache.tools.ant.launch.Launcher
>
> Any advice?
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org