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 Local Development Environments How it Works The Java Virtual Machine

Sean Flanagan
Sean Flanagan
33,235 Points

Console error

Hi. I've typed in the syntax:

package com.teamtreehouse;

public class Systemizer {

  public static void main(String[] args) {
    System.out.printf("This is the classpath: %s %n",
                      System.getProperty("java.class.path"));
  }
}

When I type

clear && javac com/teamtreehouse/Systemizer.java && com.teamtreehouse .Systemizer

in the console, I get this message:

-bash: com.teamtreehouse.Systemizer: command not found 

Does anyone know what the problem is please?

Thanks. :-)

1 Answer

Christopher Augg
Christopher Augg
21,223 Points

Sean,

You just forgot the java command before com.teamtreehouse.Systemizer

clear && javac com/teamtreehouse/Systemizer.java && java com.teamtreehouse.Systemizer

Regards,

Chris

Sean Flanagan
Sean Flanagan
33,235 Points

It works now.

Thanks Chris. :-)

Christopher Augg
Christopher Augg
21,223 Points

You welcome Sean. Good to hear it is working for you now. Keep on coding!

Regards,

Chris