• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Compiling and running classes that import custom packages

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Maulin and Dirk for responding to my question. I was able to compile both of the classes.
 
No matter how many women are assigned to the project, a pregnancy takes nine months. Much longer than this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic