I'm doing a Java study and would like to learn without using those feature-rich IDEs that do it all. After several attempts to learn to use packages, creating them manually, one class is not able to see others outside the package. Here is a completely generic example:
The folder structure is as follows:
-pacotes
Teste.java(classe com main)
--objeto
Texto.java
And the file codes are as follows:
- > Test.java
package pacotes;
import pacotes.objeto.*;
public class Teste{
public static void main(String[] args) {
Texto t = new Texto();
}
}
- > Text.java
package pacotes.objeto;
public class Texto{
public Texto(){
System.out.println("Construiu um objeto");
}
}
When compiling the Text.java file everything happens normally, but when compiling the Test.java speaks the package 'packages.object' does not exist, what's wrong?