Bug 53347 - <javac> fails by default on JDK 8
Summary: <javac> fails by default on JDK 8
Status: RESOLVED WORKSFORME
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.8.3
Hardware: PC Linux
: P2 major (vote)
Target Milestone: 1.9.0
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-01 19:11 UTC by Jesse Glick
Modified: 2017-04-25 09:39 UTC (History)
2 users (show)



Attachments
Java8-Sample: Sourcecode (883 bytes, text/x-java-source)
2015-04-23 06:24 UTC, Jan Mat
Details
Java8-Sample: Buildfile (682 bytes, text/xml)
2015-04-23 06:26 UTC, Jan Mat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2012-06-01 19:11:24 UTC
Revision 1236803 (in 1.8.3) added some JDK 8 support. Unfortunately running <javac> by default fails with this error:

  Class not found: javac1.8

Workaround is to pass -Dbuild.compiler=javac1.7.
Comment 1 Jesse Glick 2012-06-01 19:19:13 UTC
Committed revision 1345316.
Comment 2 Martin Gainty 2015-04-22 22:52:04 UTC
Apache Ant(TM) version 1.9.2 compiled on July 8 2013

javac 1.8.0_40

java.exe -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

Not fixed ..ANT does not work with JDK 1.8
M-
Comment 3 Jan Mat 2015-04-23 06:24:11 UTC
Created attachment 32680 [details]
Java8-Sample: Sourcecode
Comment 4 Jan Mat 2015-04-23 06:26:09 UTC
Created attachment 32681 [details]
Java8-Sample: Buildfile

I did an example which works for me.

Ant: 1.9.4
Java: 1.8.0-ea (I know, I should update ....)


Buildfile: C:\temp\ant-test\build.xml
   [delete] Deleting directory C:\temp\ant-test\build
    [mkdir] Created dir: C:\temp\ant-test\build\classes
     [echo] Java-Home: C:\seu\jdk1.8.0_b87\jre
     [echo] Java-Version: 1.8.0-ea
    [javac] Compiling 1 source file to C:\temp\ant-test\build\classes
--> wait for the swing gui
--> and click on the button
     [java] Click Detected by Lambda Listner
     [java] Click Detected by Anon Class

BUILD SUCCESSFUL
Total time: 7 seconds