View Single Post
  #2 (permalink)  
Old 12-05-2007, 04:47 AM
staykovmarin staykovmarin is offline
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
Yes you have to do -cp, otherwise java wont know where to look for your classes.

When you compile a package, you should make sure that you have the right structure:
Code:
package com.examples;
That means that your structure would be:
Code:
|-src |-com |-example |-Test.java |-Other.java
so when you compile, you would cd to the src folder, and type
Code:
javac com.example.Test.java
Reply With Quote