Solved

Source code for all the native implementations in Java

Posted on 2001-06-27
11
309 Views
Last Modified: 2010-03-31
Hi
From where i can get the source code for all the native implementations in Java.
e.g. I want to know how exactly the functions in the string class has been implemented.
Thanx
Khem
0
Comment
Question by:k_suchdeva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 16

Expert Comment

by:Valeri
ID: 6230647
They are in *.jar files... Look up for .jar files and you will find them. If you have IDE you can see them throught it. For example JBuilder...

You can open .jar's with WinZip for example...

Best regards,
0
 
LVL 3

Expert Comment

by:dnoelpp
ID: 6230648
There is a community source code license from Sun. First become a member in the Developer Connection. Link:

http://developer.java.sun.com/developer/?frontpage-main

Then, when you are inside Developer Connection, go to Products and APIs (on the upper left side). On that page, go to Quick Links (on the upper right side) and click on Community Source. Then just follow all directions to download the native source code.

Good luck!
0
 
LVL 3

Expert Comment

by:dnoelpp
ID: 6230652
Valeri, these are the source  code for the java classes, not for the native implementation.

And, they don't contain the special Sun implementation of low level classes.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Expert Comment

by:TimYates
ID: 6230676
Java is not completely OpenSource...  

I doubt you would get these without decompiling one of the JVM's (Sun, IBM, etc...)
0
 
LVL 3

Expert Comment

by:dnoelpp
ID: 6230780
Hello Tim, hello suchdeva

I found the direct link to the native source code of the standard edition.

http://www.sun.com/software/communitysource/java2/

To download you have to register with Community Source (not Developer connection as I told before, sorry!) and then you can download the code.

Downloading however is not possible, if your current IP address is not reverse DNS solvable (as which most computers behind a firewall). Sun wants to check really thoroughly that the community source goes to the right place. In that case, go to your firewall and download the community source from there.

It is possible (I did it!) but Sun hides this possibility very well...
0
 
LVL 3

Expert Comment

by:dnoelpp
ID: 6230835
Er, I got confused, it's just my firewall which is not configured correctly... Just try it out, maybe you have success!
0
 
LVL 2

Author Comment

by:k_suchdeva
ID: 6230912
hi dnoelpp
i tried and same problem occured as u said.
I am not able to download due to the reverse DNS failure for my firewall.
What do i do ??
If u have it can u send me at ksuchdeva@Npi.stpn.soft.net
Khem
0
 
LVL 3

Expert Comment

by:dnoelpp
ID: 6230995
It's big! About 30 MB. I have an older version at home.

I investigated more thoroughly in the problem about reverse DNS:

If you do ping www.google.com, one of the things the ping does is showing the IP nr. of the server. Reverse DNS does the reverse: You have the IP nr. and want to get the DNS name. This doesn't work for your firewall, and that's why Sun refuses to let you download the source code.

Now the possible options:

1. Talk to your network admin to configure reverse DNS correctly. I wrote a small Java program which checks reverse DNS. Give as first parameter the IP nr. of your firewall. If you get back the IP nr. and not the domain name, reverse DNS is not configured correctly.

-----8<------
import java.net.InetAddress;

public class ReverseDNS {
    public static void main(String args[]) {
        if (args.length != 1) {
            System.out.println("ONE Parameter: IP-Nr");
            System.exit(1);
        }
        try {
            InetAddress ia = InetAddress.getByName(args[0]);
            System.out.println("host: " + ia.getHostName());
        } catch (java.net.UnknownHostException uhExc) {
            System.out.println("unknown host: " + uhExc);
        }
    }
}
------>8------

2. Take a modem and use your ISP and download it from modem. Most ISP have reverse DNS configured correctly.

3. Ask a friend to download it from their internet account and send it to you (like me!)

Please try the first two options first, then ask me. I need some time to get the source code myself (I am interested in the newer version, too!), because I have to do the same as you... :-(
0
 
LVL 2

Author Comment

by:k_suchdeva
ID: 6234289
1.
I have tried and i am sure that it is a reverse DNS problem only. Asking SysAdmin people configure it, will lead me to answer a few stupid questions like why do u want to download it, how it is related to your project etc. and i don't want that.
2.
In India Dial Up Accounts are never too fast  and reliable that u can download 30 MB of data without the connection getting disconnected.
3. So i am left with this option only and i will try.
But u also try downloading the same and in case i succed i will send it to u by splitting in parts.
Thanx

0
 
LVL 3

Accepted Solution

by:
dnoelpp earned 300 total points
ID: 6234402
I know the problem with Indian dial up accounts... :-( I worked in Pune for 6 months, and the dial up was a real pain in the neck. Most probably I will try to download it at home during the week-end, then make a CD, bring it to the office Monday, and maybe send it to you (in pieces?)
0
 
LVL 2

Author Comment

by:k_suchdeva
ID: 6234421
So nice of u.
There are lot of people in this thread, so let's not disturb them at all. U can contact me at ksuchdeva@npi.stpn.soft.net
Where are you working now ??
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb example issues 3 47
eclipse console opening separately 2 35
running on tomcat not jboss eap 7.0 3 28
netbeans can not run self signed app 8 7
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question