Solved

Source code for all the native implementations in Java

Posted on 2001-06-27
11
318 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

729 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