<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-33141833</id><updated>2011-11-27T15:34:37.897-08:00</updated><title type='text'>welcome to luckysta ngetuk city</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://luckybonavita.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://luckybonavita.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>luckyesta.S.kom,Spok.</name><uri>http://www.blogger.com/profile/17832122616877821420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_CgpmW8AGjv8/SsbZ1TglRSI/AAAAAAAAABA/EW8iRvaXvMg/S220/04.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-33141833.post-7490053316297903860</id><published>2009-11-01T00:25:00.000-07:00</published><updated>2009-11-01T00:25:06.310-07:00</updated><title type='text'>scrib program chat</title><content type='html'>&lt;div style="color: purple;"&gt;&lt;span style="font-weight: bold;"&gt;Begini ceritanya, masing-masing server dan client akan menjalankan dua program. Lho kok dua&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;program?, karena saya akan menyajikan program yang mengirim data (tulisan) dari server ke&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;klien dan dari klien ke server. Jadi disini anda akan dihadapkan pada bagaimana menyatukan&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;dua program pada masing-masing computer sehingga masing-masing computer hanya&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;menjalankan satu program saja. Lebih efektif bukan?, untuk itulah anda bisa memilih dan&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Lisensi Dokumen:&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Seluruh dokumen di IlmuKomputer.Com dapat digunakan, dimodifikasi dan disebarkan&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;secara bebas untuk tujuan bukan komersial (nonprofit), dengan syarat tidak menghapus&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;atau merubah atribut penulis dan pernyataan copyright yang disertakan dalam setiap&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;dokumen. Tidak diperbolehkan melakukan penulisan ulang, kecuali mendapatkan ijin&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;terlebih dahulu dari IlmuKomputer.Com.&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;memodifikasi port, kemananan dan sebagainya secara acak dari kedua program berikut yang&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;menurut anda memiliki kehandalan.&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;2&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Listing programnya sebagai berikut :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;1. Server mengirim data ke Client&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// program server: simpan dalam ServerKu1.java&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// kompile menjadi ServerKu1.class&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;import java.net.*;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;import java.io.*;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;public class ServerKu1 {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;public static void main(String[] args) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;ServerSocket ss = new ServerSocket(2002);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Menunggu Klien...");&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Socket s = ss.accept();&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Klien telah masuk");&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Server pada port = "+&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;s.getLocalAddress().getHostAddress() + " : " + s.getLocalPort());&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Client pada port = "+&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;s.getInetAddress().getHostAddress() + " : " + s.getPort());&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;PrintWriter pw = new PrintWriter(s.getOutputStream(), true);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;String greeting = "";&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;while(!(greeting=br.readLine()).equals("")) { pw.println(greeting); }&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;pw.close(); s.close(); ss.close();&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;} catch (Exception e) { e.printStackTrace(); }&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;3&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// program klien : Simpan dalam ClientKu1.java&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// kompile menjadi ClientKu1.class&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;import java.net.*;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;import java.io.*;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;public class ClientKu1 {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;public static void main(String[] args) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Socket s = new Socket("127.0.0.1",2002);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Komunikasi terhubung");&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Client pada port = "+&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;s.getLocalAddress().getHostAddress() + " : "+ s.getLocalPort());&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Server pada port = "+&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;s.getInetAddress().getHostAddress() + " : "+ s.getPort());&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;BufferedReader br = new BufferedReader( new InputStreamReader(s.getInputStream()));&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Menunggu pesan...");&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;String greeting = "";&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;while ((greeting=br.readLine())!=null) { System.out.println(greeting); }&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Selesai");&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;br.close();&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;s.close();&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;catch (Exception e) { e.printStackTrace(); }&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;2. Client mengirim data ke Server&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;4&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// program server : Simpan dalam ServerKu2.java&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// kompile menjadi ServerKu2.class&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;import java.net.*;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;import java.io.*;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;public class ServerKu2 {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;public static void main(String args[]) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;int port;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;ServerSocket server_socket;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;BufferedReader input;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;port = Integer.parseInt(args[0]);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;catch (Exception e) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("port = 2000 (Standarnya)");&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;port = 2000;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;server_socket = new ServerSocket(port);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Server menunggu klien di port " +&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;server_socket.getLocalPort());&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// server mondar-mandir disini&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;while(true) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Socket socket = server_socket.accept();&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Hubungan baru diterima " +&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;socket.getInetAddress() +&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;":" + socket.getPort());&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;input = new BufferedReader(new InputStreamReader(socket.getInputStream()));&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// menampilakan data yang diterima&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;while(true) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;String message = input.readLine();&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;if (message==null) break;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println(message);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;catch (IOException e) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println(e);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// Client menutup hubungan&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;socket.close();&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Client telah menutup hubungan");&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;catch (IOException e) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println(e);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;5&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;6&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// program client : Simpan dalam ClientKu2.java&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// kompile menjadi ClientKu2.class&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;import java.net.*;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;import java.io.*;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;public class ClientKu2 {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;public static void main(String[] args) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;int port = 2002;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;String server = "localhost";&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Socket socket = null;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;String lineToBeSent;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;BufferedReader input;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;PrintWriter output;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;int ERROR = 1;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// read arguments&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;if(args.length == 2) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;server = args[0];&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;port = Integer.parseInt(args[1]);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;catch (Exception e) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("server port = 1500 (Standarnya)");&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;port = 2002;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;// Koneksi ke server&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;socket = new Socket(server, port);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println("Terkoneksi ke server " +&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;socket.getInetAddress() +&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;":" + socket.getPort());&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;catch (UnknownHostException e) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println(e);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.exit(ERROR);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;catch (IOException e) {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.out.println(e);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;System.exit(ERROR);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;try {&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;input = new BufferedReader(new InputStreamReader(System.in));&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;output = new PrintWriter(socket.getOutputStream(),true);&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;7&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Untuk mengkompile dan menjalankannya, maka ikuti langkah berikut :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt; Server ke Client&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;1. Kompile ServerKu1.java :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;C:\&amp;gt; javac ServerKu1.java&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Jalankan program :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;C:\&amp;gt; java ServerKu1&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Output :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;2. Kompile ClientKu1.java :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;C:\&amp;gt; javac ClientKu1.java&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Jalankan program :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;C:\&amp;gt; java ClientKu1&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Output :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;8&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Setelah ClientKu1.class dijalankan maka anda bisa mengetikkan kalimat di jendela&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Server dan akan di tampilkan di jendela klien. Untuk mengakhiri koneksi, anda bisa&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;menekan enter dua kali atau menutup dari jendela windows.&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt; Client ke Server&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;1. Kompile ServerKu2.java :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;C:\&amp;gt; javac ServerKu2.java&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Jalankan program :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;C:\&amp;gt; java ServerKu2&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Output :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;9&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;2. Kompile ClientKu2.java :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;C:\&amp;gt; javac ClientKu2.java&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Jalankan program :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;C:\&amp;gt; java ClientKu2&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Output :&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Setelah ServerKu2.class dan ClientKu2.class di jalankan, sekarang kesempatan&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;bagi anda untuk menulis pesan di klien dan nantinya akan di teruskan ke server.&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Artikel Populer IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Copyright © 2004 IlmuKomputer.Com&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;Nah, sekarang adalah suatu tantangan bagi anda untuk menyatukan dua program ini menjadi&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;&lt;span style="font-weight: bold;"&gt;satu program saja. Selamat mencoba!.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33141833-7490053316297903860?l=luckybonavita.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckybonavita.blogspot.com/feeds/7490053316297903860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33141833&amp;postID=7490053316297903860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default/7490053316297903860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default/7490053316297903860'/><link rel='alternate' type='text/html' href='http://luckybonavita.blogspot.com/2009/11/scrib-program-chat.html' title='scrib program chat'/><author><name>luckyesta.S.kom,Spok.</name><uri>http://www.blogger.com/profile/17832122616877821420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_CgpmW8AGjv8/SsbZ1TglRSI/AAAAAAAAABA/EW8iRvaXvMg/S220/04.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33141833.post-8754386032377358414</id><published>2009-07-13T21:00:00.000-07:00</published><updated>2009-07-13T21:05:57.712-07:00</updated><title type='text'>penelitian</title><content type='html'>secara gamblang ilmu dari psikologi itu sendiri adalah psyche adalah ilmu dan kata logosh adlah jiwa kemudian apabila kita lihat dari kata-kata tersebut kita dapat mengartikan ya ilmu kejiwaan.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33141833-8754386032377358414?l=luckybonavita.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckybonavita.blogspot.com/feeds/8754386032377358414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33141833&amp;postID=8754386032377358414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default/8754386032377358414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default/8754386032377358414'/><link rel='alternate' type='text/html' href='http://luckybonavita.blogspot.com/2009/07/penelitian.html' title='penelitian'/><author><name>luckyesta.S.kom,Spok.</name><uri>http://www.blogger.com/profile/17832122616877821420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_CgpmW8AGjv8/SsbZ1TglRSI/AAAAAAAAABA/EW8iRvaXvMg/S220/04.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33141833.post-115622759663027414</id><published>2006-08-21T23:09:00.000-07:00</published><updated>2006-08-21T23:19:56.640-07:00</updated><title type='text'>cinta biru atau cinta kelabu</title><content type='html'>&lt;span style="font-size:130%;color:#ff99ff;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-size:130%;color:#ff99ff;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-size:130%;color:#ff99ff;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-size:130%;color:#ff99ff;"&gt;&lt;strong&gt;&lt;em&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:130%;color:#ff99ff;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-size:100%;"&gt;dari mana datangnya bintang&lt;br /&gt;  dari langit turun ke bumi dari mana datangnya cinta dari mata turun&lt;br /&gt;ke&lt;br /&gt;hati . dari mana asalnya kuci dari cinta turun ke&lt;br /&gt;benciiiiiii.&lt;/span&gt; &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33141833-115622759663027414?l=luckybonavita.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckybonavita.blogspot.com/feeds/115622759663027414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33141833&amp;postID=115622759663027414' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default/115622759663027414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default/115622759663027414'/><link rel='alternate' type='text/html' href='http://luckybonavita.blogspot.com/2006/08/cinta-biru-atau-cinta-kelabu.html' title='cinta biru atau cinta kelabu'/><author><name>luckyesta.S.kom,Spok.</name><uri>http://www.blogger.com/profile/17832122616877821420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_CgpmW8AGjv8/SsbZ1TglRSI/AAAAAAAAABA/EW8iRvaXvMg/S220/04.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33141833.post-115622683949658606</id><published>2006-08-21T22:57:00.000-07:00</published><updated>2006-08-21T23:07:19.506-07:00</updated><title type='text'></title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33141833-115622683949658606?l=luckybonavita.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckybonavita.blogspot.com/feeds/115622683949658606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33141833&amp;postID=115622683949658606' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default/115622683949658606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33141833/posts/default/115622683949658606'/><link rel='alternate' type='text/html' href='http://luckybonavita.blogspot.com/2006/08/blog-post.html' title=''/><author><name>luckyesta.S.kom,Spok.</name><uri>http://www.blogger.com/profile/17832122616877821420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://3.bp.blogspot.com/_CgpmW8AGjv8/SsbZ1TglRSI/AAAAAAAAABA/EW8iRvaXvMg/S220/04.jpg'/></author><thr:total>0</thr:total></entry></feed>
