java package does not exist -> Java Error

I have a file named “”, that contains my main function, and when I try to compile it, I receive a message:


Errors when trying to compile the code

I also have the folders “modelo” and “visao”, which contains some files that I imported on the class I tried to compile

Folder modelo:

Folder modelo

Imports I made on

So I wanted to know how I can compile the with the imports that I made.


If you have a directory structure like this:


You need to compile from the “top” of the directory structure, and you need to specify a full path to the file. You also need the files in modelo and visao compiled so the .class files are available.

myScr> javac

is a file separator on Windows. On Mac and Unix it’s /.