running jar in a terminal using axis2
- by Emilio
I'm trying to run in the command line a java application distributed in a jar file. It call an axis2 web service, so the jar contains a /axis2client directory with rampart.mar security module.
It works fine while I run it in netbeans, but it throws an exception if I try to run it in a terminal using this command:
java -jar myfile.jar
The Exception:
org.apache.axis2.AxisFault: invalid url:
//file:/home/xxx/Desktop/myfile.jar!/axis2client/
(java.net.MalformedURLException: no protocol:
//file:/home/xxx/Desktop/myfile.jar)
As you can see, it's trying to use the /axis2client directory inside the jar, as when I run it in Netbeans, but It fails with a MalformedURLException. I think it's something about the protocol 'file:', probably '//file:/' must be 'file:///'.
The problem is that I cannot change this call to the directory because the method that loads the /axis2client directory it's not mine, it's from another library that use my project and include all the axis2 support.
So, any idea??
Thanks in advance lads!