Javac: command not found


Student of mine created a new blank workspace and tried to run a sample java program I provided. The student received the following error when compiling the file from the terminal:

########:~/workspace/QuarterGrade/Version 1 $ javac
bash: javac: command not found

I have run it on my account and it works just fine. I also could not compile ANY java file on this student’s workspace.

What am I missing?

Howto run simple program with javac

So I did a directory look up to where Java should have been installed and low and behold, it wasn’t there. I installed jdk calling this command from the terminal:

sudo apt-get install openjdk-6-jdk

I have gone ahead and fixed this student’s workspace but this is the first time I have ever had to do this. Is this something C9 overlooked or is it just expected that the end user needs to install Java?


Afaik, the normal Ubuntu template (aka “blank”) for c9 doesn’t come with pre-installed JDK.

(And I’m totally fine with it)


is there a template that comes with jdk preinstalled so the kids don’t have to do this extra step?


I tried using the custom workspace as per the video. I figured that gave me an Ubuntu environment much like the one I provide at school for my students: text editor + shell with jdk installed.

Looks like openjdk is installed but not the standard jdk from Oracle? I can’t get javac recognized, What’s going on?

I would love to use your environment with my students so they can work at home with an environment they are used to and get ahead on their assignments!

Please help!


OOPS, here’s the video I was talking about above,



sudo apt-get install openjdk-6-jdk
didn’t work either.