java code doesn't run
Closed this issue · 7 comments
Whenever i submit java solution, it shows could not find Main class.. however on running exact same commands as script executes on terminal, I get proper result
For java code to run you need to write your program inside 'Main' class.
See http://aurora.pushkaranand.com/viewsolution/4 for example.
that one doesnt run, it says it could not find Main class
Can you paste the error displayed on both ui and logs from judge?
The error.txt shows :
NZEC || return code 1
could not find or load main class Main..
The terminal returns RTE with exit code 1..
However when I run same commands as judge executes , I get output written to output.txt
So compilation went fine. This means the Main.class is not generated or is not accessible. Check env folder for the files and their permission. Also paste the same here.
I would be helpful if you describe how you set up the judge and the environment you are using to run the judge.
I set up chroot jail, basically did everything as said in readme.. the env folder is accessible by uid and gid 'judge' ..
every language works except java.. I have java7 but that shouldn't be an issue I think
It seems that you haven't mount /proc to jail's proc. Use following command to mount it.
# mount -o bind /proc /path/to/chroot/proc
Note : You have to mount /proc each time you restart your system.