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 trialJohn Clune
Courses Plus Student 4,951 PointsJava up and running perfectly fine but can't pass this test.
C:\Users\jmclu>java -version
java version "14" 2020-03-17
Java(TM) SE Runtime Environment (build 14+36-1461)
Java HotSpot(TM) 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)
C:\Users\jmclu>
I'm just going to skip this but curious why it isn't working.
C:\Users\jmclu>java -version
java version "14" 2020-03-17
Java(TM) SE Runtime Environment (build 14+36-1461)
Java HotSpot(TM) 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)
C:\Users\jmclu>
1 Answer
Pedro Cabral
33,586 PointsIt has to do with the validator for the code challenge, specifically with the first line.
E.g. the output below will pass:
java version "99999.99999.99999_99999"
Java(TM) SE Runtime Environment (build 14+36-1461)
Java HotSpot(TM) 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)
Even though, that version is not valid and doesn't exist.
I assume that the first line is being put against a regex pattern. In your case it fails because the output has a different format of what used to be when the challenge was created and Java was on version 1.8