Solved

compiling javamail programs

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java SE 8u111  Lot of stuff broke 11 69
expectj telnet failing 5 36
servlet example 17 32
null output 3 25
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

777 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