Java https://www.keopx.net/ es Instalación y configuracion de java https://www.keopx.net/blog/instalacion-y-configuracion-de-java <span class="field field--name-title field--type-string field--label-hidden">Instalación y configuracion de java</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><h2>Obtenemos java</h2> <p>Antes de descargar una versión de java debemos saber la versión del S.O. esto es, si es x86 o amd64. Para ello ejecutamos lo siguiente:</p> <p><code># uname -a</code><br /> <code>Linux Hetz01 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 x86_64 <strong>x86_64</strong> x86_64 GNU/Linux</code></p> <p>Ahora descargamos java a nuestro equipo:</p> <ul> <li><a href="http://www.java.com/es/download/linux_manual.jsp?locale=es">http://www.java.com/es/download/linux_manual.jsp?locale=es</a></li> <li><a href="http://www.oracle.com/technetwork/es/java/javase/downloads/index.html">http://www.oracle.com/technetwork/es/java/javase/downloads/index.html</a></li> </ul> <h2>Instalar JRE</h2> <h3>Subimos JAVA</h3> <p><code>$ scp jre-7u17-linux-x64.tar.gz root@78.47.194.156:.</code></p> <h3>Ahora instalamos en el servidor</h3> <p><code># tar -xvf  jre-7u17-linux-x64.tar.gz</code><br /> <code># mkdir /usr/lib/jvm</code><br /> <code># mv jre1.7.0_17 /usr/lib/jvm/</code><br /> <code># update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0_17/bin/java 0</code><br /> <code># update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jre1.7.0_17/bin/javaws 0</code></p> <h2>Instalar JDK</h2> <h3>Subimos JAVA</h3> <p><code>$ scp jdk-7u17-linux-x64.tar.gz root@78.47.194.156:.</code></p> <h3>Ahora instalamos en el servidor</h3> <p><code># tar -xvf  jdk-7u17-linux-x64.tar.gz</code><br /> <code># mkdir /usr/lib/jvm</code><br /> <code># mv jdk1.7.0_17 /usr/lib/jvm/</code><br /> <code># update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_17/bin/java 1</code><br /> <code># update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/&gt;&gt;jdk1.7.0_17/bin/javac 1</code><br /> <code># update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_17/bin/javaws 1</code></p> <h2><code>Enlaces simbólicos</code></h2> <p><code>Para poder actualiza tanto el <strong>jdk</strong> como el <strong>jre</strong> podemos usar el enlace simbólico que apunte concreta de la <strong>jvm</strong> a uno genérico.</code></p> <h3>JRE simbólico</h3> <p><code># ln -s /usr/lib/jvm/jre1.7.0_17 /usr/lib/jvm/jre1.7.0</code></p> <p>Ahora configuramos el nuevo entorno:</p> <p>&gt;<code># update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0/bin/java 0</code><br /> &gt;<code># update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jre1.7.0/bin/javaws 0</code></p> <h3>JDK simbólico</h3> <p><code># ln -s /usr/lib/jvm/jdk1.7.0_17 /usr/lib/jvm/jdk1.7.0</code></p> <p>Ahora configuramos el nuevo entorno:&gt;</p> <p><code># update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/bin/java 1</code><br /> <code># update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0/bin/javac 1 </code><br /> <code># update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0/bin/javaws 1</code></p> <h2>Reconfigurar java</h2> <p><code># update-alternatives --config java</code><br /> <code># update-alternatives --config javac</code><br /> <code># update-alternatives --config javaws</code></p> <h2>Referencias</h2> <ul> <li><a href="http://www.liberiangeek.net/2012/04/install-oracle-java-runtime-jre-7-in-ubuntu-12-04-precise-pangolin/">http://www.liberiangeek.net/2012/04/install-oracle-java-runtime-jre-7-in-ubuntu-12-04-precise-pangolin/</a></li> <li><a href="http://www.liberiangeek.net/2012/04/install-oracle-java-jdk-7-in-ubuntu-12-04-precise-pangolin">http://www.liberiangeek.net/2012/04/install-oracle-java-jdk-7-in-ubuntu-12-04-precise-pangolin</a></li> <li><a href="http://www.java.com/es/download/linux_manual.jsp?locale=es">http://www.java.com/es/download/linux_manual.jsp?locale=es</a></li> <li><a href="http://www.oracle.com/technetwork/es/java/javase/downloads/index.html">http://www.oracle.com/technetwork/es/java/javase/downloads/index.html</a></li> </ul> <p> </p></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Vie, 26/07/2019 - 08:15</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/java" hreflang="es">Java</a></div> <div class="field__item"><a href="/categoria/debian" hreflang="es">Debian</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/java" hreflang="es">Java</a></div> <div class="field__item"><a href="/tag/server" hreflang="es">server</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=302&amp;2=field_comments&amp;3=comment" token="wNnqtKqLMvApCw1DE11sNDEU8kVI9SRvQvrQQNe09rc"></drupal-render-placeholder> </section> Fri, 26 Jul 2019 06:15:57 +0000 keopx 302 at https://www.keopx.net Instalar jar en el repositorio maven que no existe https://www.keopx.net/blog/instalar-jar-en-el-repositorio-maven-que-no-existe <span class="field field--name-title field--type-string field--label-hidden">Instalar jar en el repositorio maven que no existe</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item quickedit-field" data-quickedit-field-id="node/146/body/es/full"> <p>Esto me sucedeio el otro dia en un proyecto en que necesitaba el jar JDBC de Oracle.</p> <p>Para ello en el fichero <strong>pom.xml</strong> es necesario añadir el jar que necesitemos, en este caso el jar de Oracle.</p> <p><code>&lt;dependency&gt;<br /> &lt;groupId&gt;ojdbc&lt;/groupId&gt;<br /> &lt;artifactId&gt;ojdbc&lt;/artifactId&gt;<br /> &lt;version&gt;14&lt;/version&gt;</code></p> <p>Al compilar el proyecto de maven nos dara un error al no encontrar en los repositorios el jar necesario.</p> <p>Obtenemos de terceras fuentes en jar.</p> <p>Una vez realizado esto podemos proceder a añadir a nuestro repositorio local de la siguiente forma:<br /> <code>mvn install:install-file -Dfile=&lt;path-to-file&gt; -DgroupId=&lt;group-id&gt; -DartifactId=&lt;artifact-id&gt; -Dversion=&lt;version&gt; -Dpackaging=&lt;packaging&gt;</code></p> <p>Ejemplo:</p> <p><code>/home/nuestro_usuario/Proyectos/prototipo/apache-maven-2.2.1/bin/mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=ojdbc -DartifactId=ojdbc -Dversion=14 -Dpackaging=jar</code></p> <p>Se creara en la siguiente ruta:</p> <p>Installing /home/nuestro_usuario/Escritorio/ojdbc14.jar to <strong>/home/nuestro_usuario/.m2/repository/ojdbc/ojdbc/14/ojdbc-14.jar</strong></p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sáb, 28/11/2009 - 11:59</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/java" hreflang="es">Java</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/java" hreflang="es">Java</a></div> <div class="field__item"><a href="/tag/jar" hreflang="es">Jar</a></div> <div class="field__item"><a href="/tag/oracle" hreflang="es">Oracle</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Añadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=146&amp;2=field_comments&amp;3=comment" token="RTQi3OsUx5cAhFTyXA-QshOMCbS4y_Nkg--M7cHAWXs"></drupal-render-placeholder> </section> Sat, 28 Nov 2009 10:59:35 +0000 keopx 146 at https://www.keopx.net