How do I obtain JDK source code?

I need to get the source code of JDK 1.4.2 for Mac OS X to help debugging my Java application. Where can I obtain it? Is it the same one as those distributed by Sun?

I fail to see why having the JDK source is going to
help you debug your code.I fail to see why you think your comment is in the slightest bit helpful.
When programming an API, you should always include enough documentation and properly use exceptions so that someone using your API is able to determine exaclty why they are getting any error that they may encounter.
Not all programmers provide adequate documentation in all instances and and not all programmers provide adequate exception support in all instances.
The standard java libraries are no exception to this. I have encountered a few instances in my coding history where the documentation/error messages were not sufficient for me to know what I have done wrong. In these instances, going to the source code allowed me to figure things out. This is why sun releases src.zip with their jdk's.

Similar Messages

  • How obtain complete source code for applet demos?

    I would like to obtain the source code for all the class files for the applet demos, especially the molecule viewer. Some of the class files do not have corresponding java files made available. Who can help me out?

    Which class files are missing?
    If you go to this site, select the applet of interest, the link at the bottom of the page (that is, the page with the running applet in it) takes you to the source. The file at that link includes all of the classes in the applet.
    http://java.sun.com/j2se/1.4.2/docs/relnotes/demos.html
    -John

  • J2SE 5.0 JDK Source Code setup

    I downloaded the J2SE 5.0 JDK Source Code .zip files, but how do I set it up? I'm running Windows XP.

    unzip the file to whatever location you want e.g. C:\JavaApiDocs
    which will create C:\JavaApiDocs\docs
    double-click C:\JavaApiDocs\docs\api\index.html to see if all is well
    if so, put a shortcut to index.html on your desktop
    many ide's have a link to the docs, for searching etc - go to your ide's options
    and point the docs location to C:\JavaApiDocs

  • How can i get the source code from java concurrent program in R12

    Hi 2 all,
    How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
    Regards,
    Zulqarnain

    user570667 wrote:
    Hi 2 all,
    How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
    Regards,
    ZulqarnainDid you see old threads for similar topic/discussion? -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Java+AND+Concurrent+AND+Source+AND+Code&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • How can I view the source code of chrome://browser/content/browser.xul?

    How can I view the source code of chrome://browser/content/browser.xul of mobile FireFox?
    In my desktop version I just open this page in new tab and view webpage source, but there is no option for FF mobile to view source code.
    Best regards.

    Does the view-source: protocol work on mobile?
    *view-source:chrome://browser/content/browser.xul

  • How can I get the source code of the google chrome ios app

    How can I get the source code of the google chrome ios app

    Google is your friend
    http://www.chromium.org/
    and
    https://developers.google.com/chrome/mobile/docs/iosoverview

  • How to protect ADF Application Source code

    Hi,
    There is an ADF Application which needs to be given to a client. The client will deploy the application.
    How do i protect the source code giving to the someone from the ADF application. ?

    An ear file don't need to contain java source files, but is can.
    Sure you can create an ear without the source files. You define what goes into the ear yourself (source files are normally not included). The deployment descriptor you used to create the ear defines what file (contributors) are in the ear. Check the applications deployment descriptor and change it in a way that the sources are not included.
    Timo

  • How can we know the source code no.of lines

    hi guys!
    please help me, how can we check the source code(No. of lines)in program with out comments

    hi,
    Use this code. Replace with your program name with the text in bold. V_lines gives the no of lines of code excluding comments and as well blank lines.
    TYPES: BEGIN OF t_type,
             line(72),
           END OF t_type.
    DATA: program LIKE sy-repid
                     VALUE <b>'Z_ABC_INNER_JOIN'</b>,
          t TYPE STANDARD TABLE OF t_type WITH HEADER LINE.
    DATA: v_lines TYPE i.
    READ REPORT program INTO t.
    IF sy-subrc =0.
      LOOP AT t.
        IF t+0(1) = '*' OR t IS INITIAL.
          DELETE t INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t LINES v_lines.
    ENDIF.
    WRITE : v_lines.
    Regards,
    Sailaja.

  • How do I access iWeb source code?

    I am building a site on iWeb and want to add drop down menus. I can make them in Dreamweaver, but I don't know how to access the full source code of iWeb to be able to add the Spry Menu Bar I have created in Dreamweaver CS3
    Can anyone tell me how to access the source code of iWeb?
    Can I build a page in iWeb in code?

    If so, is it true that it has to be added again each time you publish?
    If you are talking about modifying the code in the .html files created when you publish from iWeb, yes, your modifications will be overwritten if you republish, so they need to be added again.

  • How to read the Java source code (in Netbeans)

    I use OS X10.5.5, NetBeans 6.1 and JSE 6 on a 64 bit mac.
    When I downloaded NB6.1 it had JSE 5 as it's default (and only) java platform. I ran Software Update to get Java 6 from Apple, used the Java Prefrences utitlity to set JSE6 as default. In NB I added the JDK6 platform, registered the JDK6 javadocs and noticed that I also have the option of registering the Java source code.
    I have three questions:
    1) How do I make JDK6 the default in NetBeans. The JDK5 keeps being default after I did the steps above and I don't see anywhere to change that.
    2) How do I read the Java 6 source code? I can see sun provides [source code| http://download.java.net/jdk6/] for their supported platforms. I dont see Apple doing the same for its JDK port. What would I need to do to get to read the java SE6 sources? or is it actually hiding somewhere in the /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home hierarchy?
    3) Where does the JVM look for the binary code to run when I make a call to, say java.util.ArrayList or any other library. In my naivety I would have assumed it would be a .class file somewhere in the java Home folder, but I don't see anything like it.
    thanks in advance,
    chris

    This is taken from the help included with netbeans. In response to question 1.
    By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform
    for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the
    Detail tab. The JDK version is listed in the Java field.
    You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line
    or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters.
    In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you
    want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a
    platform and attach the source code and Javadoc to the platform.
    In  , you can switch the target JDK in the Project Properties dialog box. In  , you have to set the target JDK in the Ant script itself,
    then specify the source/binary format in the Project Properties dialog box.
    To register a new Java platform:
    Choose Tools > Java Platforms from the main window.
    Click New Platform and select the directory that contains the Java platform. Java platform directories are marked with a  
    in the file chooser.
    Use the Sources and Javadoc tabs to attach Javadoc documentation and source code for debugging to the platform.
    Click Close.
    To set the default Java platform for a standard project:
    Right-click the project's root node in the Projects window and choose Properties.
    In the Project Properties dialog box, select the Libraries node in the left pane.
    Choose the desired Java platform in the Java Platform combo box.
    Switching the target JDK for a standard project does the following:
    Offers the new target JDK's classes for code completion.
    If available, displays the target JDK's source code and Javadoc documentation.
    Uses the target JDK's executables (javac and java) to compile and execute your application.
    Compiles your source code against the target JDK's libraries.
    If you want to register additional Java platforms with the IDE, you can do so by clicking the Manage Platforms button.
    Then click the Add Platform button and navigate to the desired platform.
    To set the target Java platform for a free-form project:
    In your Ant script, set the target JDK as desired in the javac, java, and javadoc tasks.
    Right-click the project's root node in the Projects window and choose Properties.
    In the Sources panel, set the level of JDK you want your application to be run on in the Source/Binary Format combo box.
    When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the
    Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead.
    See Also
    Managing the Classpath
    Declaring the Classpath in a Free-Form Project
    Stepping Through Your Program
    Legal Notices

  • How to read the html source code of a webpage.

    How can I read the html source code of a webpage with a java application?
    Is there a good idea?

    >
    How can I read the html source code of a webpage
    with a java application?
    Is there a good idea?
    I don't know if this is a good idea, but it works.
    1) Use a URL to obtain the document's location
    2) Use a URLConnection to open a connection between your computer and the
    document server
    3) Connect to the server
    4) Get the InputStream of said connection
    5) Associate the Input Stream with a Buffered Input Stream
    At this point you can use a loop to read lines from the BufferedInput Stream and append them to a TextArea or other suitable text component.

  • How can I make my source code with jar file?

    I use JDK1.6.0. I can open a class file from rt.jar and get its source code. Does this because open source JDK? I wander how I can make my jar file with source code.

    CeciNEstPasUnProgrammeur wrote:
    youhaodiyi wrote:
    But why I can read source code from rt.jar? I found there are only class files in it.I say it's highly likely that you can't and your IDE's settings rather automatically refer to the src.zip file in the JDK's directory.I see. That's true. I use eclipse as the source code reader. It may refer to the source code zip file automatically.
    Thanks all.

  • How can i obtain this block code of a Font

    Hello,
    I want to know how do I obtain the definition of a Font (TrueType), I found a block code, and I supposed is the definition of the Font in a PS file. Is it correct?
    I added part of the code, to explain me better.
    $_FONT_ARIALMT ="%%BeginResource: font ArialMT
    %ct_CffDict begin
    %!FontType1
    16 dict begin
    /FontInfo 15 dict dup begin
    /Notice (Copyright (c) 1991, 1993, 1996, 1997, 1998, 1999 Adobe Systems Incorporated.  All Rights Reserved.Arial is a trademark of The Monotype Corporation, registered in the US Patent and Trademark Office and elsewhere.) def
    /version (001.001) def
    /FullName (Arial MT) def
    /FamilyName (Arial MT) def
    /Weight (Regular) def
    /ItalicAngle 0 def
    How to obtain this lines but of another TrueType Font?
    Thanks a lot for your help.

    The PFB files are printer font binary files and they contain a mixture of 7-bit ascii and 8-bit binary characters.
    Read the Adobe Type 1 Font Format version 1.1 book (especially Chapter 2: Font Program Organization on page 11).
    I wrote an application in "C" that reads .PFB files and makes .PS files that are used to insert into PostScript jobs. Whether it is easy or not depends on your level of proficiency in "C" or whatever language you use.

  • How to understand the Vector source code for function elements()?

    hello all:
    This following code snippet is extracted from java.util.Vector source code.
    who can tell me how i can understand what the function nextElement does?
    thank you
    public Enumeration elements() {
         return new Enumeration() {
             int count = 0;
             public boolean hasMoreElements() {
              return count < this.num_elem;
             public Object nextElement() {
              synchronized (Vector.this) {   //???
                  if (count < elementCount) {//???
                   return elementData[count++];
              throw new NoSuchElementException("Vector Enumeration");
        }

    Perhaps code would help more. This codeimport java.util.Vector;
    import java.util.Enumeration;
    import java.util.Iterator;
    public class Test {
        public static void main(String[] arghs) {
         Vector v = new Vector();
         Integer two = new Integer(2);
         // Fill the Vector
         v.add("One");
         v.add(two);
         v.add(new StringBuffer("Three"));
         // Enumerate through the objects in the vector
         System.out.println("---- Enumeration ----");
         Enumeration e = v.elements();
         while (e.hasMoreElements()) System.out.println(e.nextElement());
         // Loop through the objects in the vector
         System.out.println("---- Loop ----");
         for (int i=0; i<v.size(); i++) System.out.println(v.get(i));
         // Iterate through the objects in the vector
         System.out.println("---- Iterator ----");
         Iterator i = v.iterator();
         while (i.hasNext()) System.out.println(i.next());
    }produces this output
    ---- Enumeration ----
    One
    2
    Three
    ---- Loop ----
    One
    2
    Three
    ---- Iterator ----
    One
    2
    Three
    So, for a Vector, all three do the same thing. However, Iterator is part of the Collection Framework (see [url http://java.sun.com/j2se/1.4.2/docs/guide/collections/index.html]here). This allows you to treat a whole bunch of [url http://java.sun.com/j2se/1.4.2/docs/guide/collections/reference.html]objects which implement the Collection interface all the same way. I know this is way more than you were asking, but I hope it at least clears up what you were asking.

  • How can one encrypt the source code of a given web page(html, jsp, etc.) ?

    Good Day! I'm just having a hard time of thinking how to encrypt the source code of a given web page(html, jsp, etc.) without affecting how it is previewed in an Internet Browser. What I plan is to disable the capabilities of some malicious Internet users of copying the source codes of my web pages by using the "View Source" option of Internet Explorer and the equivalent function in Netscape Navigator. Please somebody help me in this matter (I'm planning to use an IDEA algorithm using JCE)....
    It would be big help if a running code is supplied.
    Thank you very much in advance.
    God Bless!!!
    - Jonathan Untalan([email protected])

    don't know theses softs. What i know about encrypted web pages, is that you need a secure socket connection (https).
    Your web page will be ciphered, send to the user, and decipher by the browser with the signature file associated to your https connexion.
    It isn't possible to encrypt your page directly, and then decrypt them when requested.
    For the download time, only the server is responsible for this.
    if it is overloaded, then it will slow down its upload.
    Maybe you use some encryption method that require a lot of CPU time.
    For summary : you can only cipher the pipe transport, but not the transported pages.
    Good luck in your search.

Maybe you are looking for

  • How do I use mono and 1 spot colour for print, where the spot colour applies to an element, rather than the whole image?

    I am struggling to work with spot colours, using scanned images edited in Photoshop for use in InDesign to then go to print. We print to two plates to save money for our publication. In this case magenta and black. I could use the spot colour mode bu

  • VGA port K7N2G

    What is it's function? I know what it's for but is it that the board has onboard graphics, or what, it puzzles me because I cant see any use for it if it's not O/B graphics, all cards have an interface anyway, only conclusion I can come to is for dua

  • Problem while exporting report

    Hi I have created report with 7 subreport with crosstab in some subreports.When i run report its giving me more than  2000 records within minute  But when i am going to export report into XLS or PDF or MS Word , its giving me timeout in crystal repor

  • Updating or inserting database problem

    Hi, I have a problem when i try to insert or update records within database from java, i m using ms access. I can retrive the data from the table but when i insert or update it , the code executes without any error but has no effect on the table. I w

  • Why my browser want to download JRE?

    Applets dont work with SDK? I think it is not possible, but my applet doesn't work, browser starts downloading JRE and want to install it. Appletviewer doesn't work too. I've tried 2 options in htmlconverter use any wersion of java 1.4 or higher and