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

nurseiit maksatbekov
PLUS
nurseiit maksatbekov
Courses Plus Student 313 Points

My workspace is not working giving these errors

Picked up JAVA_TOOL_OPTIONS: -Xmx128m . Picked up _JAVA_OPTIONS: -Xmx128m Error: Could not find or load main class Introduction.java .

Can't compile and run my code

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

Can you post a snapshot of your workspace (Use the camera icon in the top right corner.)

5 Answers

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

Hi there! The Picked Up Java Tools option message are not errors. They are informational messages about the memory settings on the JVM in Treehouse. It's nothing to be concerned with and has zero effect on your code. Here are a couple of posts by Treehouse staff where they elaborate on this:

Here is the error message that is telling you why it won't run:

Could not find or load main class Introduction.java .

According to this message, it cannot find "Introduction.java" and neither can I. When I open your snapshot, there is no Introduction.java. There is, however, a TreeStory.java. If you are 100% positive that you typed javac TreeStory.java and not javac Introduction.java then you may need to contact support at help@teamtreehouse.com. But before you do that, try and go up to View->Hide console and then View->Show console. This will refresh your console and clear any previous commands. This also has the benefit of putting you back in your home directory in case you somehow managed to navigate from there and that's why it can't find the files :smiley:

Hope this helps! :sparkles:

nurseiit maksatbekov
nurseiit maksatbekov
Courses Plus Student 313 Points

Caleb Kleveter

I can't run any code , for any code its giving the same error. I am using the workspace which is provided by Treehouse and its not working at all for all of my codes.

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

My guess is that you are just typing in the commands to run the program incorrectly. This is what you should run in the command-line:

javac TreeStory.java && java TreeStory
nurseiit maksatbekov
nurseiit maksatbekov
Courses Plus Student 313 Points

Caleb Kleveter

Yes i know about it, that's how i am running in command-line every time when i update my code.

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

Hmm, strange. It works correctly for me. I am not sure what is wrong if that doesn't fix it.

Tony Gemenie
Tony Gemenie
3,781 Points

Sup nurseiit-

In the notes he mentions an upgrade to the ide. This is a command that allows the jvm to start with more memory. JAVA_TOOL_OPTIONS: -Xmx128m. If you're getting an error here I'd test it out on another browser if that doesn't get it done you might look into something else locally. What's your workstation like?

nurseiit maksatbekov
nurseiit maksatbekov
Courses Plus Student 313 Points

Thanks for your answer , sorry i think i did not catch your question