I've been trying for 2 days to use JavaC and Javatar just to run an app that is in Eclipse from the console but I have not been successful.
Using these guides link and consulting other responses from how to compile a package java in sublime text 3? I have managed to launch a java file without imports from the sublime and from the console, but when I put it to imports it stops working.
The error:
error: package modelos does not exist
error: cannot find symbol
With javatar, exactly the same thing happens.
When I compile A * .java file that comes alone without importing packages, it works and compiles correctly but when it comes with imports, it stops working and passes the same error, so I suspect that javatar and javaC are not using the directories of classes of the imports.
The question is
What other alternatives do I have to be able to run my Java app from a native terminal or windows? or if this is the case, how can I configure the sublime or any other text editor to do the compilation and run the app?
Solution!
Thanks to sjuan76
Create a bat file with the following instructions.
set CLASSPATH=#Aqui la ruta de salida de lo que se va a compilar.
javac -d %CLASSPATH% @clases.txt
cd %CLASSPATH%
java #direccion del fichero a ejecutar.
then that file connect it to the Sublime build config or run it directly from the terminal.