1. A method for classpath environmental variable optimization in a platform independent runtime environment, the method comprising the steps of: a computer identifying a required class in an import statement in source code for a software program, wherein the required class is required by the software program; the computer identifying an element containing the required class in a classpath environment variable to form an identified element, wherein the element includes at least one of a directory and an archive file; and the computer generating a new classpath environment variable using the identified element.