Bug 53601 - tomcat8 build fails with jdk1.6
tomcat8 build fails with jdk1.6
Status: RESOLVED INVALID
Product: Tomcat 7
Classification: Unclassified
Component: Documentation
trunk
PC All
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-07-25 11:42 UTC by Mark Struberg
Modified: 2012-08-11 17:26 UTC (History)
0 users



Attachments
patch to JDK section for java 1.7 (621 bytes, patch)
2012-08-03 11:35 UTC, Brian Burch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Struberg 2012-07-25 11:42:53 UTC
Currently tomcat7 can only be build with jdk1.7. 

That might become a problem as Servlet-3.0 mandatory requires java6 as environment.
Comment 1 Konstantin Kolinko 2012-07-25 11:55:08 UTC
You are wrong.

1). It is true that Tomcat trunk (aka Tomcat 8) builds only with jdk1.7.
It is as intended. It is expected to implement the Servlet 3.1 specification.

2). Tomcat 7 builds with jdk1.6 and this status quo has not changed.

Anyway your report noticeably lack of details. You should ask on the mailing list first, before playing around with Bugzilla.
Comment 2 Brian Burch 2012-08-03 11:33:56 UTC
I thought I would step through the latest trunk BUILDING.TXT instructions because I haven't updated my sandbox for at least a month.


Apache Ant(TM) version 1.8.2 compiled on December 3 2011
Trying the default build file: build.xml
Buildfile: /home/brian/sandboxApache/tomcat8/trunk/build.xml
Detected Java version: 1.6 in: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Detected OS: Linux

compile:
    [javac] Compiling 307 source files to /home/brian/sandboxApache/tomcat8/trunk/output/classes
    [javac] javac: invalid target release: 1.7
    [javac] Usage: javac <options> <source files>
    [javac] use -help for a list of possible options

BUILD FAILED

I wondered whether it is still necessary to tell people how to get a JDK...
if they haven't got one already, and aren't familiar with building complex projects, they probably shouldn't be encouraged to start building tomcat from the trunk! In the end, I thought the best compromise would be to just reference a couple of popular JDKs - we don't want to seem partisan, but equally don't want to get dragged into a debate about which is "best".

It might be helpful to list the JDKs that are used to build and test the production releases, but I don't know what they are.

I will attach a patch for a trivial change, which will hopefully avoid this kind of confusion in future!
Comment 3 Brian Burch 2012-08-03 11:35:00 UTC
Created attachment 29160 [details]
patch to JDK section for java 1.7
Comment 4 Mark Thomas 2012-08-07 21:46:51 UTC
trunk != 7.0.x/trunk hence closing this as INVALID. Maybe we need to start an 8.0.x BZ project for 8.0.x specific issues.

I have updated the building instructions for trunk and also included a reference to OpenJDK and other JDK vendors although on this occasion I did not use the provided patch.
Comment 5 Konstantin Kolinko 2012-08-11 17:26:22 UTC
Changed Summary to align with the actual issue.

I updated Tomcat 7 docs as well, 0. It will be in 7.0.30. Thank you for reporting this documentation inconsistency.