<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Der Informatikblog &#187; Java</title>
	<atom:link href="http://www.informatik-blog.net/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.informatik-blog.net</link>
	<description>Informatik &#38; Co.</description>
	<lastBuildDate>Mon, 19 Dec 2011 13:01:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Kinosaal Plätze prüfen</title>
		<link>http://www.informatik-blog.net/2010/12/13/kinosaal-platze-prufen/</link>
		<comments>http://www.informatik-blog.net/2010/12/13/kinosaal-platze-prufen/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 15:30:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=636</guid>
		<description><![CDATA[import java.util.ArrayList; import java.util.Collections; public class Kino { ArrayList&#60;Integer&#62; platz = new ArrayList&#60;Integer&#62;(); static int platzReihe = 50; int startplatz, endplatz; public Kino(int Kategorie) { platz.add(0); //Fixt den Bug, da sonst -1 ausgabe bei BinarySearch switch (Kategorie) { case 1:    startplatz = 1;  break; // Reihe A case 2: startplatz = 100; break; // Reihe [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<pre class="brush: plain; title: ;">

import java.util.ArrayList;
import java.util.Collections;

public class Kino {

 ArrayList&lt;Integer&gt; platz = new ArrayList&lt;Integer&gt;();
 static int platzReihe = 50;
 int startplatz, endplatz;

 public Kino(int Kategorie) {
 platz.add(0); //Fixt den Bug, da sonst -1 ausgabe bei BinarySearch
 switch (Kategorie) {
 case 1:    startplatz = 1;  break; // Reihe A
 case 2: startplatz = 100; break; // Reihe B
 case 3:    startplatz = 200; break; // Reihe C
 case 4:    startplatz = 300; break; // Reihe D
 }
 endplatz = startplatz + platzReihe;
 }

 public boolean checkPlatz(int anzahlPlaetze) {
 int tempInt = 0;
 for (int i = startplatz; i &lt; endplatz; i++) {
 if (istFrei(i)) {
 tempInt++;
 } else {
 tempInt = 0;
 }

 if (tempInt == anzahlPlaetze) {
 return true;
 }

 }
 return false;
 }

 /**
 *
 * @param platznummer
 * @return true, wenn der Platz frei ist.
 */

 public boolean istFrei(int platznummer) {
 if (! (platznummer &lt; startplatz) || (platznummer &gt; endplatz) ) { // prüfe ob platznumer in Range
 Collections.sort(platz);
 return (Integer.valueOf(Collections.binarySearch(platz, platznummer)) &lt;= 0) ? true : false;
 }
 return false;
 }

 public boolean addPlatz(int Platznummer, int Kategorie) {
 if (istFrei(Platznummer)) {
 platz.add(Platznummer);
 return true;
 } else {
 return false;
 }
 }

 public boolean deletePlatz(int platznummer) {
 Collections.sort(platz);
 platz.remove( Collections.binarySearch(platz, platznummer) );
 return true;
 }

 public int hoechstePlatznummer(int Kategorie) {
 int z = 0;
 for (int i = endplatz; i &gt; startplatz; i--) {
 if (Collections.binarySearch(platz, i) &gt; 0);
 z = platz.get( Collections.binarySearch(platz, i) );
 System.out.println(&quot;Z!&quot; + z);

 }

 return z;
 }

 public static void main(String args[]) {
 Kino test = new Kino(2); // A = 1, B = 2, C = 3, D = 4

 test.addPlatz(104, 2);
 test.addPlatz(108, 2);
 test.addPlatz(144, 2);

 if (test.checkPlatz(44) == true) {
 System.out.println(&quot;Jep, frei.&quot;);
 } else {
 System.out.println(&quot;keiner frei&quot;);
 }

 test.hoechstePlatznummer(2);

 }
}
</pre>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2010/12/13/kinosaal-platze-prufen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generische Klassen in Java &#8211; Einsteigertutorial</title>
		<link>http://www.informatik-blog.net/2010/09/29/generische-klassen-in-java-einsteigertutorial/</link>
		<comments>http://www.informatik-blog.net/2010/09/29/generische-klassen-in-java-einsteigertutorial/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 10:07:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Datentypen]]></category>
		<category><![CDATA[Generische Klassen]]></category>
		<category><![CDATA[Integer]]></category>
		<category><![CDATA[String]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=632</guid>
		<description><![CDATA[Nun, generische Klassen klingt auf Anhieb kompliziert, sind jedoch, mit ein bisschen Übung eine leichte und sehr sinnvolle Methode um Schablonen, bzw. Templates in Java zu erstellen. Sinn hierbei ist es, dass kein Code dupliziert werden muss, sofern es mehrere Datentypen gibt. Unten genanntes Beispiel zeigt, wie Simpel es gehen kann ein Template zu erstellen. [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Nun, generische Klassen klingt auf Anhieb kompliziert, sind jedoch, mit ein bisschen Übung eine leichte und sehr sinnvolle Methode um Schablonen, bzw. Templates in Java zu erstellen. Sinn hierbei ist es, dass kein Code dupliziert werden muss, sofern es mehrere Datentypen gibt. Unten genanntes Beispiel zeigt, wie Simpel es gehen kann ein Template zu erstellen.</p>
<pre class="brush: plain; title: ;">

public class Ausgabe &lt;T&gt; { // &lt;T&gt; deklariert eine Templatevariable mit dem Namen T ohne Datentyp.
 public Ausgabe() {}

 private T out;

 public void setOut(T val) // Weiterhin wird mit dem &quot;Leeren Datentyp&quot; gearbeitet.
 {
 out = val;
 }
 public T giveOut() { // Hier wird der Datentyp ausgegeben, der vorher in dem instanziernden Objekt erstellt wurde
 return out;
 }

public static void main(String[] args) {

 Ausgabe&lt;String&gt; f = new Ausgabe&lt;String&gt;(); // Legt ein Objekt mit Dem Datentyp String an
 f.setOut(&quot;test&quot;);
 System.out.println( f.giveOut() );

 Ausgabe&lt;Integer&gt; a = new Ausgabe&lt;Integer&gt;(); // Legt ein Objekt mit dem Datentyp Integer an
 a.setOut(5);
 System.out.println( a.giveOut() );
 }

}
</pre>
<p>Wie ihr seht ist das ganze kein Teufelswerk und kann super einfach umgesetzt werden. Natürlich kann man generische Klassen auf beschränken auf verschiedene Datentypen. Das jedoch zeige ich im nächsten Tutorial.</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2010/09/29/generische-klassen-in-java-einsteigertutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MAC-Adresse des Primären Netzwerkadapters auslesen in Java</title>
		<link>http://www.informatik-blog.net/2009/08/13/mac-adresse-des-primaren-netzwerkadapters-auslesen-in-java/</link>
		<comments>http://www.informatik-blog.net/2009/08/13/mac-adresse-des-primaren-netzwerkadapters-auslesen-in-java/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 13:31:05 +0000</pubDate>
		<dc:creator>Emanuel</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MAC-Adresse]]></category>
		<category><![CDATA[Netzwerk]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=595</guid>
		<description><![CDATA[Wie lese ich die MAC-Adresse in Java aus? Dies ist ganz einfach und funktioniert sowohl unter Linux als auch unter Windows und MAC OS X. Zuerst müssen wir durch die NIC Adapter durchloopen um festzustellen welcher kein LOOPBACK ist. Der LOOPBACK Adapter ist der eigene PC und besitzt keine MAC-Adresse. Danach ist es mit NetworkInterface [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Wie lese ich die MAC-Adresse in Java aus? Dies ist ganz einfach und funktioniert sowohl unter Linux als auch unter Windows und MAC OS X.</p>
<p>Zuerst müssen wir durch die NIC Adapter durchloopen um festzustellen welcher kein LOOPBACK ist. Der LOOPBACK Adapter ist der eigene PC und besitzt keine MAC-Adresse.<br />
<span id="more-595"></span><br />
Danach ist es mit NetworkInterface ziemlich einfach die MAC-Adresse rauszufinden.</p>
<pre class="brush: java; title: ;">
import java.net.NetworkInterface;
import java.util.Collections;

public class NetworkUtil {

 public static String getMacAddress() throws Exception {

 	String result = &quot;&quot;;
 	try {
 for (NetworkInterface ni : Collections.list(
 NetworkInterface.getNetworkInterfaces())) {
 byte[] hardwareAddress = ni.getHardwareAddress();

 if (hardwareAddress != null) {
 for (int i = 0; i &lt; hardwareAddress.length; i++) {
 result += String.format((i == 0 ? &quot;&quot; : &quot;&quot;) + &quot;%02X&quot;, hardwareAddress[i]);
 }
 if (result.length() &gt; 0 &amp;&amp; !ni.isLoopback()) { return result; }
 }
 }
 	} catch (Exception e) {
 		e.printStackTrace();
 	}
 return result;
 }
}
</pre>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/08/13/mac-adresse-des-primaren-netzwerkadapters-auslesen-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sinnvolle möglichkeit von Konfigurationsdatein in Java</title>
		<link>http://www.informatik-blog.net/2009/06/24/sinnvolle-moglichkeit-von-konfigurationsdatein-in-java/</link>
		<comments>http://www.informatik-blog.net/2009/06/24/sinnvolle-moglichkeit-von-konfigurationsdatein-in-java/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 18:47:48 +0000</pubDate>
		<dc:creator>Emanuel</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=592</guid>
		<description><![CDATA[Wie ihr bestimmt wisst, besitzt Java leider nicht die möglichkeit Headerfiles wie beispielsweiße in C, C++ pder C# zu inkludieren. Für gewöhnlich werden in Headerfiles Konfigurationsdaten angelegt. Um sowas dennoch in Java zu realisieren, können sie intern auf Ressourcen im eigenen .JAR Paket zugreifen. Ebenso ist es jedoch auch möglich eine Klasse hierfür zu schreiben, [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Wie ihr bestimmt wisst, besitzt Java leider nicht die möglichkeit Headerfiles wie beispielsweiße in C, C++ pder C# zu inkludieren.</p>
<p>Für gewöhnlich werden in Headerfiles Konfigurationsdaten angelegt.</p>
<p>Um sowas dennoch in Java zu realisieren, können sie intern auf Ressourcen im eigenen .JAR Paket zugreifen.<br />
Ebenso ist es jedoch auch möglich eine Klasse hierfür zu schreiben, welches sinnvoll mit einem SingleTon Pattern einmal instanziert wird. In dieser Klasse können sie entweder &#8220;final static&#8221; Variablen deklarieren, oder sie arbeiten mit Settern und Gettern wie folgendes Beispiel zeigt.<br />
<span id="more-592"></span></p>
<pre class="brush: java; title: ;">
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ircbot;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author li
 */
public class Config {

 private String cfgOutChannel = &quot;#op&quot;;
 private String cfgScanChannel = &quot;#op2&quot;;
 private String cfgNickSyntax = &quot;Bot&quot;;
 private String cfgServerIP = &quot;my.host.name&quot;;
 private String cfgUsername = &quot;testuser&quot;;
 private String cfgLoginPassword = &quot;test&quot;;
 public int cfgServerPort = 6667;
 public int getCfgRepeatWait = 30000; //Timeout in Sekunden
 private String getCfgJoinMessage = &quot;Hello. I'm there.&quot;;
 private List cfgStartup = new ArrayList();
 private List cfgRepeat = new ArrayList();
 private List cfgAllowedHosts = new ArrayList();
 private static Config cfgObj;

 public Config() {
 cfgStartup.add(&quot;JOIN #op&quot;);
 cfgStartup.add(&quot;JOIN #scan&quot;);

 cfgRepeat.add(&quot;PRIVMSG #op :Nachricht 1&quot;);
 cfgRepeat.add(&quot;PRIVMSG #op :Nachricht 2&quot;);
 cfgRepeat.add(&quot;PRIVMSG #op :Nachricht 3&quot;);

 }

 public List getCfgAllowedHosts() {
 return cfgAllowedHosts;
 }

 public void setCfgAllowedHosts(List cfgAllowedHosts) {
 this.cfgAllowedHosts = cfgAllowedHosts;
 }

 public String getGetCfgJoinMessage() {
 return getCfgJoinMessage;
 }

 public void setGetCfgJoinMessage(String getCfgJoinMessage) {
 this.getCfgJoinMessage = getCfgJoinMessage;
 }

 public String getCfgLoginPassword() {
 return cfgLoginPassword;
 }

 public void setCfgLoginPassword(String cfgLoginPassword) {
 this.cfgLoginPassword = cfgLoginPassword;
 }

 public int getGetCfgRepeatWait() {
 return getCfgRepeatWait;
 }

 public void setGetCfgRepeatWait(int getCfgRepeatWait) {
 this.getCfgRepeatWait = getCfgRepeatWait;
 }

 public List getCfgAllowedHost() {
 return cfgAllowedHosts;
 }

 public boolean isCfgAllowedHost(String host) {
 if (cfgAllowedHosts.contains(host)) {
 return true;
 } else {
 return false;
 }
 }

 public void addCfgAllowedHost(String host) {
 if (!cfgAllowedHosts.contains(host)) {
 cfgAllowedHosts.add(host);
 }
 }

 public List getCfgRepeat() {
 return cfgRepeat;
 }

 public List getCfgStartup() {
 return cfgStartup;
 }
 public boolean debug = true;

 public boolean isDebug() {
 return debug;
 }

 public void setDebug(boolean debug) {
 this.debug = debug;
 }

 public String getCfgUsername() {
 return cfgUsername;
 }

 public void setCfgUsername(String cfgUsername) {
 this.cfgUsername = cfgUsername;
 }

 public static synchronized Config getSingletonObject() {
 if (cfgObj == null) {
 cfgObj = new Config();
 }
 return cfgObj;
 }

 public String getCfgNickSyntax() {
 return cfgNickSyntax;
 }

 public void setCfgNickSyntax(String cfgNickSyntax) {
 this.cfgNickSyntax = cfgNickSyntax;
 }

 public String getCfgOutChannel() {
 return cfgOutChannel;
 }

 public void setCfgOutChannel(String cfgOutChannel) {
 this.cfgOutChannel = cfgOutChannel;
 }

 public String getCfgScanChannel() {
 return cfgScanChannel;
 }

 public void setCfgScanChannel(String cfgScanChannel) {
 this.cfgScanChannel = cfgScanChannel;
 }

 public String getCfgServerIP() {
 return cfgServerIP;
 }

 public void setCfgServerIP(String cfgServerIP) {
 this.cfgServerIP = cfgServerIP;
 }

 public int getCfgServerPort() {
 return cfgServerPort;
 }

 public void setCfgServerPort(int cfgServerPort) {
 this.cfgServerPort = cfgServerPort;
 }
}
</pre>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/06/24/sinnvolle-moglichkeit-von-konfigurationsdatein-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dateien verschieben, kopieren</title>
		<link>http://www.informatik-blog.net/2009/04/20/dateien-verschieben-kopieren/</link>
		<comments>http://www.informatik-blog.net/2009/04/20/dateien-verschieben-kopieren/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 19:26:37 +0000</pubDate>
		<dc:creator>checky4fun</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[copy File]]></category>
		<category><![CDATA[Dateien kopieren]]></category>
		<category><![CDATA[Dateien verschieben]]></category>
		<category><![CDATA[fileChannel]]></category>
		<category><![CDATA[FileInputStream]]></category>
		<category><![CDATA[FileOutputStream]]></category>
		<category><![CDATA[move File]]></category>
		<category><![CDATA[NIO]]></category>
		<category><![CDATA[transferTo]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=552</guid>
		<description><![CDATA[Dateien verschieben Dateien über Java zu verschieben ist relativ einfach, nämlich zum Beispiel so: try { File quellDatei = new File(&#34;/meine/quelledatei.txt&#34;); File zielDatei = new File(&#34;/meine/zieldatei.txt&#34;); quellDatei.renameTo(zielDatei); } catch (Exception e) { e.printStackTrace(); } _______________________________ Dateien kopieren Anders schaut es mit Kopieren von Dateien in andere Ordner aus. Hier hat man zwar mehrere Möglichkeiten der [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p><strong>Dateien verschieben</strong></p>
<p>Dateien über Java zu verschieben ist relativ einfach, nämlich zum Beispiel so:</p>
<pre class="brush: java; title: ;">
try {
File quellDatei = new File(&quot;/meine/quelledatei.txt&quot;);
File zielDatei = new File(&quot;/meine/zieldatei.txt&quot;);
quellDatei.renameTo(zielDatei);
} catch (Exception e) {
e.printStackTrace();
}
</pre>
<p>_______________________________</p>
<p><strong>Dateien kopieren</strong></p>
<p>Anders schaut es mit Kopieren von Dateien in andere Ordner aus. Hier hat man zwar mehrere Möglichkeiten der Umsetzung, es ist aber auch mit mehr Schreibaufwand verbunden.</p>
<p>Byteweise Einlesen macht in den wenigsten fällen Sinn, es kommt meistens ein Buffer zum Einsatz.<br />
Ein Beispiel findet man hier: <a href="http://www.tutorials.de/forum/java/153779-dateien-kopieren.html" target="_blank">http://www.tutorials.de/forum/java/153779-dateien-kopieren.html</a></p>
<p>Eine performantere Lösung wäre natürlich über System.exec(…) Batch-Befehle per Java abzusetzen, man verspielt dabei aber den Vorteil der Plattformunabhängigkeit.</p>
<p>Eine echte Alternative zu Batch bieten die java.nio Klassen. Kopierprozesse per NIO über
<pre class="brush: java; title: ;">transfer(inputChannel, outputChannel,...)</pre>
<p> kann vom Betriebssystem (falls es das unterstützt) noch intern optimiert werden und kommen damit sehr nah an die Geschwindigkeit von Batchverarbeitung ran.</p>
<p>Hier ein Beispiel einer universellen FileCopy Klasse:</p>
<pre class="brush: java; title: ;">
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.ByteChannel;
import java.nio.channels.FileChannel;
public class FileCopy {
long chunckSizeInBytes;
boolean verbose;
public FileCopy(){
this.chunckSizeInBytes = 1024 * 1024; //Standard: Buffer 1MB
this.verbose = false; //Statistics about Copy Process
}
public FileCopy(boolean verbose){
this.chunckSizeInBytes = 1024 * 1024; //Standard: Buffer 1MB
this.verbose = verbose; //Statistics about Copy Process
}
public FileCopy(long chunckSizeInBytes){
this.chunckSizeInBytes = chunckSizeInBytes; //Custom Buffer (Bytes)
this.verbose = false; //Statistics about Copy Process
}
public FileCopy(long chunckSizeInBytes, boolean verbose){
this.chunckSizeInBytes = chunckSizeInBytes; //Custom Buffer (Bytes)
this.verbose = verbose; //Statistics about Copy Process
}
public void copy(File source, File destination) {
try {
FileInputStream fileInputStream = new FileInputStream(source);
FileOutputStream fileOutputStream = new FileOutputStream(destination);
FileChannel inputChannel = fileInputStream.getChannel();
FileChannel outputChannel = fileOutputStream.getChannel();
transfer(inputChannel, outputChannel, source.length(), false);
fileInputStream.close();
fileOutputStream.close();
destination.setLastModified(source.lastModified());
} catch (Exception e) {
e.printStackTrace();
}
}
public void transfer(FileChannel fileChannel, ByteChannel byteChannel, long lengthInBytes, boolean verbose)
throws IOException {
long overallBytesTransfered = 0L;
long time = -System.currentTimeMillis();
while (overallBytesTransfered &lt; lengthInBytes) {
long bytesTransfered = 0L;
bytesTransfered = fileChannel.transferTo(overallBytesTransfered, Math.min(chunckSizeInBytes, lengthInBytes - overallBytesTransfered), byteChannel);
overallBytesTransfered += bytesTransfered;
if (verbose) {
System.out.println(&quot;overall bytes transfered: &quot; + overallBytesTransfered + &quot; progress &quot; + (Math.round(overallBytesTransfered / ((double) lengthInBytes) * 100.0)) + &quot;%&quot;);
}
}
time += System.currentTimeMillis();
if (verbose) {
System.out.println(&quot;Transfered: &quot; + overallBytesTransfered + &quot; bytes in: &quot; + (time / 1000) + &quot; s -&gt; &quot; + (overallBytesTransfered / 1024.0) / (time / 1000.0) + &quot; kbytes/s&quot;);
}
}
}
</pre>
<p>Zu beachten ist dabei, dass der Zielordner schon zur Laufzeit bestehen muss beziehungsweise vorher erstellt wird.</p>
<p>Das NIO Beispiel stammt von folgender Seite:<br />
<a href="http://www.tutorials.de/forum/java/328830-schnell-grosse-dateien-kopieren-mit-java-nio.html" target="_blank">http://www.tutorials.de/forum/java/328830-schnell-grosse-dateien-kopieren-mit-java-nio.html</a><br />
Es wurde allerdings noch etwas umgeschrieben, dass es als universelle Klasse dient. Außerdem wurde ein Fehler in der Bufferbearbeitung behoben, daher ist von der Verwendung des Originals abzuraten.</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/04/20/dateien-verschieben-kopieren/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Objekte einmalig instanzieren</title>
		<link>http://www.informatik-blog.net/2009/03/26/objekte-einmalig-instanzieren/</link>
		<comments>http://www.informatik-blog.net/2009/03/26/objekte-einmalig-instanzieren/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 23:41:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[getSingletonObject]]></category>
		<category><![CDATA[instanzierung]]></category>
		<category><![CDATA[Objekte]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=546</guid>
		<description><![CDATA[Um ein Objekt nur einmal zu instanzieren und von jeder Klasse auf das gleiche Objekt zuzugreifen, wird SingleTon genutzt. Die Problemlösung ist einfach und sauber. Um ein Objekt nur einmal zu instanzieren, wird geprüft ob das Objekt bereits instanziert wurde und falls es bereits instanziert wurde, wird das Objekt zurück gegeben. Falls das Projekt noch [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Um ein Objekt nur einmal zu instanzieren und von jeder Klasse auf das gleiche Objekt zuzugreifen, wird SingleTon genutzt.</p>
<p>Die Problemlösung ist einfach und sauber. Um ein Objekt nur einmal zu instanzieren, wird geprüft ob das Objekt bereits instanziert wurde und falls es bereits instanziert wurde, wird das Objekt zurück gegeben. Falls das Projekt noch nicht instanziert wurde, wird ein neues Objekt angelegt.</p>
<p>Folgendes Codebeispiel liefert in verschiedenen Klassen immer das gleiche Objekt zurück:</p>
<p><span id="more-546"></span></p>
<pre class="brush: java; title: ;">

public class LogModel {

/**
*
*/

private static LogModel logObj;

public static synchronized LogModel getSingletonObject() {
if (logObj == null) {
logObj = new LogModel();
}
return logObj;
}
}
</pre>
<p>Wichtig ist, dass für die instanzierung des Objekts die Methode getSingletonObject genutzt wird. Dies könnte z.b so aussehen:</p>
<pre class="brush: java; title: ;">

LogModel meinObjekt = LogModel.getSingletonObject();
</pre>
<p>Solange getSingletonObject in den Klassen aufgerufen wird, wird immer das gleiche Objekt genutzt.</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/03/26/objekte-einmalig-instanzieren/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Selbstsigniertes Zeritifkat in einem Java Applet implementieren</title>
		<link>http://www.informatik-blog.net/2009/02/01/selbstsigniertes-zeritifkat-in-einem-java-applet-implementieren/</link>
		<comments>http://www.informatik-blog.net/2009/02/01/selbstsigniertes-zeritifkat-in-einem-java-applet-implementieren/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 01:57:44 +0000</pubDate>
		<dc:creator>Emanuel</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Applets]]></category>
		<category><![CDATA[AppletViewer]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[jarsigner]]></category>
		<category><![CDATA[keytool]]></category>
		<category><![CDATA[selfsigned]]></category>
		<category><![CDATA[zertifikate]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=478</guid>
		<description><![CDATA[Java wird prinzipiel in einer Sandbox im Web ausgeliefert, um Schadcode zu unterdrücken. Leider ist diese Sandbox manchmal sehr unpraktisch, wenn es zum Beispiel darum geht Files über ein Applet zu laden und auszuführen. Ebenso ist es sehr wichtig die Sandbox zu umgehen, falls man Netzwerkanwendungen erstellen will, welche über den aufgerufenen Webhost hinaus gehen. [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Java wird prinzipiel in einer Sandbox im Web ausgeliefert, um Schadcode zu unterdrücken. Leider ist diese Sandbox manchmal sehr unpraktisch, wenn es zum Beispiel darum geht Files über ein Applet zu laden und auszuführen. Ebenso ist es sehr wichtig die Sandbox zu umgehen, falls man Netzwerkanwendungen erstellen will, welche über den aufgerufenen Webhost hinaus gehen. <span id="more-478"></span></p>
<p>Um ein Applet zu erstellen, muss zuerst ein .JAR datei erstellt werden. Bei einer .JAR Datei handelt es sich um eine komprimierten Container, in dem für gewöhnlich manifest Dateien, Resourcen und .java Klassen enthalten sind. Die .JAR Datei kann ebenso als ausführbare Datei genutzt werden, sofern eine für das Programm aktuelle Runtime Enviroment installiert ist. Um die Textdatei, welche zuvor zu .java umbenannt wurde zu Kompilieren und anschließend zu komprimieren wird die Binary javac und jar benötigt. Beide Programme liegen im %JAVAPATH%\bin verzeichnis. Damit sie die Klasse .java kompilieren können, müssen sie javac folgendermaßen aufrufen: <em>javac .java</em><br />
Diese Prozess kompiliert die Klasse, welche daraufhin als .JAR exportiert werden kann. Um die Datei als .JAR zu packen, müssen sie das Programm &#8220;jar&#8221; mit folgenderweiße aufrufen: <em>jar cf &lt;Klassenname&gt;.jar Klassenname.java</em></p>
<p>Nachdem sie die benötigte .JAR Datei erstellt haben, können wir auch schon ein Zertifikat für diese Datei generieren. Sun bietet auch hierfür ein Programm an, welches ebenso unter %JAVAPATH%\bin vorhanden ist. Dieses Zertifikat können sie nun unter folgendem Befehl aufrufen: <em>keytool -genkey -keystore meinTresor -alias tollerAlias</em><br />
Sie haben nun einen Prozess vordefiniert, mit welchem sie das selbstsignierte Zertifikat erstellen können. Dies ist mit folgendem Befehl möglich: <em>keytool -selfcert -keystore meinTresor -alias tollerAlias</em><br />
Nun sind sie bereit die im Anfang des Tutorials erstellte .JAR zu signieren. Dies ist nun möglich mit dem von Sun mitgelieferten Programm jarsigner. Dieses Programm dient ausschlißelich zum signieren von .JAR files mit einem Zertifikat. Der Aufruf ist spielend einfach und lautet: <em>jarsigner -keystore meinTresor &lt;Klassenname&gt;.jar tollerAlias</em></p>
<p>Letztendlich sind sie bereit das .JAR in ihrer Webseite zu implementieren. Dies ist möglich mit folgender anweisung.</p>
<p><em>&lt;applet id=&#8221;appletID&#8221; archive=&#8221;&lt;Klassenname&gt;.jar&#8221; code=&#8221;Mainclass&#8221; align=&#8221;baseline&#8221; width=&#8221;200&#8243; height=&#8221;200&#8243;&gt;&lt;/applet&gt;</em></p>
<p>Wichtig ist zu wissen, dass der Benutzer nun mein Aufruf eine Warnung bekommt, dass dieses Programm mit einem ungültigen Zeritifkat ausgeliefert wird. Dies ist nötig, um den Benutzer hinzuweisen, dass unter umständigen auf Prozesse zugegriffen werden, wofür er normalerweise keine Berechtigung geben würde. Selbstverständlich können sie die ganzen Applets auch in dem vom Sun entwickelten AppletViewer testen.</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/02/01/selbstsigniertes-zeritifkat-in-einem-java-applet-implementieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Informationen der Netzwerkkarten auslesen</title>
		<link>http://www.informatik-blog.net/2009/01/28/informationen-der-netzwerkkarten-auslesen/</link>
		<comments>http://www.informatik-blog.net/2009/01/28/informationen-der-netzwerkkarten-auslesen/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 22:11:30 +0000</pubDate>
		<dc:creator>Emanuel</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[IP-Adresse]]></category>
		<category><![CDATA[NetworkInterface]]></category>
		<category><![CDATA[Netzwerkkarte]]></category>
		<category><![CDATA[NIC]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=464</guid>
		<description><![CDATA[Mithilfe der Klasse java.net.NetworkInterface ist es möglich plattformunabhängig Informationen der Netzwerkkarte auszulesen. Im folgenden Beispiel wird der Netzwerkadapter Name, so wie die dazu gehörige IP-Adresse ausgelesen. Die Ausgabe könnte zum beispiel diese sein: Netzwerk-Interface: lo (Software Loopback Interface 1) - 0:0:0:0:0:0:0:1 - 127.0.0.1 Hier nun der Code um die IP-adressen, so wie die Netzwerkadapter auszulesen. [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Mithilfe der Klasse java.net.NetworkInterface ist es möglich plattformunabhängig Informationen der Netzwerkkarte auszulesen. Im folgenden Beispiel wird der Netzwerkadapter Name, so wie die dazu gehörige IP-Adresse ausgelesen. Die Ausgabe könnte zum beispiel diese sein:<br />
<span id="more-464"></span><br />
<strong><br />
Netzwerk-Interface: lo (Software Loopback Interface 1)<br />
- 0:0:0:0:0:0:0:1<br />
- 127.0.0.1<br />
</strong></p>
<p>Hier nun der Code um die IP-adressen, so wie die Netzwerkadapter auszulesen.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */</span>
<span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">tutorialnetwork</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.net.InetAddress</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.net.NetworkInterface</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.net.SocketException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.Enumeration</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #008000; font-style: italic; font-weight: bold;">/**
 *
 * @author li
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * @param args the command line arguments
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        showNIC<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Gibt die Informationen über alle Netzwerkkarten aus
     *
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> showNIC<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            Enumeration<span style="color: #339933;">&lt;</span>networkinterface<span style="color: #339933;">&gt;</span> interfaceNIC <span style="color: #339933;">=</span> NetworkInterface.<span style="color: #006633;">getNetworkInterfaces</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Alle Schnittstellen durchlaufen</span>
            <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>interfaceNIC.<span style="color: #006633;">hasMoreElements</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;">//Elemente abfragen und ausgeben</span>
                NetworkInterface n <span style="color: #339933;">=</span> interfaceNIC.<span style="color: #006633;">nextElement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span>.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Netzwerk-Interface: %s (%s)&quot;</span>, n.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, n.<span style="color: #006633;">getDisplayName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Adressen abrufen</span>
                Enumeration<span style="color: #339933;">&lt;</span>inetaddress<span style="color: #339933;">&gt;</span> addresses <span style="color: #339933;">=</span> n.<span style="color: #006633;">getInetAddresses</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Adressen durchlaufen</span>
                <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>addresses.<span style="color: #006633;">hasMoreElements</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #003399;">InetAddress</span> address <span style="color: #339933;">=</span> addresses.<span style="color: #006633;">nextElement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span>.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;- %s&quot;</span>, address.<span style="color: #006633;">getHostAddress</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">SocketException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>inetaddress<span style="color: #339933;">&gt;&lt;/</span>networkinterface<span style="color: #339933;">&gt;</span></pre></div></div>

<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/01/28/informationen-der-netzwerkkarten-auslesen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL Verbindung aufbauen, Query senden, abfragen</title>
		<link>http://www.informatik-blog.net/2009/01/28/mysql-verbindung-aufbauen-query-senden-abfragen/</link>
		<comments>http://www.informatik-blog.net/2009/01/28/mysql-verbindung-aufbauen-query-senden-abfragen/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 21:58:51 +0000</pubDate>
		<dc:creator>Emanuel</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[ResultSet]]></category>
		<category><![CDATA[ReturnQuery]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=462</guid>
		<description><![CDATA[Mithilfe des JDBC ist es möglich MySQL Verbindungen aufzubauen und Informationen zu übermitteln und abzufragen. Wie das Beispiel zeigt, senden wir ein einfaches Query an die Datenbank und fragen dieses dann ab. Selbstverständlich ist MySQL weitaus komplexer, worauf sich die Sektion &#8220;SQL&#8221; spezialisiert. Um ein einfaches Query abzusenden kann folgende Klasse verwendet werden: hier nun [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Mithilfe des JDBC ist es möglich MySQL Verbindungen aufzubauen und Informationen zu übermitteln und abzufragen. Wie das Beispiel zeigt, senden wir ein einfaches Query an die Datenbank und fragen dieses dann ab. Selbstverständlich ist MySQL weitaus komplexer, worauf sich die Sektion &#8220;SQL&#8221; spezialisiert.</p>
<p>Um ein einfaches Query abzusenden kann folgende Klasse verwendet werden:</p>
<p><span id="more-462"></span></p>
<p>hier nun die Klasse MySQL .java</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">mysqltest</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.Connection</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.DriverManager</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.ResultSet</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.SQLException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.Statement</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MySQL <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> Username <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;root&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> Password <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Passwort&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> <span style="color: #003399;">Driver</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;com.mysql.jdbc.Driver&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> <span style="color: #003399;">URL</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;jdbc:mysql://mysql.host.net:3306/datenbank&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">Connection</span> connection<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> MySQL<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">Connect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
   <span style="color: #666666; font-style: italic;">/* Sollte der Konstruktur ohne argumente aufgerufen werden, werden die in der klasse genutzten Werte genommen. */</span>
&nbsp;
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> MySQL<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> user, <span style="color: #003399;">String</span> pass<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">Username</span> <span style="color: #339933;">=</span> user<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">Password</span> <span style="color: #339933;">=</span> pass<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">Connect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
 <span style="color: #666666; font-style: italic;">/* Sollte der Konstruktur mit den Argumenten user und pass aufgerufen werden, werden diese definiert und dann Verbunden. */</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> Close<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">connection</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">connection</span>.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* Die Funktion Close() schließt das Query um den Speicher wieder frei zu geben */</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> Connect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">Class</span>.<span style="color: #006633;">forName</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #003399;">Driver</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">connection</span> <span style="color: #339933;">=</span> <span style="color: #003399;">DriverManager</span>.<span style="color: #006633;">getConnection</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #003399;">URL</span>,
                    <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">Username</span>, <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">Password</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error Connecting with User:&quot;</span> <span style="color: #339933;">+</span> Username <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; and Password:&quot;</span> <span style="color: #339933;">+</span> Password<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* Connect registriert den JDBC Treiber und versucht eine Verbindung herzustellen. Sollte dies nicht möglich sein, wird eine Exception ausgelöst */</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> isConnected<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">ResultSet</span> rs <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">ReturnQuery</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT 1;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>rs <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>rs.<span style="color: #006633;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* frägt ein einfaches Query ab, welches &quot;1&quot; zurück liefert, falls man verbunden ist */</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">ResultSet</span> ReturnQuery<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> query<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">Statement</span> stmt <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">connection</span>.<span style="color: #006633;">createStatement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">ResultSet</span> rs <span style="color: #339933;">=</span> stmt.<span style="color: #006633;">executeQuery</span><span style="color: #009900;">&#40;</span>query<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> rs<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">SQLException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">err</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* Sendet ein Query und erwartet eine Rückgabe in Form eines ResultSet */</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> RunQuery<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> query<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">Statement</span> stmt <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">connection</span>.<span style="color: #006633;">createStatement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> stmt.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span>query<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">//  e.printStackTrace();</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">/* Führt das query aus, erwartet aber keine Rückantwort des Servers. */</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>um in MySQL zu verbinden wird diese klasse folgendermaßen aufgerufen:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">mysqltest</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">MySQL</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #008000; font-style: italic; font-weight: bold;">/**
 *
 * @author li
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        db <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MySQL<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">ResultSet</span> rs <span style="color: #339933;">=</span> db.<span style="color: #006633;">ReturnQuery</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;select count(*) as num from test where a='1'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>rs.<span style="color: #006633;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            countRows <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getInt</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;num&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>countRows<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/01/28/mysql-verbindung-aufbauen-query-senden-abfragen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Datenbankverbindung herstellen</title>
		<link>http://www.informatik-blog.net/2009/01/27/datenbankverbindung-herstellen/</link>
		<comments>http://www.informatik-blog.net/2009/01/27/datenbankverbindung-herstellen/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 22:16:40 +0000</pubDate>
		<dc:creator>Emanuel</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Datenbanken]]></category>
		<category><![CDATA[JDBC]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.informatik-blog.net/?p=410</guid>
		<description><![CDATA[In Java gibt es für die Datenbankverbindung die Klasse jdbc, welche für Java Database Connectivity steht. Mithilfe dieser Klasse ist es möglich zu einer vielzahl unterschiedlichen Datenbanken zu verbinden und zu verwalten. In folgenden Beispielen wird gezeigt, wie man eine Verbindung zu Oracle und zu MySQL herstellt. /** * Verbindung zu Oracle * * @param [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>In Java gibt es für die Datenbankverbindung die Klasse jdbc, welche für Java Database Connectivity steht. Mithilfe dieser Klasse ist es möglich zu einer vielzahl unterschiedlichen Datenbanken zu verbinden und zu verwalten. In folgenden Beispielen wird gezeigt, wie man eine Verbindung zu Oracle und zu MySQL herstellt.</p>
<p><span id="more-410"></span></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
* Verbindung zu Oracle
*
* @param server 
* @param port 
* @param serviceName 
* @param user
* @param password 
* @return Connection-Objekt 
*/</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #003399;">Connection</span> connectOracle<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> server, <span style="color: #003399;">String</span> port, <span style="color: #003399;">String</span> serviceName, <span style="color: #003399;">String</span> user, <span style="color: #003399;">String</span> password<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003399;">Connection</span> conn <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// Oracle Treiber laden und registrieren</span>
<span style="color: #003399;">DriverManager</span>.<span style="color: #006633;">registerDriver</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> oracle.<span style="color: #006633;">jdbc</span>.<span style="color: #006633;">driver</span>.<span style="color: #006633;">OracleDriver</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Verbinden</span>
<span style="color: #003399;">String</span> str <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;jdbc:oracle:thin:@&quot;</span> <span style="color: #339933;">+</span> server <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;:&quot;</span> <span style="color: #339933;">+</span> port <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;:&quot;</span> <span style="color: #339933;">+</span> serviceName<span style="color: #339933;">;</span>
conn <span style="color: #339933;">=</span> <span style="color: #003399;">DriverManager</span>.<span style="color: #006633;">getConnection</span><span style="color: #009900;">&#40;</span>str, user, password<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">SQLException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">return</span> conn<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Ebenso ist es problemlos möglich eine Verbindung zu MySQL herzustellen, wie folgendes Beispiel zeigt.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
* Verbindungsaufbau zu MySQL-Datenbank
*
* @param server 
* @param port 
* @param database 
* @param user 
* @param password 
* @return Connection-Objekt 
*/</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #003399;">Connection</span> connectMySQL<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> server, <span style="color: #003399;">String</span> port, <span style="color: #003399;">String</span> database, <span style="color: #003399;">String</span> user, <span style="color: #003399;">String</span> password<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003399;">Connection</span> conn <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// Treiber laden und registrieren</span>
<span style="color: #003399;">DriverManager</span>.<span style="color: #006633;">registerDriver</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #003399;">Driver</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Verbinden</span>
<span style="color: #003399;">String</span> str <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;jdbc:mysql://&quot;</span> <span style="color: #339933;">+</span> server <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;:&quot;</span> <span style="color: #339933;">+</span> port <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;/&quot;</span> <span style="color: #339933;">+</span> database<span style="color: #339933;">;</span>
conn <span style="color: #339933;">=</span> <span style="color: #003399;">DriverManager</span>.<span style="color: #006633;">getConnection</span><span style="color: #009900;">&#40;</span>str, user, password<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">SQLException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">return</span> conn<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Wie man sieht, ist es sehr schnell und einfach möglich eine Datenbankverbindung herzustellen.<br />
JDBC unterstützt folgene Datenbanken:<br />
Woof, 4D JDBC Driver, JDBC NetServer, ANTs ODBC Driver, Open/A for Java, Jturbo driver, Ashpool JDBC Driver, aveConnect, Attunity Connect (server), Axion JDBC driver , BASIS JDBC Driver, BBj Data Server, jdbcKona, WebLogic application server, Birdstep RDM JDBC Driver, jdbc Pool, InterClient, Borland Data Gateway for Java, VisiChannel for JDBC, tcACCESS, aveConnect, JSQL/Ingres, DBMaker JDBC-ODBC Bridge, CONNX, Sequoia JDBC driver, Corel Paradox JDBC driver, Daffodil DB Driver, DataDirect SequeLink JAVA (server), Connect JDBC (type 4), Dharma JDBC SDK, JDBC SDK Lite, Dharma SQL, Mckoi SQL JDBC Driver, JDBC-ODBC Bridge, Hot Sockets JDBC SDK (server), UniVerse JDBC driver, Advantage JDBC driver, FairCom JDBC Driver, Firebird JDBC Driver, FirstSQL/J JDBC, FormWeb JDBC, JDBC2, MB Foster Universal Server, JDBC 1.x (Type 4), FrontBase JDBC driver, SESAM JDBC driver, eTools JDBC, GemStone/J, DatAccess, SQLBase JDBC driver, GWE MYSQL JDBC driver, H2 JDBC driver, High-Availability JDBC proxy, NonStop SQL/MX JDBC, DABroker Driver for Java (server), HiT JDBC, HOBLink J-DRDA, HXTT DBF driver, HXTT Text driver, HXTT Paradox, HXTT Excel driver, HXTT Access driver, hsql JDBC driver, Hummingbird Met@Data, SearchServer JDBC driver, JDBC driver for LanDiBase, DB2 Connect, JDBC Toolbox, JTOpen, Informix JDBC Driver, Lotus Domino Driver for JDBC, IDS JDBC driver, OPENjdbc, Imaginary JDBC, i-net *, dtF/SQL JDBC Driver for Macintosh, jadoZoom, WebFOCUS BI server, InterClient, Essentia JDBC, Caché JDBC Driver, livestore (JDBC cache), Intelligent Adapters, Data Adapters, JET Proxy, JDataConnect, JSQLConnect JSecureConnect, StelsCSV JDBC Driver, StelsEngine JDBC Driver, StelsDBF, StelsXML, StelsMDB JDBC Driver, jTDS JDBC Driver, jxPG JDBC driver, jdbshare, Kdb+ JDBC driver, DUALITY JDBC Proxy, Matisse JDBC driver, JDBC Driver for Teradata, Microsoft SQL Server JDBC Driver, Mimer JDBC, Minisoft JDBC driver, JDBC for Eloquence, MmMySQL JDBC Driver, Teradata JDBC Driver, Teradata JDBC Gateway, SQL-Surfer, JTurbo, NewCoTec JDBC-Treiber, xlSQL, RemoteDB Gateway Server JDBC driver (server), Database Manager for Netware (ODBX-JDBC), LDAP JDBC Driver, ODBC/JDBC Driver Manager for Netware, RmiJdbc, OpenAccess JDBC SDK, OpenAccess JDBC SDK, OpenLink Universal Data Access Driver Suite for JDBC, OpenLink Virtuoso (server), Livelink Collections Server JDBC Driver, Livelink Collections Server JDBC Driver, Enlist: Report Server, Enquire: Directory Server, Ensure: Synchronization Server, Pervasive JDBC driver, PointBase JDBC, PostgreSQL JDBC driver, Apptivity Server, QED JDBC Driver, Recital JDBC Developer, RDBMS Linter SQL ODBC driver, SCO SQL Retriever, SAP DB JDBC Driver, SAS/SHARExNET JDBC interface, CodeBase FOR JDBC, SimbaEngine SDK, dtF/SQL JDBC Driver, SmallSQL JDBC driver, SocketJdbc, Type 4, LDAP Directory JDBC Driver, ADABAS JDBC Client, JDataConnect, StarSQL for Java, Sunopsis JDBC for XML, jCONNECT, EnterpriseCONNECT Gateway (server), Synergy/DE, SQL Connection, ThinkSQL JDBC driver, ThinAccess, U/SQL ODBC/JDBC Gateway, VORTEXjdbc, VORTEXjdbc, Vista JDBC driver, Vista JDBC driver usw.</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.informatik-blog.net/2009/01/27/datenbankverbindung-herstellen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

