Sending Mail From Java

Sending Mail From Java: You can send mails from java, here using gmail smtp sample working code given. Required Jar: javax.mail Java Program: package in.javadomain; import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; public class SendMail { public static void main(String[] args) { final String fromEmailId = "gmail-username"; final String fromEmailPwd =

101 total views, no views today

» Read more

FileSearch in Java with User Interface

FileSearch in Java with User Interface: This Program will help you to search a particular file in a particular drive (c,d,e or f etc). Java Program: import; import java.util.ArrayList; import java.util.List; import javax.swing.JOptionPane; public class FileSearch extends javax.swing.JFrame { /** * Creates new form SimpleUI */ List myArrayList = new ArrayList(); public FileSearch() { initComponents(); } private void initComponents()

113 total views, no views today

» Read more

Convert Pdf to Word in Java Example

Convert Pdf to Word in Java: Required Jars: 1. itextpdf-5.4.4 2. xmlbeans-xpath-2.3.0 3. xmlbeans-2.6.0 4. poi-3.9 5. dom4j-1.6.1 6. poi-ooxml-schemas-3.7 7. poi-ooxml-3.7 Java Program: package in.javadomain; import; import; import org.apache.poi.xwpf.usermodel.BreakType; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFParagraph; import org.apache.poi.xwpf.usermodel.XWPFRun; import com.itextpdf.text.pdf.PdfReader; import com.itextpdf.text.pdf.parser.PdfReaderContentParser; import com.itextpdf.text.pdf.parser.SimpleTextExtractionStrategy; import com.itextpdf.text.pdf.parser.TextExtractionStrategy; public class ConvertPdf2Word { public static void main(String[] args) throws IOException { System.out.println("Document converted

1,082 total views, 2 views today

» Read more

Converting Word to Pdf in Java Example

Converting Word to Pdf in Java: Jars: avalon-framework-4.1.5 commons-io-2.4 docx4j-2.7.1 log4j-1.2.15 serializer-2.7.1 xmlgraphics-commons-1.3 batik-util-1.6-1 commons-logging-1.1.3 fop-0.93 xalan-2.7.1 Java Program: package in.javadomain; import; import; import; import; import; import java.util.List; import org.docx4j.convert.out.pdf.viaXSLFO.PdfSettings; import org.docx4j.fonts.IdentityPlusMapper; import org.docx4j.fonts.Mapper; import org.docx4j.fonts.PhysicalFont; import org.docx4j.fonts.PhysicalFonts; import org.docx4j.openpackaging.packages.WordprocessingMLPackage; public class Word2Pdf { public static void main(String[] args) { try { long start =

1,125 total views, 3 views today

» Read more

Jsoup Tutorials

1. Introduction 2. Input    2.a From String    2.b From URL    2.c From File 3. Parsing Data    3.1 parsing element by id    3.2 parsing element by tag    3.3 parsing element by class    3.4 parsing element by attributes    3.5 parsing sibling elements    3.6 parsing parent and children elements 4. Selectors    4.1 find elements

137 total views, no views today

» Read more
1 2