<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Java on SigmaLab</title><link>https://blog.sigmalab.net/tags/java/</link><description>Recent content in Java on SigmaLab</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 21 Sep 2011 19:57:00 +0000</lastBuildDate><atom:link href="https://blog.sigmalab.net/tags/java/index.xml" rel="self" type="application/rss+xml"/><item><title>Spring Integration Http Outbound Gateway and variable url</title><link>https://blog.sigmalab.net/2011/09/21/spring-integration-http-outbound-gateway-and-variable-url/</link><pubDate>Wed, 21 Sep 2011 19:57:00 +0000</pubDate><guid>https://blog.sigmalab.net/2011/09/21/spring-integration-http-outbound-gateway-and-variable-url/</guid><description>I&amp;#39;ve recently had to deal with spring integration and in particular the http outbound gateway component. One possible use case for it would be to have to send the message out to an arbitrary url. In o</description></item><item><title>jdk tools.jar under Snow leopard</title><link>https://blog.sigmalab.net/2010/10/17/jdk-tools-jar-under-snow-leopard/</link><pubDate>Sun, 17 Oct 2010 11:01:27 +0000</pubDate><guid>https://blog.sigmalab.net/2010/10/17/jdk-tools-jar-under-snow-leopard/</guid><description>&lt;p&gt;Se usando maven-antrun-plugin sotto MacOsX Snow Leopard ottenete&lt;/p&gt;
&lt;blockquote&gt;[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
&lt;h2 id="missing"&gt;Missing:&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;sun.jdk:tools&amp;#x1fad9;1.6.0&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Try downloading the file manually from the project website.&lt;/p&gt;
&lt;p&gt;Then, install it using the command:
mvn install:install-file -DgroupId=sun.jdk -DartifactId=tools -Dversion=1.6.0 -Dpackaging=jar -Dfile=/path/to/file&lt;/p&gt;
&lt;p&gt;Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=sun.jdk -DartifactId=tools -Dversion=1.6.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]&lt;/p&gt;
&lt;p&gt;Path to dependency:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.4&lt;/li&gt;
&lt;li&gt;sun.jdk:tools&amp;#x1fad9;1.6.0&lt;/blockquote&gt;
La soluzione veloce è :
&lt;code&gt;
cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/
sudo mkdir lib
cd lib
sudo ln -s ../Classes/classes.jar tools.jar
&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Purtroppo non ho ancora trovato un modo elegante dentro maven usando i profile.&lt;/p&gt;</description></item><item><title>Google App Engine introduce Java</title><link>https://blog.sigmalab.net/2009/04/10/google-app-engine-introduces-java/</link><pubDate>Fri, 10 Apr 2009 16:29:29 +0000</pubDate><guid>https://blog.sigmalab.net/2009/04/10/google-app-engine-introduces-java/</guid><description>&lt;p&gt;E&amp;rsquo; un dato di fatto che spesso, la piattaforma di sviluppo che scegliamo è collegata con i servizi di hosting che esistono. Le preferenze personali semplicemente passano in secondo piano. LAMP è un successo mondiale sopratutto perche esistono migliaia siti di hosting pronti e a basso costo. .Net è un &amp;ldquo;fallimento&amp;rdquo; lato server perche i server non sono gratis e aperti. Java ha i server gratis e aperti, ma presenta i problemi. Se un host provider mette a disposizione un application/servlet container, come dare un servizio che scala e contemporaneamente proibire ai sviluppatori di fare idiozie che potrebbero mettere in ginocchio il sistema o lasciarlo meno sicuro, alla fine avete a disposizione tutte le API del JDK. Aggiungiamo anche il fatto che i requisiti neccessari sono più esigenti in termini di RAM e CPU messi a confronto con LAMP. Un problema non da poco che gli ingegneri della Google hanno deciso di affrontare e offrire una soluzione tutta loro.
Google App Engine, che fin&amp;rsquo;ora offriva Python come piattaforma di sviluppo, &lt;a href="http://googleappengine.blogspot.com/2009/04/seriously-this-time-new-language-on-app.html"&gt;ora offre anche Java&lt;/a&gt;. Per il momento, è in fase di &amp;ldquo;prova&amp;rdquo; e limitato ai primi 10'000 sviluppatori che faranno la richiesta (10 siti a testa).
Chi sarà il fortunato, vedrà che la Java VM è stata modificata, le modifiche principali sono&lt;/p&gt;</description></item><item><title>Maven: usare la cartella "lib" di un project</title><link>https://blog.sigmalab.net/2008/12/03/maven-usare-la-cartella-lib-di-un-project/</link><pubDate>Wed, 03 Dec 2008 12:44:44 +0000</pubDate><guid>https://blog.sigmalab.net/2008/12/03/maven-usare-la-cartella-lib-di-un-project/</guid><description>&lt;p&gt;Se uno per praticità vuole tenere le library all&amp;rsquo;interno del project o cmq. usare java-library che nel maven-repository non ci sono e non vuole sporcare il repository può mettere nel pom del progetto in alto :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;&amp;lt;repositories&amp;gt;
&amp;lt;repository&amp;gt;
&amp;lt;id&amp;gt;project&amp;lt;/id&amp;gt;
&amp;lt;name&amp;gt;Project Maven Repository&amp;lt;/name&amp;gt;
&amp;lt;layout&amp;gt;default&amp;lt;/layout&amp;gt;
&amp;lt;url&amp;gt;file:///./lib&amp;lt;/url&amp;gt;
&amp;lt;/repository&amp;gt;
&amp;lt;/repositories&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In questo modo maven cercherà nella lib le java-library necessarie. [&lt;a href="http://binkley.blogspot.com/2007/03/storing-jars-in-maven-project.html"&gt;Fonte&lt;/a&gt;]&lt;/p&gt;</description></item><item><title>Obtain Multiaddress IP with java</title><link>https://blog.sigmalab.net/2008/10/16/obtain-multiaddress-ip-with-java/</link><pubDate>Thu, 16 Oct 2008 13:00:40 +0000</pubDate><guid>https://blog.sigmalab.net/2008/10/16/obtain-multiaddress-ip-with-java/</guid><description>&lt;p&gt;If you have many address, you can obtain all :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;InetAddress[] e = InetAddress.getAllByName(InetAddress.getLocalHost().getCanonicalHostName());&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>JBuilder 2008 and Windows Vista problems</title><link>https://blog.sigmalab.net/2008/08/07/jbuilder-2008-and-windows-vista-problems/</link><pubDate>Thu, 07 Aug 2008 01:46:00 +0000</pubDate><guid>https://blog.sigmalab.net/2008/08/07/jbuilder-2008-and-windows-vista-problems/</guid><description>So let&amp;#39;s say you try to install JBuilder 2008 under Windows Vista (32bit). Did all went smoothly? A friend of mine got a nice JVM terminated Exit code=-1 error. It would seem that if you modify the JB</description></item><item><title>Eclipse RCP on MacOSx 10.5</title><link>https://blog.sigmalab.net/2008/04/02/eclipse-rcp-on-macosx-105/</link><pubDate>Wed, 02 Apr 2008 19:38:06 +0000</pubDate><guid>https://blog.sigmalab.net/2008/04/02/eclipse-rcp-on-macosx-105/</guid><description>&lt;p&gt;Se vi avventurate nello sviluppare plugin RCP con eclipse sotto MacOsX 10.5 Leopard sappiate che avrete degli errori tipo
&lt;code&gt;
java.lang.UnsatisfiedLinkError: no swt-carbon-3349
or swt-carbon in swt.library.path, java.library.path or the jar file
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;l&amp;rsquo;unica soluzione che avete è quella mostrata in figura, ossia andare in Run Dialog e nelle opzioni della VM aggiungere
&lt;code&gt;
-Djava.library.path=/Application/eclipse/plugin
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href='https://blog.sigmalab.net/wp-content/uploads/2008/04/picture-1.png' title='Shoot Eclipse Dialog'&gt;&lt;img src='https://blog.sigmalab.net/wp-content/uploads/2008/04/picture-1.thumbnail.png' alt='Shoot Eclipse Dialog' /&gt;&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>