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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![John Smith](https://secure.gravatar.com/avatar/cdbd48ef21121b063c3cd68106d00b02?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
John Smith
39 PointsI tried the exercise of the first lesson. but It doesn't work for. Help me
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");
} }
What wrong with the code above? Please help me. Whenever I try, the error show as below.
treehouse:~/workspace$ javac Introductions.java
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
treehouse:~/workspace$ javac Introductions.java
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
Here is the Snapshop to check in detail.
Thanks John
1 Answer
![Jason Anders](https://uploads.teamtreehouse.com/production/profile-photos/3512822/micro_Jason_s-Pic.jpg)
Jason Anders
Treehouse Moderator 145,859 PointsHi John Smith
You've got the code correct, just not using the correct console command. You are using javac
and including the extension of the Class. Instead, you need to use java
(no "c") and not include the extension.
So, is should be java Introductions
Craig explains this in the video at timestamp 6:01 - 6:15.
Keep Coding!
John Smith
39 PointsJohn Smith
39 PointsDear Jason,
Thanks a lot for your helpful tips and suggestion. It works now.
Thanks again. John