473,466 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can you figure out exactly where in the classpath a class is located ?

Tom
How can you figure out exactly where in the classpath a class is
located ?

For example, assume that my computer has a class
"com.MyCompany.MyClass" that is physically located in the jar-file
"c:\SomeDirectory\myJarfile.jar"
Also assume that this jar-file is included in my classpath environment
variable but there are also a lot of other jar-files and class
directories in the classpath...

Now I would like to figure out in which of all those classpath
jar-files and directories the class is located.
In other words, I would like to be able to do some kind of command
like this:

locateJavaClass.exe com.MyCompany.MyClass

That command would now show me the physical path to the jar-file above
(or possibly to a directory if it is not within a jar-file e.g.
something like this: "c:\SomeDirectory\com\MyCompany\MyClass.class" )
that contains the class that will be used when I execute "java
com.MyCompany.MyClass"

/ Tom
Jul 17 '05 #1
1 2026
Tom wrote:
Now I would like to figure out in which of all those classpath
jar-files and directories the class is located.
In other words, I would like to be able to do some kind of command
like this:

Tom,

http://www-106.ibm.com/developerwork...406_brown.html

Hope that helps,
Kenneth
Jul 17 '05 #2

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

Similar topics

1
by: Ric | last post by:
thx for the help. im having problems with java and jsp. i think im not settup up the enviornmental variables right in w2k advanced tab. im using a wrox book, but the wrox book references a servlet...
7
by: Herman | last post by:
Hi everyone, I recently installed the Sun J2SE SDK on my machine, and I am having trouble running the java.exe interpreter for my Java compiled code. I remember that I had to set my environment...
2
by: Abdelhalim MIMOUNI | last post by:
hi, i'm using the abstract class definition, and when compiling the abstract class it's ok, but the problem is when compiling the subclass: i get the following message: Rect.java:9: cannot...
3
by: Jim Hargrave | last post by:
I've read that it is possible to compile jython to native code using GCJ. PyLucene uses this approach, they then use SWIG to create a Python wrapper around the natively compiled (java) Lucene. Has...
2
by: Paul | last post by:
hi , i have started with "beginning JSP web development" and got stuck on extending classes. I'm getting the following error message: TechnicalBook.java:3: cannot resolve symbol symbol : class...
1
by: Digital Puer | last post by:
I am writing Java user defined functions running in DB2 8 on Windows XP. For some reason the Windows system environment CLASSPATH is not being passed to my Java UDF (i.e. when I println the...
7
by: dlarsson | last post by:
Okay folks, I thought I was doing something very, very simple, but I cannot seem to get this to work at all. Can anyone identify what I am doing wrong here-? _________________________________ ...
4
by: wizard of oz | last post by:
Can you post an example of Connection.connect (String, properties)? My java doc says java.sql.Connection is an interface and doesn't mention a connect method. TIA "Thomas Kellerer"...
1
Ganon11
by: Ganon11 | last post by:
Hey all, I'm setting up my computer to run Java for a class I'm taking, and I've gotten into a bit of a snag. I've set the CLASSPATH system variable to include the base folder of my homeworks...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.