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
Solved

Source code for all the native implementations in Java

Posted on 2001-06-27
11
304 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

837 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