Classpath

F

freesoft_2000

Hi everyone,

I need to ask a very generalised question about
classpath.

Now i have a java class file named JTim.class

Now on the command line i run JTim like that

C:\j2sdk1.4.2\bin\java -cp .;C:\WINDOWS\Desktop\JProc\ JTim

Now do you guys see the folder in which JTim is in which is called
JProc. You see in JProc there is another folder called JProcTim

Now in the folder called JProcTim is a java class file also named
JTim.class

Now my question taking into account that to run the class JTim in the
JProc i did this

C:\j2sdk1.4\bin\java -cp .;C:\WINDOWS\Desktop\JProc\ JTim

is why does the intrepreter run the JTim class in the JProcTim folder and
not the one i specified which is the JTim class in the JProc folder?

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
 
R

Roedy Green

C:\j2sdk1.4.2\bin\java -cp .;C:\WINDOWS\Desktop\JProc\ JTim

What this says is:

use the jdk 1.4 debug version of the java run time.
The classes are either in the current directory or
C:\WINDOWS\Desktop\JProc\
The name of the class file is JTim.class
It has the default (no) package.

Inside the JTim.java file you should see public class JTim with a
public static void main method. It should have no package statement.

For further hints, see http://mindprod.com/jgloss/classpath.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top