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 Basics Using your New Tools Multiple Strings

Please advise. After testing the code I keep getting an error.

Hi guys. After testing this code:

//__ Name is a __ adjective __ __ noun. They are always __ adverb__ __ verb__. 
      int age = 12;
      if (age<13) {
        // Insert exit code
        console.printf("sorry you must be st least 13 or use this program.\n");
      String name = console.readLine("Enter Your Name  ");
      String adjective = console.readLine("enter an adjective:  ");
      String noun = console.readLine("enter a noun:  ");
      String adverb = console.readLine("enter a adverb:  ");
      String verb = console.readLine("enter a verb ending in -ing:  ");

      console.printf("Your TreeStory:\n---------------\n");
      console.printf("%s is a %s $s.  ", name, adjective, noun);


I keep getting this message:

Picked up JAVA_TOOL_OPTIONS: -Xmx128m                                                                                
Picked up _JAVA_OPTIONS: -Xmx128m                                                                                    
error: Class names, 'TreeStory', are only accepted if annotation processing is explicitly requested                  
1 error

1 Answer

Jamie W.
Jamie W.
Courses Plus Student 3,931 Points

When loading the compiler, you are not writing "TreeStory.java". You are forgetting the ".java" at the end. It is

javac TreeStory.java

(Not javac TreeStory)