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

Attachments capture_1.PNG 81.33 KB Capture_2.PNG 93.67 KB capture_3.PNG 71.25 KB

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.

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)

Attachments CaptureA.PNG 45.21 KB CaptureB.PNG 22.86 KB

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!

Edited 3 Years Ago by Dani: Formatting fixed

This question has already been answered. Start a new discussion instead.