Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Compiling Jars -cp class1.jar ???????  RSS feed

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm trying to do this:

java -cp activation.jar; mail.jar; imap.jar; mailapi.jar; pop3.jar; smtp.jar; USGroups.jar USmain

and I get this err msg:

Exception in thread "main" java.lang.NoClassDefFoundError: mail/jar

Dose anyone have any idea what's wrong? How can I compile 2 Jars together?
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the spaces after your semicolons in your classpath are making your JVM think that you want to run the class "mail.jar" using the classpath "activation.jar".

java -cp activation.jar;mail.jar;imap.jar;mailapi.jar USmain

might work better.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
works perfect!!!

thanks a lot
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!