Im reaaly starting to hate netbeans... its like it changes my code for me!!!

I use java mail to send emails. Now i got it to work a few days ago. already imported the api, and what have you (images attached). And i was able to send emails, and today i wanted to code another form that sends an email... but NOW all of a sudden im getting errors, that it cant find the mail class?

I changed my default platform manager a few days ago. Cant remember why i did that, but it was a valid reason (read up on the internet that i had to do that to resolve some bug, and it did - cant remember what bug though.... :?:)

Could that be the reason that it isnt finding my class any more? Or is netbeans just messing with me AGAIN?

Thanx

can not find ..
sounds to me like that class is not in the path of your application, or you forgot to import the class in the class where you are trying to use it.

Hmm, might sound stupid but the JavaMail API is optional and might not have come included with your netbeans 7.0 and java 7? see this: http://www.oracle.com/technetwork/java/javamail/index.html. if you have already downloaded it then as stultuske said try his advice.

can not find ..
sounds to me like that class is not in the path of your application, or you forgot to import the class in the class where you are trying to use it.

Its strange, as it does not thow an errow when i import the javax.mail class. Only those errors i took a screen shot of. They are the ONLY 4 errors i have.. And i dont know why they are being thrown?
Its like that class only parsially works..
(images attached)

are you using the correct Session class?

are you using the correct Session class?

haha ahhh ohhh my word! thank you!

I made backups of my program while i code, so i checked when it last worked, it had this for imports

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.swing.JOptionPane;

then i looked at my current program what that SAME CLASS referenced

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.util.Properties;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.swing.JOptionPane;
import oracle.toplink.essentials.sessions.Session;
import sun.rmi.transport.Transport;

How That code magically changed, i Have no idea!
But thank you, you helped big time!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.