• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

compiling javamail programs

--Unzipped to /usr/... i.e /usr/javamail.api-1.2

--downloaded java activAtion framework

-unzipped to /usr/java/jaf-1.0.1

--jdk is stored at /usr/java/jdk1.3.1_02

--used export classpath=<path of mail.jar file>:<path of activatio.jar file>:<path of javac>

-- have to compile a file msgsend.java

--this is stored in /usr/javamailapi-1.2/demo

--changed to directory /usr/javamailapi-1.2/demo

--command used to compile
javac msgsend.java

bash: message class not found
message exception not found



Now on using javac -classpath="" class file it is giving error
java.net.inetaddress not found
what is the problem
0
akanksha
Asked:
akanksha
1 Solution
 
CEHJCommented:
If you put all extensions to the standard libraries in the right place, that is, place the jar files in $JAVA_HOME/jre/lib/ext you shouldn't have a problem. And you shouldn't need to set the classpath.
0
 
vijaywadnereCommented:
Well I'm not a UNIX guy, but from my Windows experience I can say that you try to modify the 5th line of your question like:

--used export classpath=.:<path of mail.jar file>:<path of activatio.jar file>:<path of javac>

pls note the [.:] just after the classpath word.

May be 'this' will tell (in UNIX) the java compiler to include the current directory also. As you've set the classpath to various files, and the java compiler is nothing but computer program :), it wont include the current directory by itself, and thats why . should be included.

Alternatively, you should put all the extra packages in a single directory and include 'this' directory in the classpath as recommended by CEHJ.

Hope it'll solve your problem.
0
 
nir2002Commented:
Hi,

It seem you miss some fundamental jar try looking for jar like: rt.jar or runtime.jar and put it in the classpath.

Best regards
Nir
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now