Solved

compiling javamail programs

Posted on 2002-06-14
3
251 Views
Last Modified: 2013-11-24
--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
Comment
Question by:akanksha
3 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 7079179
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
 

Accepted Solution

by:
vijaywadnere earned 50 total points
ID: 7114637
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
 
LVL 2

Expert Comment

by:nir2002
ID: 7124192
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now