javac -cp /com/data/cour ; F.java
If you are using windows OS, First skip the First '/' because it is used in solaris for the root folder. and skip the ';' . Instead of semicolon (;) use a single space...
I think it will work fine ...
-cp or -classpath works for same . As an example. After the -cp tag you must specify the fully qualified name of the class.
So use
javac -cp com.data.cour -d . com/data/classeur/F.java
from root of com folder. -d . means where you want to save the class files...
[ simply to understand : -cp is followed by a fully classified class path and -d is followed by a directory location to store class]
Pictorially Example :
root
|
com
|
data
|
----cour
| |
| D.java & D.class
|
-----classur
|
F.java & F.class
Commands from root directory:
javac -d . com/data/cour/D.java
javac -cp com.data.cour.D -d . com/data/classur/F.java
To run :
java -cp com.data.cour.D F
I think this will work..
Oh check your code... You just import package not package Class
change that into
import com.data.cour.D