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 trialchenzhang4
Courses Plus Student 916 Points';' expected
jshell> javac Example.java
| Error:
| ';' expected
| javac Example.java;
can some one tell what is wrong with this?
1 Answer
Richard Lambert
Courses Plus Student 7,180 PointsHello mate,
I don't think you can run the java compiler from within jshell. If you're simply trying to compile your source code, exit out of jshell by typing /exit
or CTRL+D
and then try running javac Example.java
. Typing /help
from within jshell will present a list of valid jshell commands, along with an explanation on their use.
Hope this helps
Craig Dennis
Treehouse TeacherCraig Dennis
Treehouse TeacherHi chenzhang4 ! Did Richards post help and got you compiling? If so can you please mark his question with Best Answer?
Hope everything is going great now!