Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

Source code for all the native implementations in Java

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
k_suchdeva
Asked:
k_suchdeva
1 Solution
 
ValeriCommented:
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
 
dnoelppCommented:
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
 
dnoelppCommented:
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
TimYatesCommented:
Java is not completely OpenSource...  

I doubt you would get these without decompiling one of the JVM's (Sun, IBM, etc...)
0
 
dnoelppCommented:
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
 
dnoelppCommented:
Er, I got confused, it's just my firewall which is not configured correctly... Just try it out, maybe you have success!
0
 
k_suchdevaAuthor Commented:
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
 
dnoelppCommented:
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
 
k_suchdevaAuthor Commented:
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
 
dnoelppCommented:
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
 
k_suchdevaAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now