Import javax.mail not found problem

I have downloaded the most recent mail.jar and activation.jar files and have created a library w/in JDev called javamail and have added these jars to that library. I have also included this library in my ViewController Project. The problem I am having is that the following imports statements are not found by JDev:
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
When I open up the mail.jar I can find all of these classes, so why are these imports not being recongnized?
I have also tried import javax.mail.*; to include everthing and this does not work either.
Does anyone have any suggestions on how to trouble shoot this issue?

Try to add the J2EE library - which is predefined in JDeveloper- to your project's libraries.
Worked for me.

Similar Messages

  • Import javax.mail not found

    Hello,
    I am new to Java Mail. I wanted to test my first programme. When I compile, I get this errors.
    package javax.mail not found in import and so on. I have set my classpath to so
    set classpath = %classpath%;C:\j2sdk1.4.0\lib\mail.jar;C:\j2sdk1.4.0\lib\activation.jar
    I included the mail.jar,smtp.jar and activation.jar in the lib directory of my jdk e.g c:\j2sdk1.4.0\lib\ "the jar file".
    Can any one tell me what I am missing here?
    Thanks
    James

    the easiest way to do this is to put
    activation.jar
    mail.jar          
    mailapi.jar     
    imap.jar     
    smtp.jar          
    pop3.jar
    into the virtual machine directory C:\Program Files\JavaSoft\JRE\1.3.1\lib\ext
    or the lib\ext directory of whatever virtual machine you are using
    and put coppies of them in JDK
    C:\j2sdk1.4.0-beta3\jre\lib\ext
    or jre\lib\ext
    of whatever JDK you are using
    this way they are found automaticaly
    no need for classpath

  • Package javax.mail not found in import.

    hi,
    i am trying to develop a mail application using jsp, i have jaf1.0.1 and javamail API and the application was working fine on weblogic but when i tried to do the same thing on Apache server the Package javax.mail not found in import. is occuring,
    What could be the problem can any one explain...
    Thanks

    I think you have not placed mail.jar and activation.jar files in the /jre/lib/ext directory. Just place the mail.jar and activation.jar files in the jdk's /jre/lib/ext directory and check out. This will work for you.
    Rkanthj

  • Import javax.crypto not found error

    Hi,
    I have just installed the JDK1.7 on a windows machine.
    Whenever I try to compile my module, I get an error on the import javax.crypto line. It tells me that it can't the javax\Crypto\Cipher.class.
    I have the jdk installed on d:\glassfish3 and am pointing the classpath to d:\glassfish3\jdk7 (also tried d:\glassfish3\jdk7\jre as well) with no luck.
    Any help would be greatly appreciated.
    Thanks,
    Drew Nathanson
    Technical Synergy, Inc.

    Thanks. Maybe I should explain a little better.
    I am using JBuilder 2006 to my IDE. This environment requires that you put in the path to the JRE/JDK.
    I have uninstalled and downloaded the jdk again and this time i'm getting a strange error:
    "test.java": cannot access javax.crypto.Cipher; bad class file: D:\Program Files\Java\jre7\lib\jce.jar\javax\crypto\Cipher.class, class file has wrong version 51.0, should be 49.0, Please remove or make sure it appears in the correct subdirectory of the classpath. at line 19, column 21
    Now this is strange because i'm using the right library.
    Is there something that I'm missing here?
    Again, thanks for your help.
    Drew Nathanson

  • Import javax.mail.* problem ...

    I have added the line 'import javax.mail.*;' to the top of my program and got the compiler error 'Package javax.mail not found in import'. I have since read through loads of similar problems on this forum and have tried the following :-
    Downloaded jaf-1_0_2.zip and javamail-1_3.zip from the Sun site, unzipped them, and placed mail.jar and activation.jar onto my PC. I have added these .jar files into my classpath and re-booted my PC. However, I STILL get the same compiler message and it's doing my head in! Do I somehow need to add the .jar files into my project? Or am I just being very thick? I am developing using Visual Cafe 3.0. I am using JDK 1.2.2.
    I am quite new to this and I have not even started to code the e-mailing method yet - I'm simply trying to get the import working.
    Any help would be much appreciated and would mean I can sleep tonight!
    Thanks in advance.

    Hi,
    check where you have placed the mail.jar file.....give the proper classpath where you have placed the jar file....
    check this out....it will compile...

  • Problem importing javax.mail.*

    Hey,
    I just installed the Java JDK 6 update 16 (windows platform). I am not able to compile a sample code that used the javax.mail package. I am not able to get past the
    import javax.mail.*;
    line. The compiles says "package javax.mail does not exist"
    I tried separately installing the JavaMail 1.4.2 API and setting the classpath to the mail.jar file as suggested in the readme.txt for this API, but I still get the same problem. Anyone has any suggestions?
    Thanks!

    Hi! I see you've answered similar problems before - but nothing seems to be working for me.
    My OS is Vista. I installed the JDK 6 update 16 just yesterday. I'm using the command line javac.
    I can see the mail.jar file in this folder: C:\Sun\SDK\lib\ and I've set the classpath using : set classpath=%classpath%;C:\Sun\SDK\lib\mail.jar
    When I type set classpath at the prompt, I can see that the classpath has been set correctly.
    Please help!

  • Import javax.mail package does not exists

    Hi,
    when i tried to compile the source code for email using jdk1.3.1, it compiled fine. but when i tried to compile using jdk1.4.., it had the following errors such as
    import javax.mail package does not exists,
    import javax.mail.internet package does not exists
    package javax.activation does not exist
    Is it because of the jdk version problem???
    Pls help me

    I have the same problem with javax.ejb
    Now i've downloaded and installed the j2ee and set my classpath to the j2ee.jar. I've had to make a new path cause i'm running XP.
    This doesn't work.
    to compile it in Jcreator or JBuilder I can make it work by adding this package (j2ee.jar) in the project settings - required libraries.
    But I have to do this for every project again and again.
    I can make it work but i thougt the classpath would be enough ??
    Bassegio

  • Package javax.swing not found in import!

    I recently installed JDK 1.3.1_02 on WinNT4.0 and I cannot compile javax
    packages without getting the following error:
    Package javax.swing not found in import
    I've tried every combination of modifying the CLASSPATH system variable
    I can think of. I have no problem compiling java packages but not
    javax packages. I followed the installation instructions to the letter.
    What am I missing? Surely someone is running the same version of
    the JDK I am on WinNT 4.0.

    Thanks again!!! I had an older version of javac running on my system any time I ran
    outside of the bin where the latest javac was installed. I removed the older version
    of the jdk and now I can compile from any directory. I really appreciate the help,
    I was wracking my brain.
    By the way, -version is not a valid flag for javac.exe, although it is for java.exe.
    signed,
    grateful in cyberspace

  • Package javax.ejb not found error

    Hi there,
    I've downloaded j2se 1.4 and j2ee 1.3.1 and installed it on Windows XP. I set the environment variables as described. When I compile a .java file that imports the javax.ejb.* package, then I get an error "package javax.ejb not found". I feel like an idiot and I know it's something to do with the environment variables. (or just XP, most likely)
    Thanks in advance
    Hoenner

    How are you compiling your source? If you're using an IDE then you should edit your project classpath to include the j2ee.jar file (it'll probably be in the lib directory of your J2EE installation).
    If you're doing it from the command line then type in SET CLASSPATH, look at the classpath it returns and check that it includes the j2ee.jar file.
    Hope this helps.

  • Work around for server not found problems on FF36

    I have found a work around for all the people having server not found problems with FF36.
    If you manually set your network adapter DNS to an external DNS server (as opposed to your local ISP) then the problem goes away. I set mine to use the two google DNS servers:
    Preferred: 8.8.8.8
    Alternate: 8.8.4.4
    Not a clue why this works but it is 100% successful on my desktop PC, whereas before I could hardly connect to a webpage with FF36 without multiple page refreshes and much frustration, even though FF35 was fine and rolling back to FF35 was also fine.
    Something has changed in FF36 and either the way it handles DNS or the way it works with some network adapters.
    It is nothing to do with add-ons, profiles or firewall software as I have tried all of these things and only the DNS change made a difference. I even copied over a full working profile and the program files directory for Mozilla from my portable which was having no problems and the problem still existed on the desktop, which is why I started looking at the network adapater since everything else between the working PC and the non working one was identical.
    Hopefully this will help the developers to pin down the real cause of the problem and fix it in the next release.

    Well done. Thanks for finding that.
    That is not only assigned but has an approved patch included in the scheduled Fx36.0.1 release so it should be fixed in few days, watch out for the upgrade.
    * Bug 1093983 - DNS resolver should not use 'ANY' to get cached records for TTL <sup>[https://bugzilla.mozilla.org/show_bug.cgi?id=1093983#c35 c#35]</sup>
    * https://wiki.mozilla.org/Firefox/Channels/Meetings/2015-03-03#Schedule_Update
    With the bug now fixed it would not really be appropriate to add further comment. I do now see another related bug assigned but not being fast tracked, so if all goes well that will probably land in Firefox 39.
    * Bug 1138242 - DNS: Request A and AAAA record types rather than ANY when obtaining TTL on Windows

  • Trying to import javax.mail.*

    hi,
    I need to make a sort of webmail program for school, i understand most of the things I've read so far about it but when i actually try to program and import javax.mail.* and javax.mail.internet.* Together (the compiler we have to use) doesn't recognise these import
    any help would be appreciated because i'm dying to get started :)

    Hi,
    You need to have java mail jar files in your classpath.
    They are available for download at http://java.sun.com/products/javamail/downloads/index.html
    -Amol

  • [ADF JDEV11.1.1.4] Timezone region not found problem in JDEV

    HEllo,
    I just moved my project to JDEV11.1.1.4 from 11.1.1.3.
    All is fine except for database Navigator.
    In 11.1.1.3, I was able to connect to my Oracle Database from Database Navigator Tab. I just needed to set the Java options -Duser.timezone="+01:00" to my project to resolve the timesone region not found problem when running my app onto the embedded WLS.
    In 11.1.1.4, I can run mu project fine with same Java options but I cannot anymore connect to my DB using Database Navigator.
    I got the famous ORA-01882: timezone region not found error.
    I tried adding this line into ide.conf:
    AddVMOption -Duser.timezone="+01:00"
    but still not working.
    Any idea what I should do pls?
    thx
    Jack

    OK, I made a mistake into the line:
    Adding :
    AddVMOption -Duser.timezone="+01:00"
    in ide.conf works fine.
    I just forgot to close and reopen JDEV.

  • Package javax.servlet not found error

    package javax.servlet not found error. how it can be solved.
    plz help this is my first servlet program.
    vipin

    You need a jar file that has in it the javax.servlet.* classes
    It should be distributed with your servlet/jsp server.
    It can normally be found in a /lib directory under the installation.
    Some examples:
    Tomcat4: install_dir\common\lib\servlet.jar
    Tomcat5: install_dir\common\lib\servlet-api.jar; install_dir\common\lib\jsp-api.jar
    J2sdkee: install_dir/lib/j2ee.jar
    You need to include this jar file in your classpath when you compile any servlet.

  • Problem while importing data schema not found

    Hi,
    I'm facing problem while importing data through system to a schema and impdp gives me error that schema XYZ was not found but when I query dba_users schema exist there what could be the reason of this.
    Regards,
    Abbasi

    Hi,
    Here is complete listing
    bash-3.2$ impdp system/abc schemas=XYZ DIRECTORY=data_dir DUMPFILE=Today_dump.dmp LOGFILE=Today_log.log PARALLEL=8
    Import: Release 11.1.0.7.0 - 64bit Production on Friday, 07 January, 2011 11:18:57
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39002: invalid operation
    ORA-39165: Schema XYZ was not found.
    Regards,
    Abbasi

  • Import iTunes Media Library, some files were not found problem

    Hi guys,
    I am trying to restore my music library info via importing from iTunes Media Library xml file I backed up. During import, iTunes gave me error message box saying that some files were not found and therefore won't get imported. After it's done, I checked the iTune and I noticed many of the music files did not get imported at all, even their locations are correct. Is it because iTunes stopped importing at the first entry that it found its location not existed and therefore skipped the rest all along? Even later ones might be valid. Is this the case?
    Is there an easy way to find out what those entries are? So perhaps I could go and edit them directly in the xml file. The message box did not give much information
    Any help would be really appreciated,
    Thanks alot
    Windows XP Pro
      Windows XP Pro  

    Hi Chris
    I have now experimented a little more and discovered that although Time Capsule (TC) is showing in Finder as a Shared Drive at laptop startup (and showing a status of a connected user, me) it is not actually 'mounted' in the true sense of the word i.e. the unmount/eject symbol is not showing next to it nor either of the drives connected to the TC. By clicking on either of the 2 drives (i.e. the TC 'Data' disk or the TC USB-connected drive) the status changes to show the dismount symbol on both the selected drive and the TC in the Finder side bar. Launching iTunes after this intervention works every time as per your advice. Not the Apple 'it just works' that I have come to expect and appreciate but at least I now understand how to make it work reliably..........many thanks and I hope Apple just makes it work sometine in the future

Maybe you are looking for

  • How to restore a backup in iCloud

    I already have the IOS 5 installed and everything is set to backing up in iCloud. This has already been done on my iMac, iPad and iPhone, so all settings are correct. All I am looking for is the correct way to begin the RESTORE procedure to start a b

  • Bank Statement Loading in to SAP (MT940)

    Hi I need some advice regarding MT940 import. Currently we are importing MT940 file using ff.5 transaction.  The assignment field is populated based on the automated sequence number that is generated during the import. I would like to have a specific

  • Are there any specific codecs or import libraries that will make Premiere 6 use more file types?

    Are there any specific codecs or import libraries that will allow Premiere 6 to import more file types?  I'm using Premiere 6 on Windows 7. It seems that the only kind of file that can be imported in to this version of Premiere are certain types of A

  • Plan cost  in the costing variant

    Hello,Experts, I have one problem in controlling .I have Finish product which is produced through subcontracting. i have maintained Special procurement key 30(subcontracting) in the material master. I have produced material through subcontracting onl

  • Initial installation in AD environment

    Hello, I would like to implement OS X Server in my Windows 2003 AD environment, specifically use the wiki and iChat server. I notice in the documentation you have 3 implementation options Standard Workgroup Advanced My vision is to only use the Wiki