You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Koxkorrita <ko...@laudio.info> on 2008/12/26 17:46:18 UTC
jdk version for compiling. SOS
hello
In my pc i have installed the 1.6_10 jdk.
i must to compile, for generate one war for one 5.0 tomcat that runs into
one 1.4 jdk, my classes.
for this pourpose i make this into one build.xml file:
<javac destdir="${entornoBase}/${classes}"
includes="**/${path}/${filej}.*,**/${filej}.*"
excludes="**/*EJB/*.*,**/**ejb/**/*.*" classpath="${classpath}"
optimize="on" deprecation="on" source="1.4" target="1.6">
<src path="${entornoBase}/${fuentes}"/>
</javac>
but using the options:
optimize="on" deprecation="on" source="1.4" target="1.6">
always appears into my tomcat this:
2008-12-26 17:42:07,483
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR
org.apache.catalina.startup.HostConfig - Exception while expanding web
application archive Goikogane.war
java.lang.UnsupportedClassVersionError:
com/goikogane/servlets/GOIKOInitServlet (Unsupported major.minor version
50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1634)
can you help me for compiling the classes for make it compatible with the
1.4 jdk?
thanks
AW: jdk version for compiling. SOS
Posted by Ja...@rzf.fin-nrw.de.
We had the same problem at work. source|target=1.4 produces the 1.4 bytecode, but maybe having newer classes on the compile classpath produces "wrong" class content (right format but wrong content).
I think the best solution is having an old JDK on the machine and refering to that with
<javac executable="..." fork="true">
Jan
> -----Ursprüngliche Nachricht-----
> Von: Koxkorrita [mailto:koxkorrita@laudio.info]
> Gesendet: Freitag, 26. Dezember 2008 20:12
> An: 'Ant Users List'
> Betreff: RE: jdk version for compiling. SOS
>
> i have made it and appears the same error:
> 2008-12-26 20:11:12,532
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO
> org.apache.catalina.core.StandardHostDeployer - Installing
> web application
> at context path /Goikogane from URL
> file:/srv/www/tomcat5/base/webapps/Goikogane
> 2008-12-26 20:11:12,594
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR
> org.apache.catalina.startup.HostConfig - Exception while expanding web
> application archive Goikogane.war
> java.lang.UnsupportedClassVersionError:
> com/goikogane/servlets/GOIKOInitServlet (Unsupported
> major.minor version
> 50.0)
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.
> java:123)
> at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal
> (WebappClassLo
> ader.java:1634)
>
> -----Mensaje original-----
> De: Peter Reilly [mailto:peter.kitt.reilly@gmail.com]
> Enviado el: viernes, 26 de diciembre de 2008 19:50
> Para: Ant Users List
> Asunto: Re: jdk version for compiling. SOS
>
> You need to set target="1.4" as well as source="1.4".
>
> Peter
>
> On Fri, Dec 26, 2008 at 4:46 PM, Koxkorrita
> <ko...@laudio.info> wrote:
> > hello
> >
> >
> >
> > In my pc i have installed the 1.6_10 jdk.
> >
> > i must to compile, for generate one war for one 5.0 tomcat
> that runs into
> > one 1.4 jdk, my classes.
> >
> > for this pourpose i make this into one build.xml file:
> >
> > <javac destdir="${entornoBase}/${classes}"
> > includes="**/${path}/${filej}.*,**/${filej}.*"
> > excludes="**/*EJB/*.*,**/**ejb/**/*.*" classpath="${classpath}"
> > optimize="on" deprecation="on" source="1.4" target="1.6">
> >
> > <src path="${entornoBase}/${fuentes}"/>
> >
> > </javac>
> >
> >
> >
> > but using the options:
> >
> > optimize="on" deprecation="on" source="1.4" target="1.6">
> >
> > always appears into my tomcat this:
> >
> > 2008-12-26 17:42:07,483
> > [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR
> > org.apache.catalina.startup.HostConfig - Exception while
> expanding web
> > application archive Goikogane.war
> >
> > java.lang.UnsupportedClassVersionError:
> > com/goikogane/servlets/GOIKOInitServlet (Unsupported
> major.minor version
> > 50.0)
> >
> > at java.lang.ClassLoader.defineClass0(Native Method)
> >
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
> >
> > at
> >
> java.security.SecureClassLoader.defineClass(SecureClassLoader.
> java:123)
> >
> > at
> >
> org.apache.catalina.loader.WebappClassLoader.findClassInternal
> (WebappClassLo
> > ader.java:1634)
> >
> >
> >
> > can you help me for compiling the classes for make it
> compatible with the
> > 1.4 jdk?
> >
> >
> >
> > thanks
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: jdk version for compiling. SOS
Posted by Koxkorrita <ko...@laudio.info>.
i have made it and appears the same error:
2008-12-26 20:11:12,532
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO
org.apache.catalina.core.StandardHostDeployer - Installing web application
at context path /Goikogane from URL
file:/srv/www/tomcat5/base/webapps/Goikogane
2008-12-26 20:11:12,594
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR
org.apache.catalina.startup.HostConfig - Exception while expanding web
application archive Goikogane.war
java.lang.UnsupportedClassVersionError:
com/goikogane/servlets/GOIKOInitServlet (Unsupported major.minor version
50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1634)
-----Mensaje original-----
De: Peter Reilly [mailto:peter.kitt.reilly@gmail.com]
Enviado el: viernes, 26 de diciembre de 2008 19:50
Para: Ant Users List
Asunto: Re: jdk version for compiling. SOS
You need to set target="1.4" as well as source="1.4".
Peter
On Fri, Dec 26, 2008 at 4:46 PM, Koxkorrita <ko...@laudio.info> wrote:
> hello
>
>
>
> In my pc i have installed the 1.6_10 jdk.
>
> i must to compile, for generate one war for one 5.0 tomcat that runs into
> one 1.4 jdk, my classes.
>
> for this pourpose i make this into one build.xml file:
>
> <javac destdir="${entornoBase}/${classes}"
> includes="**/${path}/${filej}.*,**/${filej}.*"
> excludes="**/*EJB/*.*,**/**ejb/**/*.*" classpath="${classpath}"
> optimize="on" deprecation="on" source="1.4" target="1.6">
>
> <src path="${entornoBase}/${fuentes}"/>
>
> </javac>
>
>
>
> but using the options:
>
> optimize="on" deprecation="on" source="1.4" target="1.6">
>
> always appears into my tomcat this:
>
> 2008-12-26 17:42:07,483
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR
> org.apache.catalina.startup.HostConfig - Exception while expanding web
> application archive Goikogane.war
>
> java.lang.UnsupportedClassVersionError:
> com/goikogane/servlets/GOIKOInitServlet (Unsupported major.minor version
> 50.0)
>
> at java.lang.ClassLoader.defineClass0(Native Method)
>
> at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
>
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>
> at
>
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
> ader.java:1634)
>
>
>
> can you help me for compiling the classes for make it compatible with the
> 1.4 jdk?
>
>
>
> thanks
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: jdk version for compiling. SOS
Posted by Peter Reilly <pe...@gmail.com>.
You need to set target="1.4" as well as source="1.4".
Peter
On Fri, Dec 26, 2008 at 4:46 PM, Koxkorrita <ko...@laudio.info> wrote:
> hello
>
>
>
> In my pc i have installed the 1.6_10 jdk.
>
> i must to compile, for generate one war for one 5.0 tomcat that runs into
> one 1.4 jdk, my classes.
>
> for this pourpose i make this into one build.xml file:
>
> <javac destdir="${entornoBase}/${classes}"
> includes="**/${path}/${filej}.*,**/${filej}.*"
> excludes="**/*EJB/*.*,**/**ejb/**/*.*" classpath="${classpath}"
> optimize="on" deprecation="on" source="1.4" target="1.6">
>
> <src path="${entornoBase}/${fuentes}"/>
>
> </javac>
>
>
>
> but using the options:
>
> optimize="on" deprecation="on" source="1.4" target="1.6">
>
> always appears into my tomcat this:
>
> 2008-12-26 17:42:07,483
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR
> org.apache.catalina.startup.HostConfig - Exception while expanding web
> application archive Goikogane.war
>
> java.lang.UnsupportedClassVersionError:
> com/goikogane/servlets/GOIKOInitServlet (Unsupported major.minor version
> 50.0)
>
> at java.lang.ClassLoader.defineClass0(Native Method)
>
> at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
>
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>
> at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
> ader.java:1634)
>
>
>
> can you help me for compiling the classes for make it compatible with the
> 1.4 jdk?
>
>
>
> thanks
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org