Skip to main content



      Home
Home » Newcomers » Newcomers » java.lang.NoClassDefFoundError­: javax/mail/Session Runtime error
java.lang.NoClassDefFoundError­: javax/mail/Session Runtime error [message #72516] Thu, 02 June 2005 11:37 Go to next message
Eclipse UserFriend
Originally posted by: Bill.Blackmon.tea.state.tx.us

I'm running an app under Eclipse 3.0.2 and getting the following
runtime error:
java.lang.NoClassDefFoundError­: javax/mail/Session


with the following line of code:
session = Session.getDefaultInstance(pro­ps, null);


The app compiles without a problem.


The apps' classpath follows:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry exported="true" kind="lib" path="/src/bin"/>
<classpathentry exported="true" kind="con"
path="org.eclipse.jdt.launchin­g.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib"
path="/lib/activation.jar"/>
<classpathentry exported="true" kind="lib"
path="/lib/servlet.jar"/>
<classpathentry exported="true" kind="lib" path="/lib/mail.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>


The jar files necessary for the app and another accompanying app are in
project called 'lib'.
The lib project is is included in the Java Build Path for this project,
though I don't think
that is relevant.


Where else would Eclipse be looking for the mail.jar during runtime?
I've also added the location of the jar files to my system classpath
but the error still occurs.


Thanks!
Re: java.lang.NoClassDefFoundError­: javax/mail/Session Runtime error [message #72634 is a reply to message #72516] Thu, 02 June 2005 13:40 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

BillB wrote:
> I'm running an app under Eclipse 3.0.2 and getting the following runtime
> error: java.lang.NoClassDefFoundError­: javax/mail/Session
>
> with the following line of code: session =
> Session.getDefaultInstance(pro­ps, null);
>
> The app compiles without a problem.
>
> The jar files necessary for the app and another accompanying app are in
> project called 'lib'. The lib project is is included in the Java Build
> Path for this project, though I don't think that is relevant.
>
> Where else would Eclipse be looking for the mail.jar during runtime?
> I've also added the location of the jar files to my system classpath but
> the error still occurs.

The build path settings are separate from the runtime (called 'Launch'
in Eclipse vernacular) classpath.
How are you launching the application? If you select the Run... menu
item you can view/edit the Launch configuration, including the classpath
it uses at runtime.

HTH,
Eric
Previous Topic:Open a new view from current view
Next Topic:SSHExec ant task bug
Goto Forum:
  


Current Time: Sat Jun 07 07:27:23 EDT 2025

Powered by FUDForum. Page generated in 0.08935 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top