473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

sun's source code

I use Netbeans to write all my code and I've noticed that if I do it
wrong and the program throws an (unexpected) exception, it becomes
possible to see the source code for the all the classes used leading
up to the exception.

I presume it must be possible therefore to somehow view the source
code for all the classes in sun's library (e.g. Swing, awt, sql).

I reckon this would be a pretty good way of learning how to write good
java.

How do you do it?

Andy
Jul 17 '05 #1
3 1687
The source code (well a lot of it) is in the JDK.
Jul 17 '05 #2
Tim Lambert wrote:
The source code (well a lot of it) is in the JDK.


it is in compressed file called src.zip in the JDK

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 17 '05 #3
Andy wrote:
I use Netbeans to write all my code and I've noticed that if I do it
wrong and the program throws an (unexpected) exception, it becomes
possible to see the source code for the all the classes used leading
up to the exception.

I presume it must be possible therefore to somehow view the source
code for all the classes in sun's library (e.g. Swing, awt, sql).

I reckon this would be a pretty good way of learning how to write good
java.


For professional reasons I've never looked at Sun's source code : however
those that have tell me that it's nothing to write home about.

You would do better to delete src.zip right away, and study the code of
Wonka or Classpath instead. You'll find some good code there too, and more
important you'll be able to do something with what you learn: improve some
of the less good bits or fill in the gaps. With Sun's code, if something
looks to you like it could be done better then there's not much you can do:
with an open source project you can propose an improvement, and either you
will be thanked or the original dveloper will tell you just why you're
wrong. :)
--
Chris Gray ch***@kiffer.eunet.be
/k/ Embedded Java Solutions

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris Grimble | last post by:
I have a very simple applet that I am trying to make compatible with both Microsoft's JVM and Suns JVM in Internet Explorer. However, when I turn on the Sun JVM it works occasionally, but...
1
by: John Dumais | last post by:
Hello, I have a templated class defined in a header file and implemented in a cpp source file. The class is basically a little marshaler that contains a factory method and a few marshaling...
2
by: qazmlp | last post by:
When I compile my C++ source code, I am getting hundreds of following warning. "/opt/SUNWspro/WS6U1/include/CC/Cstd/./ios", line 148: Warning: std::basic_ios<char, std::char_traits<char>>::copyfmt...
3
by: modemer | last post by:
Hello, I got weird compiling message similar like following when I compiled my simple code on Sun 5.8 with CC WorkShop 6 update 2 C++ 5.3. CC -g -o myclass.o -c myclass.cpp CC -g -o main.o...
1
by: Karl Meise | last post by:
I'm about to embark on recompilation of a basic interpreter that was last compiled with Sun C 3.0. I understand that there are substantial differences between Sun C versions 3.0 and 4.2 (for...
12
by: howa | last post by:
any side effect for PHP? what do you think?
27
by: Dave | last post by:
I'm having a hard time tying to build gcc 4.3.1 on Solaris using the GNU compilers. I then decided to try to use Sun's compiler. The Sun Studio 12 compiler reports the following code, which is in...
2
by: sunil | last post by:
reading http://docs.sun.com/source/819-3690/Program_Org.html#37468, I see there are two ways to instantiate templates: template definitions included, template definitions separate, does template...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.