Building debuggable JDK jars from JDK sources

Hello,
I want to build the JDK jars (rt.jar, tools.jar, etc.) that contain classes with debug information, from the JDK sources. I found a web page where it detailed several steps, but they were too many and too general for me. My platform is : Linux 2.6.9-78.0.0.0.1.ELsmp #1 SMP i686 i686 i386 GNU/Linux. Can someone tell me some straightforward steps to build these jars. When I run 'gmake sanity' in control/make directory, I get errors like :
ERROR: You do not have access to the previous java release jre bundles.
Please check your access to
/java/re/j2se/1.5.0/archive/fcs/bundles/linux-i586/jdk-1_5_0-linux-i586.tar.gz
and/or check your value of ALT_PREVIOUS_RELEASE_PATH or ALT_PREVIOUS_JRE_FILE
This will affect you if you build the images target.
ERROR: You do not have access to the previous java release sdk bundles.
Please check your access to
and/or check your value of ALT_PREVIOUS_RELEASE_PATH or ALT_PREVIOUS_JDK_FILE.
This will affect you if you build the images target.
I simply want to know which env variables exactly should I set and to what values. Specific information regarding these will be much appreciated. Thanks.

I don't understand what you mean by 'run the JVM in debug mode'. I don't want to debug the JVM, but want to debug the JDK classes. And for that, the classes need to have been compiled with debug info.
In any case, what I want is : build JDK jars with debug info, given that the sources are available. I'm sure this kind of thing was already tried out by at least some, if not many. So, I'm seeking some guidelines from them.

Similar Messages

  • Building debuggable versions of JDK jars from JDK sources

    [ Posting in this forum, since posting it in 'Build and Release Engineering' forum has not got any response so far ]
    Hello,
    I want to build the JDK jars (rt.jar, tools.jar, etc.) that contain classes with debug information, from the JDK sources. I found a web page where it detailed several steps, but they were too many and too general for me. My platform is : Linux 2.6.9-78.0.0.0.1.ELsmp #1 SMP i686 i686 i386 GNU/Linux. Can someone tell me some straightforward steps to build these jars. When I run 'gmake sanity' in control/make directory, I get errors like :
    ERROR: You do not have access to the previous java release jre bundles.
    Please check your access to
    /java/re/j2se/1.5.0/archive/fcs/bundles/linux-i586/jdk-1_5_0-linux-i586.tar.gz
    and/or check your value of ALT_PREVIOUS_RELEASE_PATH or ALT_PREVIOUS_JRE_FILE
    This will affect you if you build the images target.
    ERROR: You do not have access to the previous java release sdk bundles.
    Please check your access to
    and/or check your value of ALT_PREVIOUS_RELEASE_PATH or ALT_PREVIOUS_JDK_FILE.
    This will affect you if you build the images target.
    I simply want to know which env variables exactly should I set and to what values. Specific information regarding these will be much appreciated. Thanks.

    I don't understand what you mean by 'run the JVM in debug mode'. I don't want to debug the JVM, but want to debug the JDK classes. And for that, the classes need to have been compiled with debug info.
    In any case, what I want is : build JDK jars with debug info, given that the sources are available. I'm sure this kind of thing was already tried out by at least some, if not many. So, I'm seeking some guidelines from them.

  • About building Apache and PHP from source

    Hello,
    I figured my question should be posted here, if it should be done somewhere else, I apologize.
    I'm in the process of exploring solaris 9 (I have RH5 - 9, FC1-3 and FreeBSD 4.7> experience). I was wondering which tools I need to build stuff from source, like Apache and PHP. I am aware of www.sunfreeware.com, which helped me out with mc and other useful stuff.
    The problem I see is that when I install packages from sunfreeware.com, I must rely on the package maintainer to release a new package for newer Apache/PHP versions (with bug/security fixes in it). I plan to run a public webserver on this config, so I figured it'd be best to build what I need from the source so I can update it anytime I like.
    What I installed from sunfreeware.com:
    autconf
    automake
    gcc
    make
    bison
    expect
    mc
    libiconv
    ncurses
    flex
    What else do I need to successfully build software from the source?
    Are there any people running a public web/dns/mailserver on Solaris (whatever the version)?
    If someone could answer to those questions, I'd be most grateful.
    Bas

    Have you installed the companion CD? All you need is there.
    Have you tried to compile?
    If so, what errors do you get?

  • [svn:fx-trunk] 11488: Resubmitting binary distribution of xercesPatch. jar from the third party module in the SDK and compiled it with Sun JDK 1.4 .2_12.

    Revision: 11488
    Author:   [email protected]
    Date:     2009-11-05 17:10:10 -0800 (Thu, 05 Nov 2009)
    Log Message:
    Resubmitting binary distribution of xercesPatch.jar from the third party module in the SDK and compiled it with Sun JDK 1.4.2_12.
    QE notes: N/A
    Doc notes: N/A
    Bugs:
    SDK-16818 - Must open-source the code for xercesPatch.jar.
    Reviewer: Discussed with Gordon
    Tests run: Checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-16818
    Modified Paths:
        flex/sdk/trunk/lib/xercesPatch.jar
        flex/sdk/trunk/modules/thirdparty/xerces-patch/build.xml

    Did you try this:
    http://forum.java.sun.com/thread.jsp?thread=434718&forum=60&message=1964421

  • JavaDoc: inherit method comment from jdk classes?

    My goal is to let custom classes inherit method comments from overridden methods of jdk classes. From the doctool documentation, I would assume that the way to go is to set the path to the jdk sources in the -sourcepath option. My problem is that this doesn't seem to work at all - looks like JavaDoc is simply not parsing the JDK source files at all.
    The relevant (methinks :) part of the verbose output:
    // these are the input options as created by ant run from eclipse under win2k
    Executing 'D:\jdk\150_u6\bin\javadoc.exe' with arguments:
    '-d'
    'D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\dist\javadoc'
    '-use'
    '-splitindex'
    '-verbose'
    '-classpath'
    'D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\lib\optional\MultipleGradientPaint.jar'
    '-sourcepath'
    'D:\jdk_doc\srcjdk1.5.0;D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\src\java'
    '-link'
    'file:D:/jdk_doc/jdk1.5b/docs/api'
    '-source'
    '1.5'
    'org.jdesktop.swingx.table'
    The ' characters around the executable and arguments are
    not part of the command.
    // following is the javadoc output
       [javadoc] [search path for source files: [D:\jdk_doc\srcjdk1.5.0,
    D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\src\java]]
       [javadoc] [search path for class files:
    [D:\jdk\150_u6\jre\lib\rt.jar, D:\jdk\150_u6\jre\lib\jsse.jar,
    D:\jdk\150_u6\jre\lib\jce.jar, D:\jdk\150_u6\jre\lib\charsets.jar,
    D:\jdk\150_u6\jre\lib\ext\dnsns.jar,
    D:\jdk\150_u6\jre\lib\ext\junit.jar,
    D:\jdk\150_u6\jre\lib\ext\localedata.jar,
    D:\jdk\150_u6\jre\lib\ext\sunjce_provider.jar,
    D:\jdk\150_u6\jre\lib\ext\sunpkcs11.jar,
    D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\lib\optional\MultipleGradientPaint.jar]]
       [javadoc] Loading source files for package org.jdesktop.swingx.table...
       [javadoc] [parsing started
    D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\src\java\org\jdesktop\swingx\table\ColumnControlButton.java]
    ..snip..
       [javadoc] Constructing Javadoc information...
       [javadoc] [loading
    D:\jdk\150_u6\jre\lib\rt.jar(java/awt/ComponentOrientation.class)]
       [javadoc] [loading
    D:\jdk\150_u6\jre\lib\rt.jar(java/awt/Dimension.class)]
       [javadoc] [loading D:\jdk\150_u6\jre\lib\rt.jar(java/awt/Insets.class)]It doesn't seem to matter if javadoc is run from the commandline or through an ant task, the output is basically the same.
    The loading from the rt.jar might be the problem, at least when comparing to a report about (maybe exactly the same) problem back in 2004
    http://forum.java.sun.com/thread.jspa?forumID=41&threadID=536074
    The posters stated that the -sourcepath didn't appear to work under win, while it did work under Solaris. When working, the [loading..] output contained the path to the sources instead of to the classes.
    Any help, hint, thought, comment highly welcome!
    Thanks in advance
    Jeanette

    Hi Doug,
    thanks for your prompt reply!
    My first question is what does the source tree look
    below this directory:
    -sourcepath 'D:\jdk_doc\srcjdk1.5.0
    de]
    To work, the the full path to, say, String.java,
    would need to be:D:\jdk_docs\srcjdk1.5.0\java\lang\String.java
    Because -sourcepath must point to the root of the
    source tree. Is this what you have?
    exactly, that's the case. In the meantime, I tried to put the sources somewhere relative to the classes (to exlude the possibility that the absolute path poses a problem)I want to document - to no avail.
    >
    Are you thinking that the class files are loaded from
    rt.jar rather than the source .java files from the
    source tree?
    well, you are the expert to interpret the output :-) All I can be sure of is that this looks similar to output (for windows) in the old forum thread I mentioned and similar to a couple of bug reports. f.i.
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5079630 (which is closed as a duplicate) or
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5105600 which is still open (but probably should be closed - it's a usage error to point to the zipped sources).
    Hmm... thinking aloud: comparing my output to the output of the latter (it's quite analogous) it seems that in both cases the sources aren't found .. and the javadoctool falls back to get some search the missing information on the classpath. Maybe the question is: what could possibly go wrong (windows only) to not find the extracted sources (they are definitely there in my context ;-)?
    You might try setting -bootclasspath to the empty
    string, as describe here:
    http://java.sun.com/j2se/javadoc/faq/#bootclasspath
    I'll give it a try. BTW, this problem cropped up in the SwingLabs project, we are collectively scratching our heads in:
    http://forums.java.net/jive/thread.jspa?threadID=18409
    Thanks again!
    Jeanette

  • Error while creating jar from source folder

    Hi,
    i have source folder and i added log4j.properties
    i try to build for creating jar (sourcecode.jar) by ant build (build.xml)
    it is throwing error and saying that "package org.apache.log4j does not exist"
    i spend more time to resolve this error , but i could not find any solution.
    what is the error on this.. below the build.xml code which i try to build jar
    <project name="MyProject" default="dist" basedir=".">
        <description>
            simple example build file
        </description>
      <!-- set global properties for this build -->
      <property name="src" location="src"/>
      <property name="build" location="build"/>
      <property name="dist"  location="dist"/>
      <target name="init">
        <!-- Create the time stamp -->
        <tstamp/>
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build}"/>
      </target>
         <path id="classpath">
                 <fileset dir="${src.dir}">
                 <include name="log4j-1.2.16.jar"/>
                 </fileset>
         </path>
         <target name="compile" depends="init"
            description="compile the source " >
        <!-- Compile the java code from ${src} into ${build} -->
        <javac srcdir="${src}" destdir="${build}"/>
      </target>
      <target name="dist" depends="compile"
            description="generate the distribution" >
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}/lib"/>
        <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
        <jar jarfile="${dist}/lib/EscapeIncontra.jar" basedir="${build}"/>
      </target>
      <target name="clean"
            description="clean up" >
        <!-- Delete the ${build} and ${dist} directory trees -->
        <delete dir="${build}"/>
        <delete dir="${dist}"/>
      </target>
    </project>i am using log4j.properties inside source folder also added in eclipse class path..
    Thanks
    Rosina

    user13836688 wrote:
         <path id="classpath">
                 <fileset dir="${src.dir}">
                 <include name="log4j-1.2.16.jar"/>
                 </fileset>
         </path>
    maybe you ment<path id="classpath">
                 <fileset dir="${src.dir}">
                 </fileset>
                 <pathelenemt path="${your_lib_folder_path}/log4j-1.2.16.jar"/>
         </path>bye
    TPD

  • Configuring JDev to use javac from JDK

    Is there anyway to make JDevleoper use Javac from JDK. We are seeing some discrepancies in the code generated by ojc.
    Thanks.
    Suhas.

    Starting with JDeveloper 9.0.3 Preview Release, you can use ANT to build your project
    and with ANT you can use Javac.

  • XML Transformation - Migration from JDK 1.4 to JDK 1.6

    Hi all,
    I am switching from JDK 1.4 to JDK 1.6 but my XSLT transformations are outputting different XML (although structurally sound). JDK 1.6 outputs the namespaces for each element rather than placing them at the top level node.
    I've included the settings and the code below. I expect that there is a feature or a way to handle this but I have not been able to find it now for several days.
    Any recommendations would be greatly appreciated.
    Regards
    Paul
    JDK1.4
    JAXP: loaded from fallback value: org.apache.xalan.processor.TransformerFactoryImpl
    JAXP: loaded from fallback value: org.apache.crimson.jaxp.SAXParserFactoryImpl
    <?xml version="1.0" encoding="UTF-8"?>
    <ex1:IE518 xmlns:xdata="http://www.edifecs.com/xdata/100" xmlns:exe="http://test.com/schemas/ex1/elements/v1" xmlns:ext="http://test.com/schemas/ex1/extypes/v1" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ex1="http://test.com/schemas/ex1/MSG/v1">
    <ext:Common>
    <exe:SyntaxID>UNOC</exe:SyntaxID>
    <exe:MessageID>00000000000000</exe:MessageID>
    <exe:IEMessageType>MsgType</exe:IEMessageType>
    </ext:Common>
    <ext:Header>
    <exe:SpecificCircumstanceIndicator>B</exe:SpecificCircumstanceIndicator>
    <exe:Transit>0</exe:Transit>
    <exe:CommercialReferenceNumber>DHL11-7-43</exe:CommercialReferenceNumber>
    </ext:Header>
    </ex1:IE518>
    JDK 1.6
    JAXP: loaded from fallback value: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
    JAXP: loaded from fallback value: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
    <?xml version="1.0" encoding="UTF-8"?>
    <ex1:IE518 xmlns:ex1="http://test.com/schemas/ex1/MSG/v1">
    <ecc:Common xmlns:ext="http://test.com/schemas/ex1/extypes/v1">
    <exe:SyntaxID xmlns:exe="http://test.com/schemas/ex1/elements/v1" >UNOC</ece:SyntaxID>
    <exe:MessageID xmlns:exe="http://test.com/schemas/ex1/elements/v1" >00000000000000</ece:MessageID>
    <exe:IEMessageType xmlns:exe="http://test.com/schemas/ex1/elements/v1" >MsgType</ece:IEMessageType>
    </ecc:Common>
    <ecc:Header xmlns:ext="http://test.com/schemas/ex1/extypes/v1">
    <exe:SpecificCircumstanceIndicator xmlns:exe="http://test.com/schemas/ex1/elements/v1" >B</ece:SpecificCircumstanceIndicator>
    <exe:CommercialReferenceNumber xmlns:exe="http://test.com/schemas/ex1/elements/v1" >DHL11-7-43</exe:CommercialReferenceNumber>
    </ecc:Header>
    </ex1:IE518>
    try {
         byte[] transformed;
         StreamSource inputData = new StreamSource( new ByteArrayInputStream( xml_ecs.getBytes( ) ) );
         FileInputStream xsltData = new FileInputStream( xsl_file_path );
         StreamSource transformationData = new StreamSource( xsltData );
         StreamResult streamResult = new StreamResult(new ByteArrayOutputStream( ));
         //create transformer factory
         TransformerFactory tFactory = TransformerFactory.newInstance( );
         Transformer transformer = tFactory.newTransformer( transformationData );
         //perform transformation
         transformer.transform( inputData, streamResult );
         transformed = ((ByteArrayOutputStream) (streamResult.getOutputStream( )))
              .toByteArray( );
         System.out.println ("TRANSFORMED OUTPUT [" + new String(transformed) + "]");
    catch (TransformerException texsc) {
         System.out.println( "TransformerException caught: "
                   + texsc.getMessage() );
         throw texsc;
    catch (Exception ex) {
         ex.printStackTrace();
         System.out.println(ex.getMessage());
    }

    Can you post relevant pieces of your input document and the xsl?

  • Upgrade from JDK 1.2.2 to JDK 1.4.2. Any code changes required?

    Hi,
    We are in the processes of upgrading the JDK versions on servers to JDK 1.4.2 to support other software upgrades.
    The JDK versions on each of the servers are at different versions. On one of the servers, the version of JDK is currently at JDK 1.2.2_10. Can somebody please advise me if there would be any code changes required to support this upgrade (such as some methods being depreciated)?
    We are also evaluating if we need to upgrade to JDK 1.4.5. In such a case, would there be any code changes required to upgrade from JDK 1.4.1_x to JDK 1.4.5. I assume there wouldn't be any changes for this minor upgrade but just want to confirm.
    I would really appreciate an early reply.
    Thanks in advance.
    Regards,
    Vamshi

    "1.4.5" - you meant "1.5" ? :)
    About deprecations -- you will be warned by the compiler. E.g. "assert", "enum" are keywords and cannot be used as method names.
    The rest depends on your application. The more complex it is, the more differences can be encountered. You certainly need to run a test cycle for it with the new platform.
    From my experience, I can list some issues that I have read about or have experienced myself:
    1) serialization: the algorithm used to calculate the serialVersionUID had some changes between Java versions, due to compiler-added extra methods.
    If you don't have serialized instances, or your serialVersionUID is specified explicitly, you are safe.
    2) class loading order can be different in different platforms
    Once ago I have seen a paper from BEA Systems highlighting some open topics that can arise when migrating between different vendor's JVMs. Probably, it is the one:
    http://edocs.bea.com/jrockit/geninfo/devapps/codeprac.html
    In my friend's case, there was some class-initialization logic, that behaved differently when class loading order changed.
    3) Swing applications can sometimes behave slightly different.
    E.g., I observed some changes in focus handling, although minor ones. Fixed with several lines of code.
    4) Some libraries can depend on particular J2SE version. E.g. J2EE ones.
    E.g. I was not able to run J2EE 1.4 thick client application with JRE 1.5. The j2ee library used by the app either had some dependencies on sun.* classes, or on some protocols (not sure, I don't remember it well).
    5) Regression bugs are sometimes encountered. I.e. something that worked, does not work now.
    Summary: You need testing.

  • Who jarred in jdk 1.4

    I upgraded to jdk 1.4 and now as far I understood, it does not create manifest file automatically. Result: it does not load app. I could not find information on it here on first attempt. Does anybody know how to jar in jdk 1.4 and how to write manifest file? I know that I can find info on how to write manifest file, but now i am not sure that format did not change.
    Also, I noticed that my app.'s working slower after I recompiled it in jdk 1.4, because I have status bar. In 1.3.1 it sequentially processed string consisting of 2-3 thousand char very quick, I hardly could see status bar actually filling. Now, it became visible on strings less than thousand char. Am I paranoid or you had such observation too?

    ??

  • [svn] 3140: Modifying build. xml to include templates in the jar from the new location.

    Revision: 3140
    Author: [email protected]
    Date: 2008-09-08 09:04:17 -0700 (Mon, 08 Sep 2008)
    Log Message:
    Modifying build.xml to include templates in the jar from the new location.
    Modified Paths:
    flex/sdk/trunk/modules/antTasks/build.xml

    Don't be so impatient and don't multipost! I've deleted your other thread about the same topic.

  • Build ADF jar from maven

    Can we use maven to build ADF jar from one project which contains reusable components such as page template and task flow and the ADF jar is being used in another UI projects?
    Thanks

    Have tried google?
    I found http://groups.google.com/group/adf-methodology/web/maven-and-jdeveloper-adf-projects?pli=1 for a start.
    Timo

  • Migration problems from Jdk 1.3 to Jdk 1.4.2_05

    ?Hi,
    We have migrated our code from Jdk 1.3 to Jdk 1.4.2_05 and we are facing the following issue:
    We have a table which displays results retrieved from DB,
    When we migrated the table headers were not displayed properly due to some width parameters, so when we hardcoded the width to increase by 10, the headers are seen properly. But there is a gap between each header names.It is not set to the whole column width.
    We are getting the width of the comp as follows:
    Component comp = renderer.getTableCellRendererComponent(table,
    col.getHeaderValue(),false,
    false, 0, 0);
    return comp.getPreferredSize().width + 10;
    And we are setting the column width as below:
    We are checking whether the cellcontent width or the header width is greater and we are passing the max width.
    col.setPreferredWidth(width);
    Kindly help me in this regard,
    Thanks in advance,
    Kala

    You may get a better response posting this question in a more appropriate forum such as the Java Swing forum or the AWT forum. See forums below:
    http://forum.java.sun.com/forum.jsp?forum=57
    http://forum.java.sun.com/forum.jsp?forum=5

  • Migrating application from jdk 1.4 to 1.5

    Hi,
    I am planing to migrate my application from JDK 1.4 TO 1.5 . I am also using AJAX4JSF in application.Did anyone encounter any issue after migrating or during the migration to JDK 1.5 ?
    Thanks in advance

    You should be calling wrap() to wrap your keys, not doFinal(), or alternatively initializing your cipher to be ENCRYPT'ing, not WRAP'ing.

  • Planning to upgrade my application from JDK 5 to JDK 6

    Hi All,
    We are planning to upgrade JDK from JDK 5 to JDK 6. I would like to the stable release or update in JDK 6.
    Our development environment is Windows and Production environment is Red Hat Linux 5.4 (64bit).
    Please suggest the stable release in JDK 6 to upgrade my application.
    Regards,
    Kiran

    Apple's USB drive won't work with your computer at all.

Maybe you are looking for