how to get the command line arguments from another class with java
so suppose I have a java package.... it's got the main class with the main method and then it's got a whole bunch of other classes..... my question is, is it possible to get the args that was passed into the main method from these other classes that are not part of the main class but in the same package... paxdiablo No, not portably, there may be some trickery based on the JVM implementation but I've never seen it, and it would be a very bad idea to rely on it even if it existed. If you want those values elsewhere, the main function needs to make them available somehow. An easy way to do this