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.

Similar Messages

  • 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.

  • [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

  • JAR file JDK version

    I have a question that i want to ask for a long time. Let say someone give you a jar file, how do we check which version of JDK it is compile ?

    You can get an easy, but approximate, answer by looking in the jar manifest:
    $ jar -xf somejar.jar META-INF/MANIFEST.MF
    $ cat META-INF/MANIFEST.MF
    Manifest-Version: 1.0
    Class-Path: someotherjar.jar
    Created-By: 1.6.0 (Sun Microsystems Inc.)
    Main-Class: Main
    The Created-By attribute says which JDK version created the jar file. However, that's not always the same as the version that was used to compile the classes. To get an exact answer, you'd need to look at the class file version number, and you'd have to do it for each class file since they don't all have to be the same. Gory details left as an exercise. Here's a reference to get you started:
    http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#80959

  • Migration of weblogic.jar from 6.1 version to 10.3.2 version

    Hi,
    we are migrating our application from jdk 1.3 to jdk 1.6.As a part of that we are migrating Weblogic server also from 6.1 to Oracle weblogic 10.3.2. When we replaced old weblogic.jar with new weblogic.jar,we are getting following exceptions.
    1)The project was not built since its build path is incomplete. Cannot find the class file for weblogic.security.acl.BasicRealm. Fix the build path then try building this project          
    2)The type weblogic.security.acl.BasicRealm cannot be resolved. It is indirectly referenced from required .class files
    In one java class,import statement is there as follows
    import weblogic.security.acl.User     
    But it says import weblogic.security.acl.User cannot be resolved
    for the other import
    import weblogic.security.acl.AbstractListableRealm; it says AbstractListableRealm deprecated
    Please assist us what alternatives we can use to resolve the above two cases.

    Hi,
    we are migrating our application from jdk 1.3 to jdk 1.6.As a part of that we are migrating Weblogic server also from 6.1 to Oracle weblogic 10.3.2. When we replaced old weblogic.jar with new weblogic.jar,we are getting following exceptions.
    1)The project was not built since its build path is incomplete. Cannot find the class file for weblogic.security.acl.BasicRealm. Fix the build path then try building this project          
    2)The type weblogic.security.acl.BasicRealm cannot be resolved. It is indirectly referenced from required .class files
    In one java class,import statement is there as follows
    import weblogic.security.acl.User     
    But it says import weblogic.security.acl.User cannot be resolved
    for the other import
    import weblogic.security.acl.AbstractListableRealm; it says AbstractListableRealm deprecated
    Please assist us what alternatives we can use to resolve the above two cases.

  • 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.

  • 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

  • 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.

  • 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.

  • Flash Builder cannot locate the required debugger version of Adobe Flash Player

    Hi,
    The problem seems to be well known for last yesrs and previous Flash builder versions, but I got impression that it is still unresolved for Win 7 64 bits, Flash Builder 4.5.
    I have installed:
    - Flash Builder 4.5
    - windows 7, 64bits
    - Flash Player the latest - 11.3.r300.257
    Please, let me know how to use successfully debugger in Flash Builder 4.5 without below error message:
    "Flash Builder cannot locate the required debugger version of Adobe Flash Player. You might need to install the debugger version of the Flash Player or reinstall Flash Builder"
    Sebar

    This is a known bug for Flash Builder 4.5 and 4.6.
    It will be fixed in next version of Flash Builder.
    The workaround for Flash Builder 4.5 & 4.6 is to download both 32-bit & 64-bit debug player.

  • 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

  • Which BEA WLS version (+ service packs) used which JDK/JRockit-JDK version

    Hello,
    I'm looking for an overview about the JDK and JRockit JDK versions which are used in the different BEA WLS versions.
    Specialy im interested on all BEA WLS server versions (incl. the different Service Packs) starting with version 7.0.
    The overview should contain the following information if possible:
    - BEA WLS Version Number including SP
    - Plattform (Windows, HPUX, Solaris, ...)
    - JDK version
    - JRockit JDK version
    Here is an example (??? = I do not know currently):
    WLS vers. (incl. SP)|Plattf.|JDK vers.|JRockit vers.
    7.0.1 |Solaris|??? |???
    8.1.5 |Windows|1.4.2_08 |rockit81sp5_142_08
    9.2 MP1 |HPUX |??? |???
    Thanks a million if somebody could provide me those information. :-x
    Cheers,
    Markus Jessl

    Please check :
    http://edocs.bea.com/platform/suppconfigs/index.html
    Jin

  • 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

Maybe you are looking for