Results 1 to 6 of 6
  1. #1
    MGeorge's Avatar
    MGeorge is offline Aging Hacker
    Join Date
    Sep 2014
    Location
    East (San Francisco) Bay, California, USA
    Posts
    20
    Rep Power
    0

    Default Unable to build jdk1.8.0_45 from src.zip contained therein

    I found (admittedly somewhat archaic) instructions for building the jdk at
    Enabling debugging inside JRE classes and gave it a try.

    After unzipping the source bundle from my %JAVA_HOME% I try compiling
    and am faced with 100 warnings (oh well...) and 100 errors, mostly for
    package ... does not exist. I checked lib\*.jar and jre\lib\*.jar for
    sun.reflect.misc.ReflectUtil and came up empty.

    Has anyone outside of Oracle ever built this successfully? Does anyone
    know of more up-to-date instructions?

    Complete list of errors follows; warnings have been filtered out:

    Java Code:
    .\org\omg\CORBA\ORB.java:39: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^ 
    .\java\lang\Class.java:72: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\io\ObjectStreamField.java:31: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\util\Locale.java:62: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleProviderAdapter;
                                   ^
    .\java\util\Locale.java:63: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleResources;
                                   ^
    .\java\util\Locale.java:64: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleServiceProviderPool;
                                   ^
    .\java\util\Locale.java:65: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.ResourceBundleBasedAdapter;
                                   ^
    .\java\util\Properties.java:40: error: package sun.util.spi does not exist
    import sun.util.spi.XmlPropertiesProvider;
                       ^
    .\java\awt\Container.java:52: error: package sun.util.logging does not exist
    import sun.util.logging.PlatformLogger;
                           ^
    .\java\awt\Component.java:81: error: package sun.java2d.pipe.hw does not exist
    import sun.java2d.pipe.hw.ExtendedBufferCapabilities;
                             ^
    .\java\awt\Component.java:82: error: package sun.java2d.pipe.hw.ExtendedBufferCapabilities does not exist
    import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.*;
                                                               ^
    .\java\awt\Component.java:85: error: package sun.util.logging does not exist
    import sun.util.logging.PlatformLogger;
                           ^
    .\java\lang\ClassLoader.java:60: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\io\ObjectStreamClass.java:55: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\io\ObjectInputStream.java:44: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\io\ObjectOutputStream.java:39: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\awt\Container.java:92: error: cannot find symbol
        private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Container");
                             ^
      symbol:   class PlatformLogger
      location: class Container
    .\java\awt\Container.java:93: error: cannot find symbol
        private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Container");
                             ^
      symbol:   class PlatformLogger
      location: class Container
    .\java\awt\Container.java:208: error: cannot find symbol
        private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Container");
                             ^
      symbol:   class PlatformLogger
      location: class Container
    .\java\awt\Component.java:190: error: cannot find symbol
        private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Component");
                             ^
      symbol:   class PlatformLogger
      location: class Component
    .\java\awt\Component.java:191: error: cannot find symbol
        private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Component");
                             ^
      symbol:   class PlatformLogger
      location: class Component
    .\java\awt\Component.java:192: error: cannot find symbol
        private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.Component");
                             ^
      symbol:   class PlatformLogger
      location: class Component
    .\java\awt\Component.java:193: error: cannot find symbol
        private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Component");
                             ^
      symbol:   class PlatformLogger
      location: class Component
    .\java\awt\image\ColorModel.java:31: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.CMSManager;
                         ^
    .\java\awt\image\ColorModel.java:32: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.ColorTransform;
                         ^
    .\java\awt\image\ColorModel.java:33: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.PCMM;
                         ^
    .\java\awt\Window.java:57: error: package sun.awt.util does not exist
    import sun.awt.util.IdentityArrayList;
                       ^
    .\java\awt\Container.java:4412: error: cannot find symbol
        private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.LightweightDispatcher");
                             ^
      symbol:   class PlatformLogger
      location: class LightweightDispatcher
    .\java\awt\color\ColorSpace.java:41: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.PCMM;
                         ^
    .\java\awt\color\ColorSpace.java:42: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.CMSManager;
                         ^
    .\java\awt\AWTEvent.java:81: error: cannot find symbol
        private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AWTEvent");
                             ^
      symbol:   class PlatformLogger
      location: class AWTEvent
    .\java\awt\event\InputEvent.java:61: error: cannot find symbol
        private static final PlatformLogger logger = PlatformLogger.getLogger("java.awt.event.InputEvent");
                             ^
      symbol:   class PlatformLogger
      location: class InputEvent
    .\java\awt\Cursor.java:191: error: cannot find symbol
        private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Cursor");
                             ^
      symbol:   class PlatformLogger
      location: class Cursor
    .\java\awt\Dialog.java:39: error: package sun.awt.util does not exist
    import sun.awt.util.IdentityArrayList;
                       ^
    .\java\awt\Dialog.java:40: error: package sun.awt.util does not exist
    import sun.awt.util.IdentityLinkedList;
                       ^
    .\java\awt\color\ICC_ColorSpace.java:39: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.ColorTransform;
                         ^
    .\java\awt\color\ICC_ColorSpace.java:40: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.CMSManager;
                         ^
    .\java\awt\color\ICC_ColorSpace.java:41: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.PCMM;
                         ^
    .\java\awt\Window.java:258: error: cannot find symbol
        private static final IdentityArrayList<Window> allWindows = new IdentityArrayList<Window>();
                             ^
      symbol:   class IdentityArrayList
      location: class Window
    .\java\awt\Window.java:372: error: cannot find symbol
        private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Window");
                             ^
      symbol:   class PlatformLogger
      location: class Window
    .\java\awt\Window.java:1528: error: cannot find symbol
        static IdentityArrayList<Window> getAllWindows() {
               ^
      symbol:   class IdentityArrayList
      location: class Window
    .\java\awt\Window.java:1536: error: cannot find symbol
        static IdentityArrayList<Window> getAllUnblockedWindows() {
               ^
      symbol:   class IdentityArrayList
      location: class Window
    .\java\awt\AttributeValue.java:31: error: cannot find symbol
        private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AttributeValue");
                             ^
      symbol:   class PlatformLogger
      location: class AttributeValue
    .\java\awt\datatransfer\DataFlavor.java:29: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\awt\Dialog.java:269: error: cannot find symbol
        transient static IdentityArrayList<Dialog> modalDialogs = new IdentityArrayList<Dialog>();
                         ^
      symbol:   class IdentityArrayList
      location: class Dialog
    .\java\awt\Dialog.java:271: error: cannot find symbol
        transient IdentityArrayList<Window> blockedWindows = new IdentityArrayList<Window>();
                  ^
      symbol:   class IdentityArrayList
      location: class Dialog
    .\java\awt\EventQueue.java:185: error: cannot find symbol
        private static volatile PlatformLogger eventLog;
                                ^
      symbol:   class PlatformLogger
      location: class EventQueue
    .\java\awt\EventQueue.java:187: error: cannot find symbol
        private static final PlatformLogger getEventLog() {
                             ^
      symbol:   class PlatformLogger
      location: class EventQueue
    .\java\awt\color\ICC_Profile.java:39: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.PCMM;
                         ^
    .\java\awt\color\ICC_Profile.java:40: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.CMSManager;
                         ^
    .\java\awt\color\ICC_Profile.java:41: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.Profile;
                         ^
    .\java\awt\color\ICC_Profile.java:42: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.ProfileDataVerifier;
                         ^
    .\java\awt\color\ICC_Profile.java:43: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.ProfileDeferralMgr;
                         ^
    .\java\awt\color\ICC_Profile.java:44: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.ProfileDeferralInfo;
                         ^
    .\java\awt\color\ICC_Profile.java:45: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.ProfileActivator;
                         ^
    .\java\awt\color\ICC_ColorSpace.java:99: error: cannot find symbol
        private transient ColorTransform this2srgb;
                          ^
      symbol:   class ColorTransform
      location: class ICC_ColorSpace
    .\java\awt\color\ICC_ColorSpace.java:100: error: cannot find symbol
        private transient ColorTransform srgb2this;
                          ^
      symbol:   class ColorTransform
      location: class ICC_ColorSpace
    .\java\awt\color\ICC_ColorSpace.java:101: error: cannot find symbol
        private transient ColorTransform this2xyz;
                          ^
      symbol:   class ColorTransform
      location: class ICC_ColorSpace
    .\java\awt\color\ICC_ColorSpace.java:102: error: cannot find symbol
        private transient ColorTransform xyz2this;
                          ^
      symbol:   class ColorTransform
      location: class ICC_ColorSpace
    .\javax\swing\event\EventListenerList.java:30: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\awt\EventDispatchThread.java:59: error: cannot find symbol
        private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread");
                             ^
      symbol:   class PlatformLogger
      location: class EventDispatchThread
    .\java\awt\color\ICC_Profile.java:98: error: cannot find symbol
        private transient Profile cmmProfile;
                          ^
      symbol:   class Profile
      location: class ICC_Profile
    .\java\awt\color\ICC_Profile.java:100: error: cannot find symbol
        private transient ProfileDeferralInfo deferralInfo;
                          ^
      symbol:   class ProfileDeferralInfo
      location: class ICC_Profile
    .\java\awt\color\ICC_Profile.java:101: error: cannot find symbol
        private transient ProfileActivator profileActivator;
                          ^
      symbol:   class ProfileActivator
      location: class ICC_Profile
    .\java\awt\color\ICC_Profile.java:731: error: cannot find symbol
        ICC_Profile(Profile p) {
                    ^
      symbol:   class Profile
      location: class ICC_Profile
    .\java\awt\color\ICC_Profile.java:740: error: cannot find symbol
        ICC_Profile(ProfileDeferralInfo pdi) {
                    ^
      symbol:   class ProfileDeferralInfo
      location: class ICC_Profile
    .\java\awt\color\ICC_Profile.java:1073: error: cannot find symbol
        static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
                                               ^
      symbol:   class ProfileDeferralInfo
      location: class ICC_Profile
    .\java\awt\color\ICC_Profile.java:1236: error: cannot find symbol
        static int getColorSpaceType(Profile p) {
                                     ^
      symbol:   class Profile
      location: class ICC_Profile
    .\java\awt\color\ICC_Profile.java:1266: error: cannot find symbol
        static int getPCSType(Profile p) {
                              ^
      symbol:   class Profile
      location: class ICC_Profile
    .\java\awt\color\ICC_Profile.java:1366: error: cannot find symbol
        static byte[] getData(Profile p, int tagSignature) {
                              ^
      symbol:   class Profile
      location: class ICC_Profile
    .\java\time\temporal\ChronoField.java:82: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleProviderAdapter;
                                   ^
    .\java\time\temporal\ChronoField.java:83: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleResources;
                                   ^
    .\java\time\format\DateTimeTextProvider.java:90: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.CalendarDataUtility;
                                   ^
    .\java\time\format\DateTimeTextProvider.java:91: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleProviderAdapter;
                                   ^
    .\java\time\format\DateTimeTextProvider.java:92: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleResources;
                                   ^
    .\java\time\format\DateTimeFormatterBuilder.java:117: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleProviderAdapter;
                                   ^
    .\java\time\format\DateTimeFormatterBuilder.java:118: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleResources;
                                   ^
    .\java\time\format\DateTimeFormatterBuilder.java:119: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.TimeZoneNameUtility;
                                   ^
    .\java\lang\reflect\Proxy.java:41: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\java\awt\image\ColorConvertOp.java:42: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.ColorTransform;
                         ^
    .\java\awt\image\ColorConvertOp.java:43: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.CMSManager;
                         ^
    .\java\awt\image\ColorConvertOp.java:44: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.ProfileDeferralMgr;
                         ^
    .\java\awt\image\ColorConvertOp.java:45: error: package sun.java2d.cmm does not exist
    import sun.java2d.cmm.PCMM;
                         ^
    .\java\awt\image\ColorConvertOp.java:74: error: cannot find symbol
        ColorTransform    thisTransform, thisRasterTransform;
        ^
      symbol:   class ColorTransform
      location: class ColorConvertOp
    .\javax\swing\TransferHandler.java:39: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.MethodUtil;
                           ^
    .\javax\swing\JSpinner.java:43: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleProviderAdapter;
                                   ^
    .\javax\swing\JSpinner.java:44: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleResources;
                                   ^
    .\javax\swing\JSpinner.java:45: error: package sun.util.locale.provider does not exist
    import sun.util.locale.provider.LocaleServiceProviderPool;
                                   ^
    .\javax\swing\text\JTextComponent.java:27: error: package com.sun.beans.util does not exist
    import com.sun.beans.util.Cache;
                             ^
    .\javax\swing\text\JTextComponent.java:73: error: package sun.swing.text does not exist
    import sun.swing.text.TextComponentPrintable;
                         ^
    .\javax\swing\text\JTextComponent.java:3873: error: cannot find symbol
        private static Cache<Class<?>,Boolean> METHOD_OVERRIDDEN
                       ^
      symbol:   class Cache
      location: class JTextComponent
    .\java\beans\MethodRef.java:32: error: package sun.reflect.misc does not exist
    import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
                                  ^
    .\java\beans\MethodRef.java:32: error: static import only from classes and interfaces
    import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
    ^
    .\javax\swing\UIDefaults.java:54: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.MethodUtil;
                           ^
    .\javax\swing\UIDefaults.java:55: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.ReflectUtil;
                           ^
    .\com\sun\java\swing\plaf\gtk\GTKLookAndFeel.java:45: error: cannot find symbol
    import sun.awt.UNIXToolkit;
                  ^
      symbol:   class UNIXToolkit
      location: package sun.awt
    .\com\sun\java\swing\plaf\gtk\GTKStyle.java:37: error: cannot find symbol
    import sun.awt.UNIXToolkit;
                  ^
      symbol:   class UNIXToolkit
      location: package sun.awt
    .\com\sun\java\swing\plaf\gtk\GTKPainter.java:27: error: cannot find symbol
    import sun.awt.UNIXToolkit;
                  ^
      symbol:   class UNIXToolkit
      location: package sun.awt
    .\com\sun\java\swing\plaf\gtk\PangoFonts.java:33: error: cannot find symbol
    import sun.font.FontConfigManager;
                   ^
      symbol:   class FontConfigManager
      location: package sun.font
    .\javax\swing\plaf\nimbus\AbstractRegionPainter.java:34: error: package sun.reflect.misc does not exist
    import sun.reflect.misc.MethodUtil;
                           ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
    100 errors
    100 warnings

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Unable to build jdk1.8.0_45 from src.zip contained therein

    Actually, I've never needed to do that. And I am not certain why you need it to enable debugging.
    I use Eclipse and can set breakpoints and step into all the Java API classes, examine the variables, etc.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,991
    Rep Power
    8

    Default Re: Unable to build jdk1.8.0_45 from src.zip contained therein

    The source of your post is from 2007. That is nearly a decade ago. And even then they said it wasn't necessary. It would require the source code to show you where it's stepping through, but you don't need to build it yourself.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  4. #4
    MGeorge's Avatar
    MGeorge is offline Aging Hacker
    Join Date
    Sep 2014
    Location
    East (San Francisco) Bay, California, USA
    Posts
    20
    Rep Power
    0

    Default Re: Unable to build jdk1.8.0_45 from src.zip contained therein

    Thanks to jim829 and SurfMan for their replies.

    I'm not sure if I actually need to roll my own Java API but I thought it
    would prove an interesting exercise.

    I am using NetBeans 8.0.2 and while I can step into Java API classes I am not
    able to examine their local variables. I would expect Eclipse to have the same
    limitations.

    SurfMan, I realize the instructions are from 2007 (jdk1.6.0) and even pointed
    out that they are somewhat archaic. Even so, the src.zip from Java's
    installation should contain the source that produced the release's byte-code.

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Unable to build jdk1.8.0_45 from src.zip contained therein

    Yes, you can't see the local variables for the reasons you cited. Only solution other than the one you are
    trying is to check out the openJDK site. Regarding recompiling the sources, I really wonder how well that
    would work. There seems to be quite a bit of specialty code used by the JDK. And I think it has to be in
    the appropriate package to work. But if you try and do something to the java.* packages, you get an error so
    it would seem to me to be catch-22 situation. But I don't know as I have never tried it.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: Unable to build jdk1.8.0_45 from src.zip contained therein

    Not sure why it can't find, to take the first error, ReflectUtil.
    Could be a mismatch between your JDK and the source code you picked up maybe?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 2
    Last Post: 10-22-2010, 07:54 PM
  2. EJB invokation failing in jdk1.5.0_23 but works in jdk1.6.0
    By randle169 in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 01-28-2010, 09:09 AM
  3. JNLP - Swing application compiled in jdk1.5 not working in jdk1.6
    By mahendra.athneria in forum AWT / Swing
    Replies: 4
    Last Post: 01-20-2009, 08:27 PM
  4. Unable to build
    By jkeller in forum Eclipse
    Replies: 1
    Last Post: 01-15-2009, 06:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •