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

Is there something wrong with this program or how it is compiled?

I am currently on the second tutorial (see code below):

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("Hello my name is Damon");
    console.printf("Damon is learning to write java");

} }

However when I compile it, i get the message:

Picked upmx JAVA_TOOL_OPTIONS: -Xmx128m

This doesn't appear in the tutorial. THen, when I run the program using (java Introductions), it runs the program from the previous tutorial, with just the first line of text and nothing of the second. Where am I going wrong??

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Here is a post regarding this particular warning by a member of Treehouse Staff. Hope this helps! :sparkles:

Also, make sure you've saved your file if it's only doing the one print.

Thank you Jennifer. I was forgetting to save :-) Much appreciated