Monday, August 8, 2011

Connection could not be established with host localhost

Connection could not be established with host localhost [permission denied]

in Linux

send mail in php

send mail from Swift_TransportException

check php.ini

SMTP localhost
smtp_port 25
sendmail_from no value
sendmail_path /usr/sbin/sendmail -t -i

sendmail service start and enabled

in firewall
Mail(SMTP) 25/tcp

SELinux
system default enforcing mode : Disabled

Saturday, August 6, 2011

how to make jar file

make jar file

jar cvfm MyJarName.jar manifest.txt *.class *.txt

in manifest.txt
Main-Class: ExecuteclassName


runjar file
java -jar MyJarName.jar

jar file execute on click

right click on jar file and open with path to jre/lib/jexec

Start rmiregistry programmatically

try {
LocateRegistry.createRegistry(1099);
} catch (RemoteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

how to see xml preview in browser php

xml preview view in browser $xml = new DOMDocument('1.0', 'UTF-8');                 $xml->preserveWhiteSpace = false; ...