Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to run compile package created by myself

Status
Not open for further replies.

anto2

Programmer
Apr 4, 2001
29
IE
Hello I have the following directory structure

f:\javatimesheet\ie\core\timesheet\data and in my java source file I have
package ie.core.timesheet.data;
public class ...

if I am in the directory data and the source file is there i can compile but I cannot run the class.

I thought this would do it java -classpath .;f:\javatimesheet\ie HelloWorld

or to compile it i thought javac - classpath .;f:\javatimesheet\ie HelloWorld.java
which won't compile.

Anthony.
 
Your java classes will be in "ie/core/timesheet/data/" you try appending entire path.

Regards,

Swaroop.
 
I have sorted the problem to compile this works
javac -classpath .;f:\javatimesheet HelloWorld.java if I am in the data directory.

I have found out that the classpath must point to the directory containing the start path of the package.

Regards
Anthony.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top