简体   繁体   English

从类路径加载axis2模块

[英]Loading axis2 modules from classpath

I am writing an Axis2 client which will not have access to a repository folder on the filesystem. 我正在编写一个Axis2客户端,该客户端将无权访问文件系统上的存储库文件夹。 Is there a way to load the modules which axis need for instance rampart and addressing, from the classpath. 有没有一种方法可以从类路径中加载轴所需的模块(例如,垒和寻址)。

you can add the .mar files to the class path. 您可以将.mar文件添加到类路径。 Axis2 can pick the .mar files in the class path as module files. Axis2可以在类路径中选择.mar文件作为模块文件。

Simply install axis2 on your filesystem and add it's lib directory to the CLASSPATH . 只需在文件系统上安装axis2并将其lib目录添加到CLASSPATH You can set it system wide or create batch/shell script to run your client. 您可以将其设置为系统范围,也可以创建批处理/ shell脚本来运行客户端。 I prefer batch/shell script where I can also set some other options. 我更喜欢批处理/ shell脚本,在这里我还可以设置其他选项。 With axis2 libs it can look like: 使用axis2库,它看起来可能像:

SET CLASSPATH=my_axis_client.jar;c:/axis2-1.5.1/lib/*
java -Dfile.encoding=utf8 yyy.zzz.my_axis_client

If you work on unix then instead of such 如果您在UNIX上工作,那么可以代替

SET CLASSPATH=...

use 采用

export CLASSPATH=my_axis_client.jar:/my/axis/lib/*

(be aware, on unix use : instead of ; to separate directories in the CLASSPATH ) (请注意,在Unix上使用:而不是;来分隔CLASSPATH目录)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM