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

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.