Solved

Source code for all the native implementations in Java

Posted on 2001-06-27
11
289 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
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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now