Skip to content
← Back to Community
Why is Repl so slow for Java?
Profile icon
GeorgeZhou1

I run code in Java in Leetcode editor and it takes less than 1 second to execute. But in Repl it takes like 5 seconds. Why is this? I'm trying to learn Java so I have to execute code A LOT because half the time the code has some sort of error or I just want to run a random piece of code to see if it actually works. Does anyone know of a faster platform? I'm using Leetcode right now but Leetcode honestly doesn't seem like a formal IDE to learn Java...

Voters
Profile icon
OnealWang
Profile icon
CybearTron
Profile icon
GeorgeZhou1
Comments
hotnewtop
Profile icon
Coder100

Repl.it is super slow for java, it always has been. I think it's because of the compiler they use, or how they are using it.

Anyways, create a .replit file, and inside put:

run="javac [File].java ; java [Class]"

Then, after you have compiled:

run="java [Class]"

Also report this to feedback!

Profile icon
Bookie0

Hi there!

A few hours ago repl.it had a sorta outage; the site was down, things were taking super slowly to load, etc.
it should be fixed now, but maybe still not working for you or something like that.

But anyways, what you've described seems like a bug, because Java should normally execute not in 5 seconds (unless your code is super super super long).
try one of the following:

  • reloading page/deleting tab
  • forking repl
  • making new Java repl to see if the problem persists
  • make a repl in a different lang to see if other languages have this problem. If yes, its most likely a bug, you can report it here

If you want faster platforms, try these:

https://code.visualstudio.com/

https://www.codiva.io/

https://www.jdoodle.com/

https://www.keycdn.com/blog/best-ide

;)

Profile icon
GeorgeZhou1

@Bookie0 I'm running the code right now with a fresh java repl that just prints "Hello World". It takes about 5 seconds every time I click the run button until I can see "hello world" actually printed out. In python Repl, it takes less than 1 second to see "hello world" printed out. I personally would prefer an online IDE as I don't like to deal with packages/installations of stuff locally.

Profile icon
Bookie0

hey,

I tried making a repl in java, and yea you're right it takes more or less 3-5 seconds to execute!

i tried searching online if java is slow, found this.)

and maybe this could be useful (probably not tho)

and i tried searching "java execution slow repl.it", but still didnt find anything unfortunately.
I guess you can suggest that repl.it make execution faster in feedback

So i guess you gonna have to live with it being slow, even if thats annoying. Or you can switch to another online IDE, i heard Vscode is great.

but yea sorry about that :/ @GeorgeZhou1

Profile icon
davidwbandel

it's beyond slow. crashes constantly. won't terminate. you have to do busybox reboot constantly.

and i asked their customer service if upgrading to a premium account would help with that and they never responded.

so that tells me

a. it won't

b. they don't care about their customers enough to answer questions if they're afraid it might make them look bad

Profile icon
linaresl1836

I use NetBeans IDE. It works great

Profile icon
APLegendsG

I suggest using Eclipse IDE.

Profile icon
DynamicSquid

Repl.it may be little slow for Java. You can try downloading a Java IDE like IntelliJ, or perhaps try getting repl.it's hacker plan for faster computing power. I would recommend downloading IntelliJ since it's free and used by professionals.