Java Java Basics Getting Started with Java Strings and Variables

Richard Merritt
Richard Merritt
962 Points

MY workspace is not working. It keeps saying Picked up JAVA_TOOL_OPTIONS: -Xmx128m

MY workspace is not working. It keeps saying Picked up JAVA_TOOL_OPTIONS: -Xmx128m

instead of outputing what should be shown in the console

I think I saw a similar post before. What I recommend you is to download IDE program IntelliJ and install java 13 jdk. It's much better than using treehouse console.

Richard Merritt
Richard Merritt
962 Points

where do I download that at?

5 Answers

Download Community it's the free program: https://www.jetbrains.com/idea/download/#section=windows To download Java JDK (in another word java's brain): https://www.oracle.com/java/technologies/javase-jdk13-downloads.html

when you have finished installing both, start IntelliJ then click create project

I hope that your IntelliJ found automatic like this

my screenshot/ image link

Then click Create project from template

my screenshot/ image link

click next

Then write Testing or something ells you like. Once you have pressed next it will show up like this:

my screenshot/ image link

just click the first arrow so you can see the folder src where it has Main.class Just write simple Hello World ( you know how to do ) right-click and you can see the green play button Run Main my screenshot/ image link

Good luck!! Let me know if it works!! 👍🏽

Richard Merritt
Richard Merritt
962 Points

The hello world works when i use System.out.println("Hello, World");

HOWEVER... it does not work when I use "console.printf("Hello, my name is Richard"); " like treehouse is telling me to!

Any ideas as to why? Full code below:

package TeamTreeHouse;

import java.io.Console;

/* This is a simple Java program. FileName : "HelloWorld.java". */ public class Main { // Your program begins with a call to main(). // Prints "Hello, World" to the terminal window. public static void main(String[] args) { Console console = System.console(); console.printf("Hello, my name is Richard");

}

}

Richard Merritt
Richard Merritt
962 Points

Where do I download that at?

Richard Merritt
Richard Merritt
962 Points

The hello world works when i use System.out.println("Hello, World");

HOWEVER... it does not work when I use "console.printf("Hello, my name is Richard"); " like treehouse is telling me to!

Any ideas as to why? Full code below:

package TeamTreeHouse;

import java.io.Console;

/* This is a simple Java program. FileName : "HelloWorld.java". */ public class Main { // Your program begins with a call to main(). // Prints "Hello, World" to the terminal window. public static void main(String[] args) { Console console = System.console(); console.printf("Hello, my name is Richard");

}

}

Richard Merritt
Richard Merritt
962 Points

Also getting "'javac' is not recognized as an internal or external command"

When you are using treehouse console then you have to call console it's the console java language. When you are using real java language in IDE IntelliJ you call System.out.print("Hello world");

If you feel this is really too hard for you then I strongly to use console and try to fallow the video, about that error maybe you should google it out to find the answer or contact support for bug.

Try saving it (ctrl +s) before compiling it . that worked for me

Sidhant Khosla
Sidhant Khosla
2,508 Points

Hi is it ok if just use visual studio code?

As when i run java Introductions in the console, i get this output:

Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m