Solved

compiling javamail programs

Posted on 2002-06-14
3
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
check java version using powershell 13 288
How  can  i  resolve  HTTP Status 404 -? 8 58
eclipse console opening separately 2 35
printf performancy 11 84
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

740 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