 |
Forums |
Admin Discussion Forums: help Start New Thread
By: xiao li
rjb seems can not load maven related rjb [ reply ] 2012-12-18 07:56
|
#ruby code
Rjb::load(classpath = '.../../../BasicJLib/target/BasicJLib-1.0-SNAPSHOT.jar', jvmargs=[])
MMail=Rjb::import('com.hulu.ap.basic.util.Mail') #Mail class is implemented on BasicJLib-1.0-SNAPSHOT.jar
#throws exceptions when running
in `import': javax/mail/MessagingException (NoClassDefFoundError)
#trouble shooting
javax/mail is envolved in BasicJLib project's pom file, not in default JRE. Here is a part of BasicJLib project's pom file:
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
So, I guess if a java class is not in default JRE, we should import it manually, otherwise it will throw the above exception.
However, in my project, many jars are envolved through maven pom.xml method, not from disk path. If I still want to use maven environment, how can I solve this problem?
|
|
 |