One basic difference when running the code those two different ways would be the values of the classpath and the current directory.