I’ve been enjoying using the “Automatic” Build-Package so far for Java-files. However I recently learned about User-Defined Java-Packages and have started to use them, i.e., putting several Java Classes in the same Java-Package. In order to compile my Java-Packages in Windows Command-Prompt, the working-directory of the Command-Prompt needs to be at the parent-folder of the folder that contains the Package-Classes concerned. I need to make a Sublime-Text Custom Build-Package which mirrors this process of keeping the working-directory of the Command Prompt at that parent-directory; the Automatic Build-Package in Sublime-Text won’t recognise external Classes referenced in any given Java-File otherwise, if Java-Packages are involved. I then need it to give me all the error-information on the Java-File I run it on, just as the Automatic Build-Package was doing before.
Could I have some help making a custom Build-Package please?
_william
#2
They answered me on Discord. The picture below shows the thread in which they gave me the solution.
To summarise, the correct code for such a Build-Package is
{
"shell_cmd": "javac \"package\\my_file.java\"",
"working_dir": "C:\\parent_folder_of_package",
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
}
0 Likes