My goal is to deploy an ear file in JBoss 7.1.1. One of the classes in the ear file (which I cannot change) is using sun.net.util.IPAddressUtil class of JRE’s rt.jar.
In my IDE (eclipse) resolves this class and it compiles normally. But when I try to deploy (the ear containing the class) on JBoss 7.1.1, it gives me java.lang.NoClassDefFoundError: sun/net/util/IPAddressUtil. JAVA_HOME variable is set in my machine and I see that both JBoss and eclipse use the same JDK (1.6.X)
When I bundle the EAR with rt.jar in lib folder, the EAR deploys properly (which is a bad approach).
I have looked at JBoss community which says to configure as module for any third-party jars. However, the class I need is with in the rt.jar, I’m not in favor of adding it as module
Is there a way to configure JBoss 7.1.1 to manually look at %JAVA_HOME%/jre/lib/rt.jar ?
Thanks in advance.