Unistall OpenJDK / Install JDK on Fedora

0 comments

 PURPOSE: TO UNINSTALL OPENJDK AND INSTALL JDK

*********** STEP 1 STARTS ***********

  ==:> remove open jdk  <: br="br">
1)   to find installed java packages:   rpm -qa | grep java

2)  to uninstall open jdk :   yum remove java-1.6.0-openjdk-1.6.0.0-68.1.11.5.fc16.x86_64


***********STEP 1 ENDS  ***********
  

*********** STEP 2 STARTS ***********

 ==:>  install jdk on fedora  <: br="br">
rpm -Uvh /jdk-7u9-linux-x64.rpm

rpm -Uvh /jre-7u9-linux-x64.rpm

## java ##
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
## javaws ##
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000

## Java Browser (Mozilla) Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 20000

## Install javac only if you installed JDK (Java Development Kit) package ##
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000

alternatives --config java

Enter to keep the current selection[+], or type selection number:
Note: java with [+] is currently on use

alternatives --config javaws

alternatives --config libjavaplugin.so

alternatives --config libjavaplugin.so.x86_64

alternatives --config javac

*********** STEP 2 STARTS ***********

*********** STEP 3 STARTS ***********


 ==:>  set classpath in fedora <: br="br">
vi ~/.bash_profile
export JAVA_HOME=/usr/java/jdk1.5.0_07/bin
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin

$ source ~/.bash_profile or  . ~/.bash_profile


 ** * Set JAVA_HOME / PATH for all user

You need to setup global config in /etc/profile OR /etc/bash.bashrc file for all users:
# vi /etc/profile

Next setup PATH / JAVA_PATH variables as follows:

export PATH=$PATH:/usr/java/jdk1.5.0_07/bin
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin

Save and close the file. Once again you need to type the following command to activate the path settings immediately:
# source /etc/profile

*********** STEP 3 STARTS ***********



reference links:

http://fedorasolved.org/Members/zcat/using-sun-java-instead-of-openjdk

http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-7-on-fedora-centos-red-hat-rhel/

charts for android

0 comments

AwesomeChartJS are very handy to show simple charts in android apps working with phone gap with any mobile framework.

  I've used JQM with PG.Googled for perfect solution but found AwesomeChartJS
for simple charts.

 Integration is as simple as that.


   Paste below code in the application as follows:


             
   copy js files





  copy html5 code to page

        


           
                Your web-browser does not support the HTML 5 canvas element.
           


       




now check the page it should work.














Reference link: http://cyberpython.github.com/AwesomeChartJS/

there are other frma 


0 comments
Tabs in Liferay portlet:

<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ page import="com.liferay.portal.kernel.portlet.LiferayWindowState" %>

<portlet:defineobjects>
<liferay-theme:defineobjects/>

<table width="100%">
<tbody><tr>
<td align="left">

</td>
</tr>
<tr>
<td>
<liferay-ui:tabs names="GENERAL,DETAILS" refresh="">">

<liferay-ui:section>Tab 1 </liferay-ui:section>
<liferay-ui:section> Tab 2 </liferay-ui:section>
</liferay-ui:tabs>
</td>
</tr>
</tbody></table>
0 comments
its self explanatory:

structure code:
<?xml version="1.0" encoding="UTF-8"?>

<root>
<dynamic-element name="shortcontent" type="text_box" repeatable="false"/>
<dynamic-element name="content" type="text_area" repeatable="false"/>
<dynamic-element name="title" type="text_box" repeatable="false"/>
</root>


template code sample to extract data from structure:

<?xml version="1.0" encoding="UTF-8"?>
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">


<xsl:variable name="url" select="//request/render-url" />
<xsl:variable name="namespace" select="//request/portlet-namespace" />

<xsl:variable name="category">
<xsl:text>general</xsl:text>
</xsl:variable>

<xsl:variable name="community">
<xsl:text>@friendly_url_public@@group_friendly_url@</xsl:text>
</xsl:variable>

<xsl:variable name="language-id">
<xsl:text>@language_id@</xsl:text>
</xsl:variable>

<xsl:variable name="groupId">
<xsl:text>@group_id@</xsl:text>
</xsl:variable>

<xsl:variable name="structure-id">
<xsl:text>sai</xsl:text>
</xsl:variable>

<xsl:variable name="articles" select="document(concat('http://@portal_url@/c/journal/get_articles?templateId=',$structure-id,'&delta=5&languageId=',$language-id,'&type=',$category))/result-set/result" />

<br/>
<xsl:value-of select="$structure-id" /> -- <xsl:value-of select="$language-id" /> -- <xsl:value-of select="$category" />
<br/>

<xsl:for-each select="$articles">
<div style="background-color: #EEEEEE; font-family: Arial; font-size: 12pt;">

<xsl:value-of select="root/dynamic-element[@name='content']/dynamic-content" disable-output-escaping="yes" />
<xsl:value-of select="/root/dynamic-element[@name='shortcontent']/dynamic-content" disable-output-escaping="yes" />
<br/>
</div>


</xsl:for-each>

</html>
0 comments



The Shirdi Saibaba Temple, located at Shirdi, Maharashtra, India attracts millions of devotees of all religions, castes and creed who come to pay homage to Shri Sai Baba. The temple is a beautiful shrine that was built over the Samadhi of Shri Sai Baba.

SAI BABA

Long time ago, at the beginning of eighteenth century a young bearded man with sparkling eyes took shelter in a mosque, in Shirdi Village (of Maharshtra State, In India) . Nobody knew from where this stranger had come who hardly spoke a word and stayed there.

Gradually the curious villagers started offering food to the man, but he never asked anything from them. Sometimes he shared his food with the animals. Soon the young fakir, as he was started to be addressed, started expressing his view points with few elderly villagers. His simple language of expresssion and his special power of solving the problems of poor needy and destitutes soon made this less known fakir, known as Shri Sai Baba. As the days passed, devotees started streaming into Shirdi in ever growing numbers. The village was fast becoming a centre of pilgrimage. As gifts and presentations flowed in, the pomp and ceremony of Sai worship were evolving. Everyday Sai Baba would be a pauper having distributed all among the needy and the poor. But Sai Baba's life of a Fakir remained calm, undisturbed, unaltered and therein is the saint's Spiritual glory.

People also realised that this "Baba" was no ordinary person but a person with extraordinary godly powers. Such powers are not known or present in normal human beings. Baba preached his principle of love and faith in humanity to all his disciples. He always felt anguished over the fact that all those who came to him were more for their own personal problems and not for attaining the ultimate goal of reaching God which he felt could be attained only by true servicing of humanity.

Sai baba strongly believed in uniformity of religion and he never distinguished anyone on the basis of caste, creed or religion. He always made it a point not to return empty handed those who had come to him in their hour of need and grief. He performed miracles to alleviate the suffering of poor people. On one occasion he restored the eyes of a blind elderly and in another occasion he lighted a lantern with water when there was no oil to burn it.

As all good things have to end ultimately "Baba" also left his body on his own will on 15th Oct. 1918, leaving his millions of believers and followers crying.

His body was laid in the Samadhi Mandir called "Booty", which he had asked his disciple to built before his death.
 
Copyright 2009 Gururaj Kasibhatla
BloggerTheme by BloggerThemes | Design by 9thsphere