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 Getting Started with Java Strings and Variables

Program not running properly

Hey guys, im at the very start of the java course. I have copied the code he provided and im trying to print "test" to the console. My code looks like this:

import java.io.Console;

public class Introductions {

    public static void main(String[] args) {
        Console console = System.console();
        // Welcome to the Introductions program!  Your code goes below here
        console.printf("test/n");

  }
}

But when i try to run the program nothing happens but some weird "Picked up" messages: treehouse:~/workspace$ javac Introductions.java Picked up JAVA_TOOL_OPTIONS: -Xmx128m Picked up _JAVA_OPTIONS: -Xmx128m

And:

treehouse:~/workspace$ java Introductions Picked up JAVA_TOOL_OPTIONS: -Xmx128m Picked up _JAVA_OPTIONS: -Xmx128m

Can someone please explain this?

1 Answer

Brendon Butler
Brendon Butler
4,254 Points

I'm not sure this will solve your problem, but "test/n" should be "test\n" IIRC. It could also be an issue server side, I would try running the program on your own computer if you can.