Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when 2 Classes in One submission #2

Closed
arikrak opened this issue Sep 8, 2014 · 4 comments
Closed

Error when 2 Classes in One submission #2

arikrak opened this issue Sep 8, 2014 · 4 comments

Comments

@arikrak
Copy link

arikrak commented Sep 8, 2014

One can include 2 classes in one submission file locally or on Ideone. When including 2 classes in one Java file on Compilebox, it reports "Execution timed out". For example:

class Main{
    public static void main(String[] args) {
        System.out.println("hello world");
    }
}

class Blob{
    int num;
}

This causes a "timeout error":

Java file was saved!
Input file was saved!
.../DockerTimeout.sh 6s  -u nobody -i -t -v  
".../temp/fa910475be662845df3e":/usercode virtual_machine /usercode/script.sh javac file.java './usercode/javaRunner.sh' 
------------------------------
ATTEMPTING TO REMOVE: temp/fa91...
------------------------------
Timed Out: temp/fa910... Java
@arikrak
Copy link
Author

arikrak commented Sep 8, 2014

See #3
Not sure how this could be, but 2 classes in a file only seems to work on a micro ec2 instance, not a medium one.

@osman-mian
Copy link
Contributor

Hello Arikrak,

Thanks for pointing out the issue, it seems strange because the code you wrote seems to run correctly on our test server

codepad.remoteinterview.io.

Try directly loging into bash of your docker vm, and check if "javap" command is present/installed in it.

What is the output when u run javap ?

@arikrak
Copy link
Author

arikrak commented Sep 9, 2014

Yes, javap is installed, and it works when I run it within Docker.

javap Main

class Main {
Main();
public static void main(java.lang.String[]);
}

and similarly for javap Blob.

So I guess there's just an issue with my installation that prevents the 2 files from successfully running.

@arikrak arikrak closed this as completed Sep 9, 2014
@arikrak
Copy link
Author

arikrak commented Sep 9, 2014

It seems running sudo killall nodejs (or the equivalent) was the cause of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants