I have a file named “BibliotecaMusicalControle.java”, 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
Imports I made on BibliotecaMusical.java
So I wanted to know how I can compile the BibliotecaMusicalControle.java with the imports that I made.
If you have a directory structure like this:
mySrc controle modelo visao
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
visao compiled so the .class files are available.
myScr> javac controleBibliotecaMusicalControle.java
is a file separator on Windows. On Mac and Unix it’s