Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28814

Re: Where is Java class located on Linux systems?

Date 2014-06-22 08:33 +0100
From lipska the kat <lipskathekat@example.com>
Newsgroups comp.lang.java.programmer
Subject Re: Where is Java class located on Linux systems?
References <dd8b1a26-3168-454d-94ed-ddc473e28740@googlegroups.com>
Message-ID <VridnaV7B-lFGzvOnZ2dnUVZ7oudnZ2d@bt.com> (permalink)

Show all headers | View raw


On 22/06/14 04:52, Tom Tylor wrote:
> Hi all,
>
> For the "import ...;" lines, I just wonder where the class files are located on my system. Can anyone help?
>
> Thanks!
>
> Best,
> Tom
>

Thew short answer is ... it depends

On my particular Ubuntu Linux 12.04 LTS dev box I install the JDK 
locally, which allows me to log into different accounts to use different 
versions (there are other ways to do this).

So, my rt.jar resides in
/home/lipska/java/jdk1.7.0_51/jre/lib

I have a source directory
~/source/java for the source code

and a class directory
~/java/classes for the compiled classes

I add this directory tree to the IDE classpath

I also have a CentOS based system running as a server

java is installed in /opt/jdk1.7.0_51 so the rt.jar resides in
/opt/jdk1.7.0_51/jre/lib

My applications are deployed as jar files which are made available to 
the server by adding them to the server classpath which is usually done 
automatically if you deploy to the default location.

Finally, you can usually discover a class file (not encapsulated in a 
jar file) on systems that have the 'locate' facility as follows

$ sudo updatedb
$ locate SomeClass.class


-- 
lipska the kat - treacherous feline.
Proudly nominated for IPOTY 2014 - LIGAF
GNU/Linux user #560883 - linuxcounter.net

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Where is Java class located on Linux systems? Tom Tylor <tomcmpt@gmail.com> - 2014-06-21 20:52 -0700
  Re: Where is Java class located on Linux systems? markspace <markspace@nospam.nospam> - 2014-06-21 23:52 -0700
  Re: Where is Java class located on Linux systems? lipska the kat <lipskathekat@example.com> - 2014-06-22 08:33 +0100
  Re: Where is Java class located on Linux systems? Jeff Higgins <jeff@invalid.invalid> - 2014-06-22 08:00 -0400
  Re: Where is Java class located on Linux systems? Roedy Green <see_website@mindprod.com.invalid> - 2014-06-25 08:13 -0700

csiph-web