tags:

views:

48

answers:

2

When I do an import like this: import java.awt.event.MouseEvent;

I can use the methods/fields from that Class. I'm just wondered where this package actually located on my HDD.

+2  A: 

It depends on your system and your JRE emplacement.

On Mac OS it's in /System/Library/Frameworks/JavaVM.framework/Home/bundle/Classes/classes.jar

On Windows or Linux in $JAVA_HOME/jre/lib/rt.jar (thanks @kuropenguin for the information)
$JAVA_HOME depending on where you've installed your JDK.

On other systems, you'll have to look for yourself.

Colin Hebert
Small edit: the rt.jar file is in `$JAVA_HOME/jre/lib/rt.jar` on Windows.
birryree
In Linux under the /usr/java/*/jre/lib/rt.jar
dsmith
It depends on the bundle as well. Even on my Mac, I usually use the Oracle distro (formerly Sun) which installed to the same place as Linux. You really need to know which java distro you are running.
dsmith
@dsmith, which distribution do you use ? I never saw a Mac version of the JDK provided by Sun/Oracle
Colin Hebert
MacPorts has a distro. Now I think about it, it must have been openjdk6 that I installed on my Mac. Sorry, most on my actual development I do on Linux.
dsmith
A: 

If you have the class present in Eclipse you kan find the physical placement in the Properties for the class.

Thorbjørn Ravn Andersen