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

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

I canΒ΄t type java-repl in my console and open the PERL ...

Hello community,

I want to type java-repl in my console and open the REPL.

I am to lazy to navigate to the folder with the javarepl.java file and type "java -jar javarepl.jar", so I added the javarepl.jar to the PATH variable.

But the java-repl command doesn work :(

Is there a way to fix it?

2 Answers

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

You want to add it to your CLASSPATH and not your PATH. Confusing eh? Yay for lazy, always makes you learn more!

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

My problem is this:

vpn-244-231:android nexuskiller$ java-repl -bash: java-repl: command not found vpn-244-231:android nexuskiller$

The javarepl.jar is in one particular folder called "android". If i navigate via terminal into this folder and type java-rep i get this:

-bash: java-repl: command not found

I have to type the command "java -jar javarepl.jar" when i am in the android folder to start REPL. But i want be able to type "java-repl" to start REPL ....