Java Runner on c9.io

runner
java

#1

Hi everyone.
Ive use this tutorial to setup Java runner & builder :

Now, I’ve a problem. My classes are in src/ folder
on bash i type : cd src/
After, javac Voiture.java

I run my class with the bash, that work :
java Voiture print “Hello World”;

But, when i click on Run, i’ve this error :

Running Voiture
Error: Could not find or load main class Voiture
Process exited with code: 123

Why, please?


#2

It would be better if you can share the code of your class too.


#3


#4

It looks like it should work. Can you tell us what happens when you try building and running your code from the command line?

Like:

$ javac src/file.java
$ java ... 

Does it work then?


#5

yes, i know, with the bash command it works. First it is necessary to compile with the javac command to generate the .class file. After with the java command it prints : Hello World!.

But i need to run without the command, directly from the green button Run.


#6

Hi,

Maybe this example can help.


#7

What he is asking and what I am wondering too:

How do you get java to run from the run button in the current directory?

the current tutorial means you have to have all the source code in one /src file and do a separate build and run command. Doing javac and java commands in the console works for now but I would like to be able to utilize the custom runner to get the Run button to work.


#8

Do you know if running JApplet works ?