You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by delbert <de...@gmail.com> on 2014/04/14 10:07:16 UTC
Maven 3.2.1 and java 1.5?
I need to use java 1.5. But when I run maven 3.2.1 I get:
:~$ mvn --version
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
If I change to java 1.7 it works. I have not been able to find in the
release notes for 3.2.1 that java > 1.5 i s required.
I can use java 5 and maven 3.1.1 just fine.
--
View this message in context: http://maven.40175.n5.nabble.com/Maven-3-2-1-and-java-1-5-tp5791274.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven 3.2.1 and java 1.5?
Posted by Ben Caradoc-Davies <Be...@csiro.au>.
On 14/04/14 16:07, delbert wrote:
> I need to use java 1.5.
Why? Please tell us more.
Is this is the only Java you have, or because you wish to generate
bytecode that can run on Java 5? If the latter, you can configure source
and target versions in the compiler.
It is still a good idea to compile with a genuine Java 5 to catch API
changes (like new exception chaining constructors in Java 6) if you are
targeting Java 5.
Kind regards,
--
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven 3.2.1 and java 1.5?
Posted by Mark Derricutt <ma...@talios.com>.
You could use the maven-tools-chains plugin to make the
maven-compiler-plugin etc. use JDK 1.5 even tho Maven itself is running
with 1.6+.
Do you need to use JDK 1.5 or do you need to compile against 1.5?
On 14 Apr 2014, at 20:13, Ben Caradoc-Davies wrote:
> http://maven.apache.org/download.cgi
> "System Requirements
> JDK Maven 3.2 requires JDK 1.6 or above, while Maven 3.0/3.1 requires
> JDK 1.5 or above (this is to execute Maven - it still allows you to
> build against 1.3 and prior JDK's)"
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven 3.2.1 and java 1.5?
Posted by Ben Caradoc-Davies <Be...@csiro.au>.
http://maven.apache.org/download.cgi
"System Requirements
JDK Maven 3.2 requires JDK 1.6 or above, while Maven 3.0/3.1 requires
JDK 1.5 or above (this is to execute Maven - it still allows you to
build against 1.3 and prior JDK's)"
On 14/04/14 16:07, delbert wrote:
> I need to use java 1.5. But when I run maven 3.2.1 I get:
>
> :~$ mvn --version
> Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
> version number in .class file
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
>
> If I change to java 1.7 it works. I have not been able to find in the
> release notes for 3.2.1 that java > 1.5 i s required.
>
> I can use java 5 and maven 3.1.1 just fine.
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Maven-3-2-1-and-java-1-5-tp5791274.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org