manually updating java in ubuntu
Wed, 02/27/2013 - 09:59 — sandipBelow is outlined the process of updating to the latest JDK in ubuntu and updating the alternatives link manually to point the the latest java:
Step 1: Download:
wget http://download.oracle.com/otn -pub/java/jdk/7u15-b03/jdk-7u1 5-linux-x64.tar.gz
cd /usr/lib/jvm/
tar -xzf ~/downloads/jdk-7u15-linux-x64 .tar.gz
Step 2: If java-7-sun already exists, the below is all that is needed if not skip to step 3 if this is the first time it is setup:
unlink java-7-sun
ln -s jdk1.7.0_15 java-7-sun
Step 3: If java-7-sun link does not already exists:
ln -s jdk1.7.0_15 java-7-sun
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-7-sun/ bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-7-sun/ bin/javac" 1
update-alternatives --install "/usr/lib/mozilla/plugins /libjavaplugin.so" "mozilla-javaplugin.so&qu ot; "/usr/lib/jvm/java-7-sun/ jre/lib/amd64/libnpjp2.so" ; 1
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/java-7-sun/ bin/javaws" 1
Step 4: Choose the java just installed as default:
update-alternatives --config java
update-alternatives --config javac
update-alternatives --config javaws
update-alternatives --config mozilla-javaplugin.so
- sandip's blog
- Login or register to post comments
- Read more
jps and jstat for tomcat on jdk-1.6.0_24
Fri, 03/25/2011 - 16:53 — sandipRecently upgrading to java version "1.6.0_24", jps and jstat seemed to be broken to get monitoring information from running tomcat process.
By default java.io.tmpdir is /tmp, however tomcat usually uses it's own temp directory. That is where jps/jstat looks for hsperfdata_* dirs. If java.io.tmpdir is not set, it would look in /tmp. If jps can't find the hsperfdata directory, it won't report anything.
jps/jstat however allows to specify java.io.tmpdir in case you're using a JVM that places those directories in a different location.
So to get it to work:
$JAVA_HOME/bin/jps -J-Djava.io.tmpdir=/path/to/to mcat/temp -l
$JAVA_HOME/bin/jstat -J-Djava.io.tmpdir=/path/to/to mcat/temp -gc $PID
- sandip's blog
- Login or register to post comments
- Read more
Importing existing SSL key and certificate for tomcat
Fri, 07/25/2008 - 16:50 — sandip-
Convert key and cert to a single pkcs12 format.
openssl pkcs12 -export -inkey <pathto>/key.txt -in <pathto>/cert.txt -out cert.pkcs12
keytool -delete -alias tomcat -keystore <pathto>/cacerts
keytool -importkeystore -destkeystore cacerts -srckeystore cert.pkcs12 -srcstoretype PKCS12
keytool -list -keystore <pathto>/cacerts | grep PrivateKeyEntry
keytool -changealias -alias 1 -destalias tomcat -keystore <pathto>/cacerts
Lomboz Eclipse on Linux -- Fedora Core 5
Sun, 06/04/2006 - 14:02 — sandipLomboz is an open source and free J2EE development environment built on the Eclipse open source platform and the Web Tools Platform (WTP) projects.
-
Download and install the latest java sdk.
# cd /usr/local # sh /path/to/jdk-1_5_0_07-linux-i5Download and install the Eclipse SDK:86.bin # ln -s /usr/local/jdk-1_5_0_07 /usr/local/java # ln -s /usr/local/java/bin/java /usr/bin/java # ln -s /usr/local/java/bin/javac /usr/bin/javac
$ wget http://download.eclipse.org/ecDownload and install Lomboz and prerequisites all in one package:lipse/downloads/drops/R-3.1.2- 200601181600/eclipse-SDK-3.1.2 -linux-gtk.tar.gz # tar -C /opt -xvzf eclipse-SDK-3.1.2-linux-gtk.ta r.gz # chown -R root:root /opt/eclipse
$ wget http://download.forge.objectweb.org/lomboz/lomboz-wtp-emf-ge f-jem-3.1.2.zip # cd /opt # unzip /path/to/lomboz-wtp-emf-gef-je m-3.1.2.zip
Note: Say "yes" to any prompt to replace existing file while unzipping.
Start lomboz eclipse:$ /opt/eclipse/eclipse
- sandip's blog
- Login or register to post comments
- Read more
Learning Java using Web Resources...
Tue, 03/15/2005 - 11:32 — sandipBelow are some of the excellent web resources I have utilized to get me started on Java. Hope this helps others too.
-
MITs Open Courseware: 1.00 Introduction to Computers and Engineering Problem Solving, Fall 2002
Sofia Project: Introduction to Java Programming
Bruce Eckels Free eBook from MindView.net: Thinking in Java, 3rd Edition
OpenSource Tomcat Book
Mon, 12/13/2004 - 15:02 — sandipTomcat is the reference implementation of the Java Server Pages(JSP) and Java Servlet specifications. This means it is the most standards compliant Java server available.
Despite Tomcat's popularity, it suffers from a common shortcoming among open source projects: lack of complete documentation. There is documentation distributed with Tomcat mirrored at jakarta.apache.org. However, there is also an open source effort to write a Tomcat book at tomcatbook.sourceforge.net
- sandip's blog
- Login or register to post comments
Java Search Applet - HouseSpider !!
Fri, 05/21/2004 - 14:46 — sandipHouseSpider is an Java applet that adds indexing and search capability to your web site. It can search by two methods, by spidering through your site or by searching a cached index file. Spider-searching is slow, but very easy to set up and requires no maintenance. Cache-searching requires only a little more attention to set-up and is very fast, sometimes even faster than server-hosted cgi programs. HouseSpider also supports compression (in zip-format) of the index file. HouseSpider has 100% support for i18n (internationalization). It is already translated to several languages. And best of all - it is free!
- sandip's blog
- Login or register to post comments
- Read more
Object Oriented Concepts
Fri, 01/23/2004 - 09:26 — sandipObject Oriented Concepts: The basic building blocks.
- sandip's blog
- Login or register to post comments