Sublime Forum

Java sublime repl is very slow

#1

Greetings all,
i created a sublime repl to run java code through sumblimetext based on instrucrions that i found here:

{
“cmd”: [“javac”, “$file_name”,"&&",“java”, “$file_base_name”],
“file_regex”: “^(…?):([0-9]):?([0-9]*)”,
“selector”: “source.java”,
“shell”: true
}
the problem is that a simple hello world is run sufficient quick,but bigger programs are too slow!
how can fix that problem?
i’m not familiar with regex…
java installation and are set up correctly and tested.
thanks in advanced!

0 Likes

#2

Build systems in Sublime just execute external tools to do their work (in this case, first javac to compile the program and then java to execute it). The regular expression in file_regex is being used to detect what lines of the output are errors so that you can navigate to them.

As such there’s nothing Sublime related per-se that can be done to make it faster; the thing that’s being slow is the thing that you’re doing, which in this case is running a Java program.

In what way are they “too slow”? Do they take too long to compile, or does running from beginning to end take a long time? Are you perhaps running something that tries to be interactive (requires you to enter data)? Something that prints out data a little at a time and you don’t see output until the whole thing is finally finished?

0 Likes

#3

thank you very much for your answer.
i have a small experience in python and a similar repl worked for me pretty well.
and was fast enough
it executes the command and give response to keystrokes quit good
in java case the repl for a simple program such as hello world works fine,but for a program a little more complicated such as a guessing number just not working,
i am waiting several minutes (not seconds!) to execute a command!
so i just turned to a another solution until i find (if there is) a solution for sumbiletext
thank you very much again for your answer!

0 Likes