Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling and running classes that import custom packages

 
Nick Neidig
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Nick Neidig
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Maulin and Dirk for responding to my question. I was able to compile both of the classes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic