-
-
Notifications
You must be signed in to change notification settings - Fork 20
"Current file is not main class" error when running main class #71
Comments
Javatar does not use Sublime Text's build system at all. If you want to compile the project, please use Javatar's build system instead. And also could you give me the following info?
|
|
Are there any other plugins that are known to not work well with Javatar that could be causing this issue? Because I do have more plugins on my desktop than I do on my laptop. |
As far as I know, no. There is no plugin conflict since I release the Javatar. |
Hmm, if it'll help, here is the package list on my desktop
|
If possible, could you please try replicate the issue again with only Sublime Text and Javatar (Package Control is optional, you could install it in order to install Javatar and leave it there). If the issue still persist, could you try with Javatar v2.x.x? Which could help me know if it's the main class algorithm issue or the structure of the project itself. |
I just tried running a Java program using the latest ST3 portable build, Package Control, and the latest stable Javatar (not 2.x.x) and it worked, so I think its some conflict with a package. I'm going to remove some old packages and see what happens. UPDATEI removed all the packages I had on my desktop that I didn't have on my laptop, and the same error still persists. Perhaps something has been corrupted with my sublime installation? |
Huh, so sublime just updated to Build 3126 and I'm no longer getting the "File is not compiled" error. No idea why it wasn't working in the first place, but it's gone now. ..... and nevermind, closing and reopening ST3 reintroduced the problem. I tried deleting the ST3 folder from AppData and uninstalling ST3. then reinstalling ST3 and installing only Package Control and Javatar. Still didn't work. Will try the 2.x.x version of Javatar now. |
Trying to build a file with SublimeLinter and Javatar 2.x.x installed as the only packages gives me this error:
|
Hmm, could you check your Sublime Text's settings? Did Javatar add a correct JDK path and such into your settings? Meanwhile, I will check Sublime Text for potential API changes as you seem to get error on specific build of it. |
I used the Javatar Menu and reselected "Default JDK" and tried running classes, and it seems to be working for now, but again I have no idea what has changed to facilitate this. (I also installed the other packages I normally use and there seems to be no issues) However, and I think this to be a separate issue with 2.x.x, I found that closing and re-opening ST3 will reset the selected source folder and go back to using the root folder by default. I have to manually add the proper source folder and then the files build and run properly. |
Ah... that would make sense. Sublime Text does not store any project data upon quit / exit the program so any data that Javatar stored will be lost (this including source folder, selected JDK and project-wide settings). You have to use a project in the Sublime Text in order to store these data upon reopening the Sublime Text. Both Sublime Text 2 and 3 has this effect hence both Javatar v1.x.x and v2.x.x could affect by this. |
I just updated ST3 on my Linux laptop and ran into the same "File is not compiled error," which was fixed by upgrading to Javatar 2.x.x. At this point I believe that there is an issue with the current stable branch of Javatar and the current build for ST3. What that issue is I have no clue however, as the error in the console just says that the file is not compiled. |
Alright, thanks for the work you've done. I'll try to reproduce it on my machine and see if it's also happens to me. If not, I think I'll leave this issue open as it still unclear of what cause this to happen. |
When running the command "Builds->Run Main Class" from the Javatar menu, I get a popup with the error "Current file is not main class." However, building works fine. Looking in the ST3 console shows nothing, and I have no idea why I'm not able to run the files on this computer, as my laptop with the same versions for ST3, Java, and Javatar is able to run the files with no issue.
The text was updated successfully, but these errors were encountered: