I wrote a java program:
$ cat com/oca/controll/Controll.java
package com.oca.controll;
public class Controll {
public static void main(String[] args){
...
}
public static void change(Adult adult, int age){
...
}
}
class Adult{
...
}
and compiled it successfully:
$ javac -d output com/oca/controll/Controll.java
$ ls -l output/com/oca/controll
-rw-r--r-- 1 user1 abc 483 Jan 9 10:34 Adult.class
-rw-r--r-- 1 user1 abc 1029 Jan 9 10:34 Controll.class
when I tried to execute it, it gave the following error:
$ java -cp output/com/oca/controll com.oca.controll.Controll
Error: Could not find or load main class com.oca.controll.Controll
What can be wrong here?