Solved

compiling javamail programs

Posted on 2002-06-14
3
252 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupSumClump challenge 9 98
best (free) software to access postgres db (java) 1 32
What is the latest versions eclipse neon 2 139
what is a "java.lang.System Property"   ? 20 57
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

911 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

21 Experts available now in Live!

Get 1:1 Help Now