Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!border2.nntp.ams2.giganews.com!backlog4.nntp.ams3.giganews.com!backlog4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 22 Jun 2014 02:33:44 -0500 Date: Sun, 22 Jun 2014 08:33:44 +0100 From: lipska the kat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Where is Java class located on Linux systems? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 48 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-VaOb2XAWrXzB7RO9P9OIDhOzmUlLmIGN9suMYV04uvBdO2vx7IxyAGgqraHq4DdOGg480t2ixxsM3ae!9ic6r+Kzn4H927ZsGPFMt34NVW/g0S2n1uNd+1p5JdhxpFCrTNrjtWgBnCfNbDIhPJTB+weGZkEl X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2643 Xref: csiph.com comp.lang.java.programmer:28814 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