I want to compile jdk files in order to include debug infromation.
I'd like to use ant, because it's included in my NetBeans environement, so i've done the following:
<?xml version="1.0" encoding="UTF-8"?> <project name="CompileJDK" default="default" basedir="."> <target name="default"> <javac srcdir="." destdir="jdkwd" debug="on" /> </target> </project>
This leads to 100 compilation errors such as:
[javac] C:\jdkdebug\java\awt\Window.java:196: cannot find symbol
[javac] symbol : class IdentityArrayList
[javac] location: class java.awt.Window
[javac] private static final IdentityArrayList<Window> allWindows = new IdentityArrayList<Window>();
I have just one JDK installed on my machine, so i don't know why it does not resolve all this references.
UPDATE: The majority of these unresolved references belongs to the package:
sun.awt.util
The question now is corrected to: where are the missing jdk files?
Ant Javac task is used to compile Java source file. It scans source and destination directory to compile the source file. It only compiles if either . class is not present or .
Ant is a Java-based build tool created as part of the Apache open-source project. You can think of it as a Java version of make. Ant scripts have a structure and are written in XML. Similar to make, Ant targets can depend on other targets. For example, Ant is used in the context of plug-in development in the build.
Building the JDK itself is a complex process and is not achievable by a simple javac
call wrapped inside an ant
project.
You should look at the OpenJDK Build README to get instructions on how to build for your platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With