Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Objects (Retired) Meet Objects Welcome Back

Error: JavaREPL in workspace terminates after first statement

Are there any tips to get JavaREPL working in the Treehouse workspace?

When I try to write a basic Java statement like String name = "Dan";, the REPL just says "Terminating...".

Here's the full I/O:

treehouse:~/workspace$ java-repl                        
Welcome to JavaREPL version 272 (Java HotSpot(TM) 64-Bit
 Server VM, Java 1.8.0_20)                              
Type expression to evaluate, :help for more options or p
ress tab to auto-complete.                              
java> String name = "Dan";                              

Terminating...                                          
treehouse:~/workspace$

Updates:

  • I am mainly running on Chrome and getting these errors. I also tried a few times on Internet Explorer and got the same "Terminating..." error.
  • 2014-12-20: I tried creating a new Java workspace, which had the same error. I've sent a message to support.
  • 2014-12-21: I tried creating another new workspace that also didn't work. The first two times executing java-repl in the console, I wasn't even able to connect. But, at least I was able to connect after that. Then, it quickly terminated for the first Java statement that I entered. Then, I tried deleting all the workspaces, and creating a new one, which also didn't work when executing any Java statement. It appears that executing :help in the JavaREPL in the workspace works.
  • Here's another one of the errors I saw. But, at least this one went away the third time that I tried running java-repl.

    treehouse:~/workspace$ java-repl                                
    Welcome to JavaREPL version 272 (Java HotSpot(TM) 64-Bit Server 
    VM, Java 1.8.0_20)                                              
    Type expression to evaluate, :help for more options or press tab
     to auto-complete.                                              
    
    ERROR: Could not start REPL instance at http://localhost:59049  
    
    Terminating...                                                  
    treehouse:~/workspace$
    
  • 2014-12-21: A new workspace on Firefox presented the same problem.

  • 2015-01-09: Re-using the last Java workspace I made last year, the same error still occurs.

4 Answers

Stone Preston
Stone Preston
42,016 Points

Craig mentions that it crashes from time to time. have you tried reopening your workspace and restarting the repl? Does this happen every single time?

It closes every time the first line of code is entered. I've tried restarting REPL a few times and I've created a new Java workspace to try it in with the same "Terminating..." error. The code I've tried has just been various simple String and int assignments and just !true closes REPL also.

Stone Preston
Stone Preston
42,016 Points

what browser are you using? I just tried in chrome and it worked fine so you might try chrome if you arent using that already

I'm using Chrome now, but I'll try fully restarting it and let you know. And, perhaps even try IE after I get the pre-loaded dust off of it.

Stone Preston
Stone Preston
42,016 Points

hmm strange. I definitely would have thought recreating the workspace would have fixed it. if you still cant figure it out I would contact support. could be an issue with your account or something. pretty weird though. all the things you said you have tried probably should have had some degree of success, and I tried on mine and it worked so its not like its a site wide issue or anything. not too sure whats up

Okay, I'll report this possible bug to support. Fully restarting Chrome didn't help. Using Internet Explorer still shows the same "Terminating..." error for the first code entered.

Stone Preston
Stone Preston
42,016 Points

yeah something strange is going on. I just tried the same exact code again and it worked for me, so its not like its invalid syntax or anything like that.

Thank you for your help. Maybe a geo-server is just down temporarily or has a bad copy. I'll update if I learn anything new from more testing or support.

Stone Preston
Stone Preston
42,016 Points

yeah it seems like it could be an issue with the server your workspace is hosted on or something like that. good luck

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Hey Daniel,

Can you try creating a new workspace? Seems like something is wrong and that specific workspace instance is running out of memory, for some reason.

Let me know if that doesn't work and I will escalate the problem to our developers.

Sorry for the frustration!

Okay, I've just tried creating a new workspace. Unfortunately, the same problem is still occurring. Also, I've updated the the origin post with a few more details on what I have tried so far.

GURVINDER SINGH
GURVINDER SINGH
10,589 Points

Well I'm experiencing the same problem, Java-repl is terminating upon hitting the return key...