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 trialJeremy Bradrick
6,731 PointsIntroductions.java Doesn't work
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 Jeremy");
} }
treehouse:~/workspace$ javac Introductions.java Picked up JAVA_TOOL_OPTIONS: -Xmx128m Picked up _JAVA_OPTIONS: -Xmxx128m treehouse:~/workspace$ ls Introductions.class Introductions.java treehouse:~/workspace$ java Introductions Picked up JAVA_TOOL_OPTIONS: -Xmx128m Picked up _JAVA_OPTIONS: -Xmxx128m treehouse:~/workspace$
3 Answers
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsHere is number of times people asked this question:
https://teamtreehouse.com/community/error-picked-up-javatooloptions-xmx128m
https://teamtreehouse.com/community/picked-up-javatooloptions-xmx128m
Please make sure you check 'Teacher's notes', right below the video:
It's not an error! Not to worry, the Picked up JAVA_TOOL_OPTIONS: -Xmx128m is not an error on your part, we recently just tweaked our setup to have more memory allocated. Don't fret that mine looks different!
And also feel free to check questions tab to the video you are posting...
Jeremy Bradrick
6,731 PointsEverytime I try to run java Introductions, I get the picked up statements, then it returns me to the command prompt without printing "Hello, my name is Craig"). I just started over again and same thing.
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsPost your Introductions.java file.
Like I showed you if it does look like the one posted above by you it should print "Hello, my name is jeremy".
Exactly that I showed you in the video ...
Apparently you have to make video of what you do, or at least make a screenshot with workspace showing your Introductions.java and result of java Introductions
command.
Without screenshot or video, I cannot help.
I see that you posted in your question, I believe you, but may be a screenshot or video can show me more...
In the worst case scenario, you can always try to run things locally,
Depending on OS you can install Java and then open Terminal and write commands there ...
Jeremy Bradrick
6,731 PointsI think the answer was that I didn't save it before compiling it. I went on to the next lessons about strings and variables and he adds another console.printf command. \n commands didn't take until I save it and recompiled it.
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsGreat, that you've figured that out.
Yeah, saving is important, I also forget from time to time.
It will come with practice. I also suggest you take nice course about workspaces here at treehouse.
May be it can help you:
https://teamtreehouse.com/library/using-treehouse-workspaces
Jeremy Bradrick
6,731 PointsJeremy Bradrick
6,731 PointsThank you for that. I see I did miss the error message. Now the only problem is, the code doesn't run. I noticed lots of people mentioning that as well.
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsAlexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsWell, I was not lazy and made a video, how I just copy paste your code in Workspace started from video, compiled and run your class. It works perfectly fine, take a look:
https://www.youtube.com/watch?v=hUoiV--5WNU
It prints "My name is Jeremy" just fine...