How to create services in Java. Libraries. Design Patterns. Enums. Vanilla Java. Processing. When Runtime.exec() won't. As part of the Java language, the java.lang package is implicitly imported into every Java program.
This package's pitfalls surface often, affecting most programmers. This month, I'll discuss the traps lurking in the Runtime.exec() method. Pitfall 4: When Runtime.exec() won't The class java.lang.Runtime features a static method called getRuntime(), which retrieves the current Java Runtime Environment.