Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

maven bootclasspath append

Avatar of rumi78
rumi78 asked on
5 Comments1 Solution2111 ViewsLast Modified:
I have built socket provider factory library: net-socket-provider by maven.
How should I configure other module pom.xml dependencies to use net-socket-provider in compile and tests as bootclasspath/a:net-socket-provider-1.0.jar ?

When I configure dependency as system or compile I get:
java.lang.SecurityException: Prohibited package name: java.net
        at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

at line:
        Socket.setSocketImplFactory(new MySocketFactory());

When I call by hand:
javac/java  -Xbootclasspath/a:net-socket-provider-1.0.jar ....
everything works correctly.
Avatar of Mick Barry
Mick BarryFlag of Australia imageJava Developer
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers