Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Basics Using your New Tools Multiple Strings

Sara Broad
Sara Broad
1,917 Points

I get an error in the console when running javac TreeStory.java

This is my code:

import java.io.Console;

public class TreeStory {

public static void main(String[] args) {
    Console console = System.console();
    /*  Some terms:
        noun - Person, place or thing
        verb - An action
        adjective - A description used to modify or describe a noun
        Enter your amazing code here!
    */
  String name = console.readLine("Enter your name:"  );
  String adjective = console.readLine("Enter an adjective:"  );
  console.printf("%s is very %", name, adjective);

}   

}

I get this when I enter javac TreeStory.java

treehouse:~/workspace$ javac TreeStory.java
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m

It doesn't create a class file (I think it is supposed to). Even if I clear it first, I still get this error.

4 Answers

Hello,

Those are not errors. Give it a couple more seconds and the code should compile and execute.

If not, try compiling and executing again by typing

clear && javac TreeStory.java && java TreeStory

in the console.

Hope I was able to help and good luck!

I got the same thing and it says 2 errors

Daniel Ricardo
Daniel Ricardo
114 Points

I got the same problem.

Hello,

Those are not errors. Give it a couple more seconds and the code should compile and execute.

If not, try compiling and executing again by typing

clear && javac TreeStory.java && java TreeStory

in the console.

Hope I was able to help and good luck!

Those aren't errors. They're commands for the Java compiler. Your code compiles fine.