Hello, folks!
My teacher has given us a script he’s written himself for us to use to compile Java. I have organized the folders a specific way (different from our teacher’s) because I like my own way of organising things.
My folder structure:
prg/
├─ EasyGraphics.java
├─ class/
│ ├─ lab/
│ ├─ lesson/
│ ├─ GraphicsLesson.java
├─ libraries/
├─ eg/
The script he gave us:
{
"cmd": ["javac \"-Xlint:none\" \"-cp\" \".:..\" \"-encoding\" \"utf8\" \"$file_name\" "],
"shell": "true",
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java",
"variants":
[
{
"name": "Run",
"cmd": ["java \"-cp\" \".:..\" \"$file_base_name\" "],
"shell": "true"
}
]
}
The script gave me trouble for when I put EasyGraphics in a different folder, so I edited it to this:
"cmd": ["javac \"-Xlint:none\" \"-cp\" \".:../../../.\"
When I compile GraphicsLesson.java it creates a large amount of (*.class) files in the prg dir but I’d like to have them created in /libraries/eg - how can I achieve this?
So far I’ve tried:
"cmd": ["javac \"-Xlint:none\" \"-cp\" \".:../../../.:libraries/eg\"
"cmd": ["javac \"-Xlint:none\" \"-cp\" \".:../../../.:/libraries/eg\"
"cmd": ["javac \"-Xlint:none\" \"-cp\" \".:../../../.\/libraries/eg\"
And more, but nothing seems to work.
Any help is greatly appreciated. Thanks.