daveagp / java_jail

chroot java jail, and JSON java trace printer
GNU Affero General Public License v3.0
79 stars 32 forks source link

VMStartException when running the main method from InMemory #10

Open lindstrum opened 6 years ago

lindstrum commented 6 years ago

I am getting the following error when running the main method from InMemory and inputting the text from test-input.txt.

image

I notice if I remove the highlighted line, I get output similar to the expected output, but it differs in the that there is an exception message as shown below.

image

I have tried changing the classpath manually in the program to a few things, but not much changes. I am not very experienced in programming, so this may be a small error I don't see.

daveagp commented 6 years ago

Hi Ethan,

I would be surprised if this would work if you try to run it interactively in Eclipse. I've only ever used it by command-line java and javac. Have you tried using that approach instead?

lindstrum commented 6 years ago

When I try from the command prompt, I get the following

image

This exception that is generated I previously solved in eclipse by adding the line System.getProperties().put("java.home", "C:\Program Files\Java\jdk1.8.0_20\jre"); but this nor changing the JAVA_HOME variable seems to change anything.

daveagp commented 6 years ago

I also should mention that I've never tried running this on Windows.

Well, the latter screenshot seems more informative. Do you know what is the problematic null? Looking at the code, I guess it could be the result of ToolProvider.getSystemJavaCompiler()? If you can check whether that's the case, maybe there's some caveats online about running that method on Windows.

malavancs commented 5 years ago

What are the major different between pythontutor's java_jail and this version