You can set the JAVA_HOME environment variable to specify your Java 2 SDK installation directory. For example, if you are using the CPAN installer you can do: JAVA_HOME=/path/to/your/j2sdk/installation cpan Inline::Java