<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://prendreuncafe.com/blog/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Prendre un Café - java</title>
  <link>http://prendreuncafe.com/blog/</link>
  <description></description>
  <language>fr</language>
  <pubDate>Wed, 14 May 2008 15:57:49 +0200</pubDate>
  <copyright>Contenus sous licence Creative Commons BY-SA</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Vacances again + Vrac</title>
    <link>http://prendreuncafe.com/blog/post/2006/08/18/486-vacances-again-vrac</link>
    <guid isPermaLink="false">urn:md5:75be4f50c3ff23c65dc371c4a28c42aa</guid>
    <pubDate>Fri, 18 Aug 2006 14:32:28 +0000</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Divers</category>
        <category>dedibox</category><category>flash</category><category>haha</category><category>java</category><category>myself</category><category>prendreuncafe</category><category>troll</category>    
    <description>    &lt;p&gt;D'ici quelques heures, les commentaires et trackbacks de ce blog prendront à nouveau congé une petite semaine, de même que votre hôte. C'est pas que je suis à plat, mais pas loin.&lt;/p&gt;


&lt;p&gt;En attendant, les nouvelles du front&amp;nbsp;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://blogs.adobe.com/penguin.swf/2006/08/across_the_distros_1.html&quot; hreflang=&quot;en&quot;&gt;Flash Player 9 pour Linux, le bout du tunnel ?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.wearetheweb.org/&quot; hreflang=&quot;en&quot;&gt;We are the web&lt;/a&gt;&amp;nbsp;: Fighting for Net Neutrality and Internet Freedom.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dappit.com/&quot; hreflang=&quot;en&quot;&gt;Dappit.com&lt;/a&gt;&amp;nbsp;: un générateur de webservices à partir de services en ligne existants, comme Google. C'est bêta, mais prometeur.&lt;/li&gt;
&lt;li&gt;J'ai pris une &lt;a href=&quot;http://www.dedibox.fr&quot; hreflang=&quot;fr&quot;&gt;Dédibox&lt;/a&gt;. Pour le prix, c'est quand même drôlement royal.&lt;/li&gt;
&lt;li&gt;Y'a pas à chier, Java ça craint.&lt;/li&gt;
&lt;li&gt;Je ne sais toujours pas &lt;a href=&quot;http://prendreuncafe.com/blog/2006/08/09/484-gangrene#c4439&quot; hreflang=&quot;fr&quot;&gt;gérer les trolls&lt;/a&gt;, et ne peux pas m'empêcher d'en lancer malgré moi (cf. point précédent.)&lt;/li&gt;
&lt;li&gt;Je suis crevé.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A bientôt pour de nouvelles zaventures.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Edit :&lt;/strong&gt; Je ne resiste pas à relater deux informations du journal télévisé de ce soir&amp;nbsp;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;La doyenne des français est décédé ce matin à l'âge de 114 ans&amp;nbsp;: mme &lt;strong&gt;Mornet&lt;/strong&gt; lui succède donc à l'âge de 112 ans,&lt;/li&gt;
&lt;li&gt;Mickaël &lt;strong&gt;Gelabale&lt;/strong&gt; se dit confiant pour l'imminent championnat du monde de basketball.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oui, un rien m'amuse.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Edit :&lt;/strong&gt; Reviendu (snif.)&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Hello Java !</title>
    <link>http://prendreuncafe.com/blog/post/2005/08/19/253-hello-java</link>
    <guid isPermaLink="false">urn:md5:0a21ccb19ecc319012df8be409a5d7ed</guid>
    <pubDate>Fri, 19 Aug 2005 20:12:00 +0000</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Dev</category>
        <category>dev</category><category>java</category>    
    <description>&lt;p&gt;Je me mets aujourd'hui à &lt;a href=&quot;http://sun.java.com&quot; hreflang=&quot;en&quot;&gt;Java&lt;/a&gt;, et je viens d'écrire mon premier programme débile. Ne riez pas, il faut bien commencer un jour &lt;img src=&quot;/blog/themes/PuC4/smilies/biggrin.gif&quot; alt=&quot;:D&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Le but - modeste, hein, arrêtez de rire - est d'afficher une chaîne et de la répéter un certain nombre fois via les paramètres passé en ligne de commande, comme par exemple &lt;code&gt;java Test &amp;quot;Bonjour, j'aime les brocolis.&amp;quot; 10&lt;/code&gt; pour afficher 10 fois &amp;quot;Bonjour, j'aime les brocolis&amp;quot;.&lt;/p&gt;    &lt;p&gt;Voila le code commenté :&lt;/p&gt;


&lt;p&gt;Fichier &lt;code&gt;Test.java&lt;/code&gt; :&lt;/p&gt;

&lt;pre class=&quot;java&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; Test &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	
	&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/*
	 * Point d'entree du programme
	 */&lt;/span&gt;
	
	&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;void&lt;/span&gt; main&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;amp;bntl=1&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; args&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Initialisation de la valeur de la phrase (&amp;quot;no message&amp;quot; par defaut)&lt;/span&gt;
		&lt;a href=&quot;http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;amp;bntl=1&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; msg = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;no message&amp;quot;&lt;/span&gt;;
		&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On prend en compte le premier parametre s'il est renseigne&lt;/span&gt;
		&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;args.&lt;span style=&quot;color: #006600;&quot;&gt;length&lt;/span&gt; &amp;gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &amp;amp;&amp;amp; args&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; != &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
			msg = args&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;;
		&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
		&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Initialisation du nombre d'affichage a effectuer (1 par defaut)&lt;/span&gt;
		&lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; n = &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;;
		&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On prend en compte le second parametre s'il est renseigne&lt;/span&gt;
		&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;args.&lt;span style=&quot;color: #006600;&quot;&gt;length&lt;/span&gt; &amp;gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &amp;amp;&amp;amp; args&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; != &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Transtypage du type chaine -&amp;gt; entier pour ce second parametre&lt;/span&gt;
			n = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;a href=&quot;http://www.google.com/search?q=allinurl%3AInteger+java.sun.com&amp;amp;bntl=1&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;args&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
			n = n &amp;gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; ? n : &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;;
		&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
		Printer p = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Printer&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
		p.&lt;span style=&quot;color: #006600;&quot;&gt;printnmsg&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;msg, n&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; Printer &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	
	&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/*
	 * Envoi d'une chaine str vers la sortie, n fois
	 */&lt;/span&gt;
	
	&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;void&lt;/span&gt; printnmsg&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;amp;bntl=1&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;/a&gt; msg, &lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; n&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; i=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;; i&amp;lt;n; i++&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;a href=&quot;http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;amp;bntl=1&quot;&gt;&lt;span style=&quot;color: #aaaadd; font-weight: bold;&quot;&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;msg&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
		&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;La compilation se fait ainsi :&lt;/p&gt;


&lt;pre&gt;$ javac Test.java&lt;/pre&gt;


&lt;p&gt;Et le test :&lt;/p&gt;


&lt;pre&gt;$ java Test &amp;quot;J'aime les brocolis !&amp;quot; 10&lt;/pre&gt;


&lt;p&gt;Je constate que Java est un langage vraiment strict, ça change drôlement de &lt;acronym&gt;PHP&lt;/acronym&gt; ou d'actionScript... Mais c'est pas desagréable, ça oblige à être très rigoureux et la qualité du code doit à mon avis en être améliorée &lt;img src=&quot;/blog/themes/PuC4/smilies/smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;


&lt;p&gt;M'enfin bon, la route est encore longue... &lt;img src=&quot;/blog/themes/PuC4/smilies/icon_ohwell.gif&quot; alt=&quot;:-/&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Installer Eclipse sur Ubuntu Hoary</title>
    <link>http://prendreuncafe.com/blog/post/2005/06/24/165-installer-eclipse-sur-ubuntu-hoary</link>
    <guid isPermaLink="false">urn:md5:6d47dab70eaa8548c4f8dd62b4147b93</guid>
    <pubDate>Fri, 24 Jun 2005 11:15:56 +0000</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Ubuntu</category>
        <category>dev</category><category>eclipse</category><category>java</category><category>linux</category><category>tutoriel</category><category>ubuntu</category><category>web</category>    
    <description>&lt;p&gt;&lt;a href=&quot;http://www.eclipse.org&quot; hreflang=&quot;en&quot;&gt;Eclipse&lt;/a&gt; est un &lt;acronym title=&quot;Integrated Development Environment&quot;&gt;IDE&lt;/acronym&gt; permettant de développer dans un grand nombre de languages de programmation comme &lt;a href=&quot;http://www.php.net&quot; hreflang=&quot;fr&quot;&gt;&lt;acronym title=&quot;PHP: Hypertext Preprocessor&quot;&gt;PHP&lt;/acronym&gt;&lt;/a&gt;, &lt;a href=&quot;http://java.sun.com&quot; hreflang=&quot;en&quot;&gt;Java&lt;/a&gt;, &lt;a href=&quot;http://python.org/&quot; hreflang=&quot;en&quot;&gt;Python&lt;/a&gt; ou même &lt;a href=&quot;http://www.macromedia.com/devnet/mx/flash/actionscript.html&quot; hreflang=&quot;en&quot;&gt;ActionScript2&lt;/a&gt; via des plugins et outils tiers spécifiques. Il n'y a pas de paquet &lt;em&gt;eclipse&lt;/em&gt; dans les sources d'Ubuntu &lt;em&gt;Hoary&lt;/em&gt;, backports y compris, cependant sâchez qu'il devrait faire son apparition sous &lt;em&gt;Breezy&lt;/em&gt;, la future version du système d'exploitation.&lt;/p&gt;


&lt;p&gt;En attendant, et si comme moi vous êtes sous Hoary, voici la procédure d'installation du programme (Note&amp;nbsp;: je suis bien tombé sur &lt;a href=&quot;http://blognote-info.com/index.php?2005/03/03/67-installer-eclipse&quot; hreflang=&quot;fr&quot;&gt;cette procédure d'installation chez PitiLezard&lt;/a&gt;, mais j'obtenais des erreurs de permission en pagaille...) Voici donc ma procédure personnalisée &lt;img src=&quot;/blog/themes/PuC4/smilies/smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;    &lt;p&gt;En prérequis, il vous faut installer le &lt;acronym title=&quot;Java Runtime Emvironment&quot;&gt;JRE&lt;/acronym&gt;. La procédure &lt;a href=&quot;http://ubuntuguide.org/#jre&quot; hreflang=&quot;en&quot;&gt;est décrite ici&lt;/a&gt;.&lt;/p&gt;


&lt;h4&gt;Installation d'Eclipse&lt;/h4&gt;


&lt;p&gt;Tout d'abord, récupérez l'archive d&lt;em&gt;'eclipse&lt;/em&gt;, pour Linux/Gtk2 &lt;a href=&quot;http://www.eclipse.org/downloads/index.php&quot; hreflang=&quot;en&quot;&gt;à cette adresse&lt;/a&gt;. À l'heure où je rédige ce billet, vous avez le choix entre la version stable (3.0.2) et la 3.1 &lt;acronym title=&quot;Third Release Candidate&quot;&gt;RC3&lt;/acronym&gt;. Personnellement c'est cette dernière version que j'ai choisi d'installer.&lt;/p&gt;


&lt;p&gt;Une fois le fichier récupéré, décompressez-le et déplacez-le dans votre répertoire &lt;code&gt;/opt&lt;/code&gt;. J'utilise ce répertoire pour tout les programmes installés/compilés manuellement, ce qui permet de distinguer les paquets officiels des bidouilles &lt;em&gt;maison&lt;/em&gt;.&lt;/p&gt;


&lt;pre&gt;$ sudo -s
Password:
# cd &amp;lt;répértoire contenant votre fichier téléchargé&amp;gt;
# tar -zxvf eclipse-SDK-3.1RC3-linux-gtk.tar.gz 
# mv eclipse /opt/eclipse
# chown -R root:root /opt/eclipse&lt;/pre&gt;


&lt;p&gt;Ensuite, on va créer un fichier texte executable &lt;em&gt;eclipse&lt;/em&gt; que l'on va placer dans le répertoire &lt;em&gt;usr/bin/&lt;/em&gt;. L'avantage immédiat est que tous les utilisateurs du sytème pourront lancer &lt;em&gt;eclipse&lt;/em&gt; (astuce trouvée sur le &lt;a href=&quot;https://wiki.ubuntu.com/EclipseIDE&quot; hreflang=&quot;en&quot;&gt;wiki d'Ubuntu&lt;/a&gt;). En voici le contenu&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;#!/bin/sh
export MOZILLA_FIVE_HOME=&quot;/usr/lib/mozilla/&quot;
export ECLIPSE_HOME=&quot;/opt/eclipse&quot;

$ECLIPSE_HOME/eclipse $*&lt;/pre&gt;


&lt;p&gt;Il nous reste à rendre le fichier executable&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;# chmod +x /usr/bin/eclipse&lt;/pre&gt;


&lt;p&gt;Puis à créer un lanceur sur le bureau Gnome (la commande à lancer est... supsense... &lt;code&gt;eclipse&lt;/code&gt;) &lt;img src=&quot;/blog/themes/PuC4/smilies/smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Dans un prochain billet, on verra différents plugins de coloration syntaxique et de gestion de projets interessants.&lt;/p&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>