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 trialabhi reddy
1,636 Pointsunable to load PezDispenser.java in workspace
repl not working and unable to load class
2 Answers
Enej Lah
Java Web Development Techdegree Student 957 PointsYou haven't write enought information about what's wrong, so i can't help you a lot, but try:
-restrarting the workspase
-if you can't run class, then you may forgot to save it, translate it to computer language by javac [program] or it may have some errors
-if it's possible to run java-repl, then terminate it and run it again
Hope any of this solutions will help.
Peter Ward
7,912 PointsThe same thing happened to me but I fixed it by using the absolute path to the file.
java> :load /home/treehouse/workspace/PezDispenser.java
I obtained the path by first running "ls" in the workspace (not in java-repl) to make sure that's where the file was and then by using "pwd" to get the full path to the directory.
treehouse:~/workspace$ ls
Example.class Example.java PezDispenser.class PezDispenser.java
treehouse:~/workspace$ pwd
/home/treehouse/workspace
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherOut of curiosity, have you tried View->Hide console and then View->Show console then trying to run the repl again? This will reset the console in case it is experiencing problems.