Searching for "classpath"

Q:

What is the difference between path and classpath?

Answer

Path contains path of .exe files(commands).


Classpath contains path of packages. packages can be stored in folder or .jar files

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What is difference between Path and Classpath?

Answer

Path and Classpath are operating system level environment variales. Path is used define where the system can find the executables(.exe) files and classpath is used to specify the location .class files.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory /home/bob using the command: java -classpath /test:/home/bob/downloads/*.jar games.Chess Bob's CLASSPATH is set (at login time) to: /usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar What is a possible location for the Chess.class file?

 

A) /test/Chess.class B) /home/bob/Chess.class
C) /test/games/Chess.class D) /user/lib/games/Chess.class
 
Answer & Explanation Answer: D) /user/lib/games/Chess.class

Explanation:

/user/lib/games/Chess.class could be the possible location of the file

Report Error

View Answer Report Error Discuss

Filed Under: Operating Systems

Q:

What is difference between Path and Classpath?

Answer

PATH and CLASSPATH are operating system level environment variables. PATH is used to define where the system can find the executables (.exe) files whereas CLASSPATH is used to specify the location of .class files.

Report Error

View answer Workspace Report Error Discuss

Subject: Java