Sublime Forum

Javac saying error when referencing another class in same folder

#1

Hey all, I am using sublimelinter with the javac package on windows 10. I recently had to get a windows computer. Before, I had linux. Javac worked perfectly for me on that computer. While it works fine for single class programs on windows, if I have multiple classes in the same folder and I reference one class from another (such as “OtherClass o = new OtherClass();”) the linter says it cannot find that object. However, if I hover my mouse over the class reference, it shows the reference I am making and it is correct, and if i manually compile it in the terminal, the file will compile with no problems. I tried adding the path to my jdk in the sublimelinter package settings, but something kept going wrong.

I did it like so.

"paths": {
        "linux": [],
        "osx": [],
        "windows": ["path\to\jdk\"]
    }

Am I adding the path incorrectly, or do I need to do something else?

0 Likes