title: Compiling scala files inside their package folder from Command Line
body: <p>I am trying to compile scala files from INSIDE their package folders. 
  So I have three files, <code>Patient.scala</code>, <code>PatientMonitor.scala</code>, and <code>VitalSigns.scala</code>, they all reside in the following path <code>gasguru/patient/</code></p>
  
  <p>Here is my file <code>VitalSigns.scala</code></p>
  
  <pre><code>// /gasguru/patient/VitalSigns.scala
  package gasguru.patient
    class VitalSigns () {
        var heartRate = 0;
    }
  </code></pre>
  
  <p>and I compile it with the following line: <code>scalac -d ../.. VitalSigns.scala</code>
  this results in the <code>VitalSigns.class</code> file being created in the same directory as I am currently in. </p>
  
  <p>Now if I go to compile <code>Patient.scala</code> which contains this: </p>
  
  <pre><code>// /gasguru/patient/Patient.scala
  import gasguru.patient.VitalSigns;
  package gasguru.patient {
  
    class Patient ( val firstName:String, val lastName:String) {
      val vitalSigns = new VitalSigns();
    }
  }
  </code></pre>
  
  <p>and if I try and compile it with this following line: <code>scalac -d ../.. Patient.scala</code> I get the following error </p>
  
  <pre><code>Patient.scala:2: error: VitalSigns is not a member of gasguru.patient
  import gasguru.patient.VitalSigns;
         ^
  error: error while loading VitalSigns, Missing dependency 'class gasguru.patient.VitalSigns', required by ./VitalSigns.class
  Patient.scala:6: error: VitalSigns does not have a constructor
          val vitalSigns = new VitalSigns();  
                                   ^
  three errors found
  </code></pre>
  
  <p>Why am I getting this error when the <code>VitalSigns.class</code> resides inside of the same directory as where I am compiling the file? Shouldn't importing it suffice? </p>
  
  <p>Thanks! </p>
  
  <p>EDIT: </p>
  
  <pre><code>chs@ubuntu:~/GasGuru/gasguru/patient$ ls
  exceptions            Patient.scala     VitalSigns.scala
  PatientMonitor.scala  VitalSigns.class
  </code></pre>