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
Tracy Cano
Java Web Development v2 Techdegree Student 8,455 PointsJava 21 output is being rejected by challenge
I installed Java 21 and ran java -version in Terminal. My output is:
java version "21.0.12.1" 2026-08-18 LTS Java(TM) SE Runtime Environment (build 21.0.12.1+1-LTS-4) Java HotSpot(TM) 64-Bit Server VM (build 21.0.12.1+1-LTS-4, mixed mode, sharing)
I pasted these results into results.txt, but the challenge says the output doesn't look right. Is there a specific format the challenge checker expects?
java version "21.0.12.1" 2026-08-18 LTS
Java(TM) SE Runtime Environment (build 21.0.12.1+1-LTS-4)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.12.1+1-LTS-4, mixed mode, sharing)
2 Answers
Travis Alstrand
Treehouse TeacherHey there Tracy Cano 👋
I'm sorry for the issue here! The only thing I can think of is now there is a 4th part to the version number that maybe the backend of this challenge is not accepting. For example mine passed with 21.0.5 and the current is 21.0.12.1.
I see that you've passed this challenge since posting this though. What was it that did it for you?
I may have to just remove this challenge if it's being difficult with the current Oracle download
Tracy Cano
Java Web Development v2 Techdegree Student 8,455 PointsI ended up running the java -version in the treehouse workspace which gave me the result that I needed to pass the challenge. For awhile, I was asking my computer terminal the same question, but it was giving me the result I had posted in the original question.
Travis Alstrand
Treehouse TeacherThat is very strange as it's after an instruction on installing Java on your machine. I'll have to try and look into this and see if it's fixable or if I'll just have to remove it.
Thank you so much for bringing this to our attention and providing your solution!! ⭐