I have a solution... Everyone should just use JDK 1.5. ;-)

PS Sanjay, you can find out what version a given class was compiled if
you look at the unsigned short integers starting at byte offset 4,
right after 0xCAFEBABE in every class file. See this Javaworld article
for more details, page 2:
http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version.html

Wayne


On 3/10/06, Simon Kitching <[EMAIL PROTECTED]> wrote:
> Hi Sanjay,
>
> Regarding the error you are getting, I would agree with Wayne that it
> looks like you're using a struts jar compiled against java 1.4.
>
> Regarding the rest of your pom, though, it looks like you're trying to
> compile your code to run against java 1.3. I'm not sure it's going to do
> what you want though.
>
> As far as I know, Maven requires java 1.4 to run, so I presume you're
> using java1.4 or 1.5 to run maven. Without setting the "fork" attribute
> for the maven-compiler-plugin, I think the same JVM used to run maven is
> used to compile the code.
>
> I don't know what the <compilerVersion> tag does; if anyone knows please
> say so!
>
> The <target> tag is presumably equivalent to the -target javac option,
> which controls the .class file version, but does NOT affect which java
> core library the code is compiled against. Setting this attribute is
> therefore *not* enough in your case.
>
> I have been trying myself to compile code with a different version of
> java than used to run maven but have not been successful; see my posting
> of yesterday. In particular, I have been trying to use the "executable"
> property of the maven-compiler-plugin to point to a specific JVM
> (together with fork=true of course). From reading the sourcecode of the
> maven-compiler-plugin and the plexus compiler classes this looks like it
> should work but so far I've had no success.
>
> Cheers,
>
> Simon
>
> On Fri, 2006-03-10 at 14:02 -0600, Wayne Fay wrote:
> > I suspect that you are using javax.servlet library which was compiled
> > with JDK 1.4.
> >
> > Download the code and recompile with JDK 1.3 if you must use it along
> > with code that targets 1.3.
> >
> > Wayne
> >
> >
> > On 3/10/06, Sanjay Choudhary <[EMAIL PROTECTED]> wrote:
> > > Hi All,
> > >
> > > I have an application that run's on  JDK 1.3.
> > >
> > > In the POM's I have the following setting
> > >
> > >
> > > <plugin>
> > >
> > > <groupId>org.apache.maven.plugins</groupId>
> > >
> > > <artifactId>maven-compiler-plugin</artifactId>
> > >
> > > <configuration>
> > >
> > > <compilerVersion>1.3</compilerVersion>
> > >
> > > <target>1.3</target>
> > >
> > > <showDeprecation>true</showDeprecation>
> > >
> > > <showWarnings>true</showWarnings>
> > >
> > > </configuration>
> > >
> > > <inherited>true</inherited>
> > >
> > > </plugin>
> > >
> > > Is there anything else I need to do to make it work with JDK 1.3?  If not,
> > > why will I get an error,
> > >
> > > [3/10/06 11:24:10:538 PST] 65795dd9 WebGroup      E SRVE0026E: [Servlet
> > > Error]-[java.lang.StringBuffer: method append&#40;
> > > Ljava/lang/StringBuffer&#59;&#41;Ljava/lang/StringBuffer&#59; not found]:
> > > javax.servlet.jsp.JspException: java.lang.String
> > > Buffer: method append(Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer; 
> > > not
> > > found
> > >        at org.apache.struts.taglib.template.InsertTag.doEndTag(
> > > InsertTag.java:164)
> > >        at org.apache.jsp._index._jspService(_index.java:344)
> > >        at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(
> > > HttpJspBase.java:89)
> > >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >
> > > StringBuffer.append(StringBuffer) is JDK 1.4.
> > >
> > > Please advice,
> > >
> > > Sanjay
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to