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

Classpath For JavaMail Codes  RSS feed

 
Alam Ikenna
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone help me out with the correct classpath to use to javac any javamail code.
I initailly made use of :

set classpath=c:\Sun\AppServer\lib\mail.jar%classpath%;
set classpath=c:\Sun\AppServer\lib\activation.jar%classpath%;

and I later compiled the codes using the above classpath. The result on the command prompt screen was - javac is not recognised as an internal\external command.

After typing the above classpath on the command prompt screen ,is it that, I should compile with normal classpath(set path=.;c:\jsdk1.4.2\bin) i used in compiling other codes that are not javamail?

Pls kindly tell me the steps to follow in compiling my javamail code.

Thanks
Alam Ikenn Winner
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks wrong:
set classpath=c:\Sun\AppServer\lib\mail.jar%classpath%;
set classpath=c:\Sun\AppServer\lib\activation.jar%classpath%;

The following should work better:
set CLASSPATH=c:\Sun\AppServer\lib\mail.jar;c:\Sun\AppServer\lib\activation.jar;%classpath%


Don't confuse the PATH with the CLASSPATH - they do very different things, and should not be mixed. The PATH needs to contain the directory where the "javac" (and other) executable lives. The CLASSPATH contains jar files and directories that contain class file hierarchies.
[ March 26, 2008: Message edited by: Ulf Dittmer ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!