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 =

65 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 java.io.File; 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()

68 total views, no views today

» Read more

[solved] no main manifest attribute, in

Error: no main manifest attribute, in Reason: If Manifest file missing in the created jar then you will get this error. Solution: If you used eclipse to create the jar then you can use Main class option to resolve this issue, 1. Right click -> Export -> JAR File (under JAVA) then Next 2. Select the export location 3. Next,

73 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 java.io.FileOutputStream; import java.io.IOException; 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

618 total views, no 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 java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; 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 =

697 total views, no 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

83 total views, no views today

» Read more

Enter the full pathname for java.exe

Enter the full pathname for java.exe Error: Enter the full pathname for java.exe in sql developer. Solution: Path Given: D:\Naveen\jdk1.6.0_45 Note: This path only I have given in the environmental variables. Control Panel\System and Security\System Advanced -> Environmental Variables 83 total views, no views today

83 total views, no views today

» Read more

Joining two tables oracle example

student_details table: select * from student_details; id name 1 divya 2 hems 3 chudar student_rank table: select * from student_rank; id rank 1 5 2 6 3 3 Joining both tables – selecting all: select * from student_details sd,student_rank sr where sr.id=sd.id; id name id_1 rank 1 divya 1 5 2 hems 2 6 3 chudar 3 3 Joining both

58 total views, no views today

» Read more
1 2