while using progam i am getting this error
import com.java4less.rfax.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.image.BufferedImage;
import com.apple.mrj.*;
public class Sent
{
public static void main(
String[] args)
{
try {
FaxProducer p=null;
//System.in.read();
AcrobatFaxProducer pdf=new AcrobatFaxProducer();
pdf.setPDFFile("c:\\report.pdf");
//FaxModem fm= new FaxModem();
pdf.pageImage=new BufferedImage(800,1290,java.awt.image.BufferedImage.TYPE_INT_RGB);
//System.in.read();
FaxModem m=new FaxModem();
m.setPortName("COM2");
m.flowControl=m.FLOWCONTROL_XONXOFF;
m.ATFlowControlXONXOFF="AT&K4";
m.faxClass=2;
m.setInitString("ATV1Q0");
m.AtFBOR=true;
m.sendFax("0,23735862");
//System.in.read();
m.open(pdf);
if (m.sendFax("0,23735862")) System.out.println("Success ***");
else System.out.println("FAILED");
m.close();
}
catch ( Exception e ) { e.printStackTrace();}
}
}
Command out.
ATDT0,23735862java.lang.NullPointerException
at com.java4less.rfax.FaxModem.sendATCommandnoWait(FaxModem.java:
at com.java4less.rfax.FaxModem.sendATCommand(FaxModem.java:2167)
at com.java4less.rfax.FaxModem.connect(FaxModem.java:1614)
at com.java4less.rfax.FaxModem.sendFax(FaxModem.java:708)
at Sent.main(Sent.java:26)