File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Compiling and running classes that import custom packages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compiling and running classes that import custom packages" Watch "Compiling and running classes that import custom packages" New topic
Author

Compiling and running classes that import custom packages

Nick Neidig
Greenhorn

Joined: Aug 29, 2003
Posts: 12
I have been unable to compile or run classes that import custom made packages. How do I, using a JVM version 1.4, compile and run class Client in package mygame.client, when it is importing class Utilities in package mygame.shared? I am using Windows XP and the directory mygame is stored directly on my hard drive. If you could write out what the command line instructions to the JVM would be to compile and run the Client class I would greatly appreciate it.
Thanks for your time.
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi Nick
Assuming you are having,
C:\mygame\shared
C:\mygame\client directories where you are storing corresponding java files, you can try this,
c:\>javac mygame\shared\*.java
if this compiles then,
c:\>javac mygame\client\*.java
Please see if this works.
Regards
Maulin
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, Nick!
This is a CLASSPATH issue.
I believe that Maulin's suggestion should work if your CLASSPATH setting includes the current working directory, or the root directory of your C drive.
Do you have enough information so far to get you started, or would you like a bit more of the ol' step-by-step?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Nick Neidig
Greenhorn

Joined: Aug 29, 2003
Posts: 12
Thanks Maulin and Dirk for responding to my question. I was able to compile both of the classes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiling and running classes that import custom packages
 
Similar Threads
package problem
Question about packages.
why?help me! : the import javax.servlet is never used
Packaging problem
Compiling servlet [was: HTTP Status 404 - Servlet Login is not available]