class finder in JAR WAR EAR JarScan.jar

It is very much important and most common for many java Developer to search for the required class file in the numurous jars/ ears / wars in the big project code base. So it is very much useful to have a handy tool like JarScan in work place. It is very simple and light weight tool which will help in searching the required class files in the big project code.
JarScan.jar file can be downloaded from below link.
http://www.softpedia.com/get/System/File-Management/JarScan.shtml

JarScan helps when you are having problems finding a class that you need in order to compile your project. It will locate the class files in no time at all.
Requirements:
· Java 1.4 or above
Download
 Usage : 
1. To search class xyz
java -jar e:\jarscan.jar -class xyz

2.To display the help message type: 
java -jar jarscan.jar -help OR java -jar jarscan.jar


Hope this this helps my java mate ! :)

Read more


Shell script to pass arguments and validation of arguments in side shell

The below is a simple shell script snippet which accepts two kinds of parameters(1. start 2. -start) while running.
How to validate these parameters and how to run the shell script accordingly is the main motto :)
set -x
if [[ "$1" == "start" || "$1" == "-start" ]]; then
echo "code for start action"
else
echo "Please input valid arguments"
echo "Usuage: setup.sh start or setup.sh -start "
exit
fi

Hope this helps in passing parameters to installer like scripts. 
I observed the behavior of the same script differ in different shells like k shell and bash shell.
 

 
 

Read more


MANAGEMENT FUNCTIONS AND BEHAVIOUR (MS 1) IMP Questions and Answers

I have compiled few improtant questions and their answers while preparing for MANAGEMENT FUNCTIONS AND BEHAVIOUR - MS 1 (MBA-IGNOU) exam. Please find the below PDF. Hope this helps :)
MS 1 Imp Questions IGNOU MANAGEMENT FUNCTIONS AND BEHAVIOUR
Old Papers :[1] [2]

Read more


How to broadcast your live video for streaming on internet ?

How to broadcast your live streaming video on the internet ?
This was most haunted question many computer geeks !This has made very simple with http://www.livestream.com/ .

All you need to have is a good internet connection, Video source (Handy cam / Digi cam / Webcam / Mobile cam with supported Software) and Laptop / computer .
http://www.ustream.tv/ is another best application which helps live streaming your events on net through phone.
If you have an android phone you are ready to livecast your events. Log in to http://www.ustream.tv/ and create ur account and share the tube link for ur friends then install the ustream app on your android phone form market Ustream-app download for android . Now once ur 3G/Wifi connection is started on your phone you can start your own show.


Live video by Ustream
Once Internet is connected on your laptop login at http://www.livestream.com/ and start your own channel and start Go live and select your video source ! Thats it ! you all set to go LIVE ! :)


kuube on livestream.com. Broadcast Live Free
The above is my personal channel KUUBE, which K-tube for all my personal live casts !
Today First time I tried the http://www.livestream.com/ site to broadcast my live videos.
It is awesome and amazing. Best suits for multiple live broadcasring purposes like interacting with friends
and live broadcasting your events like parties etc. I got this idea when most of our friends missed to attend one of my friends marriage event.
Now there is no worry at all. You be any where just connect to http://www.livestream.com/ and broadcast your seld to be close with your loved ones.

Below is my channel "Kuube" it is K-tube for all my live broadcasts

Thanks you all for your great support and happy watching ... 

Read more


Sreesailam,Ishta kameswari,Alampur Jogulamba,Paataala Ganga, Akkamahadevi Caves

Trip to Sreesailam, Nallamalai Ishta kameswari and Alampur Jogulamba
This time I'm not the planner , I just joined with two of my friends who are very interested to visit this place again.
Up on my interested request they extended the bookings for me also. Plan was simple start on Friday evening to Sreesailam by APSRTC bus and reach Sreesailam

cover the places Sakshi Ganapati, Hatakeswaram , Lalitha peetam, phaala daara - pancha daara , sikaram and Chenchu Lakshmi Museum and visit to main temple of Sri Brahmarambika Mallikarjuna Swamy.
And next to cover Rope way journey to paataala ganga, Trip to Damn and return journey to Karnool by bus and visit Alampur Jogulamba on the way before 10:30 to catch Bangalore express train in Karnool.

It was well executed with out any interrupts. We reached majestic by 6 thinking that bus will leave sharply at 6:30 PM sharply. But it started at 7 PM and with many stops it reached sreesailam at 9:30 AM. Immediately with the help of a broker we got into one Lodge which was called as Telikala satram. Though we paid unnecessarily to broker we got really brand new AC room and it was a pleasure stay in between the nallamalai hills enjoying the damn view from the hotel room. Good thing is that they provided food for free.

After quick fresh-up we started for local sight seeing to cover Sakshi Ganapati, Hatakeswaram , Lalitha peetam, phaala daara - pancha daara and sikaram by auto paying 50 INR per head. All the places are filled by Siva swamys and they were coming from different places by walk to here. As the road was single lane it was critical for drivers to drive in between. As that was shiva raatri season Temple committee started "Brahmotsavaalu" and full place was crowded with many groups performing different arts in front of Lord shiva. By 1 PM we finished visiting these places and lunch, next plan is to reach  NallaMala Ishta kameswari temple by commander jeeps. We were just three people and we have to wait for the jeep to fill minimum 10 people. They were charing around 250 per head and finally around at 2:45 pm we were able to start to that place and the whole road is full of rocks and the road was a difficult for any body to drive, I can say it's a good adventurous journey. I thoroughly enjoyed the ride and the scenic place near the temple.

The ishta kameswari Deity was so beautiful and the temple was very very small. Any body has to bow-down their head and enter in the temple. Finally we were able to return to lodge by 6:45 pm.
And after fresh-up we visited the main temple and then returned to room and took rest.

The next day early morning we got fresh-up and went to main temple for darshan of Sreesaila Jyotirling and visited "Vrudda mallana" and other small temples inside the premises.Then after breakfast we went to patalaganga by rope-way and visited damn by boat. From there AP tourism is providing packaged tours to Akkamahadevi caves which are quite famous in this place but due to lack of time we couldn't go there.

Finally we returned home and packed-up luggage to catch the Karnool bus. Luckily with uma maheswara swamy blessings we three got seats in the bus. We reached karnool town around at 5 PM , immediately from bus stop we hired one auto to go to Jogulamba temple in alampur for 400 INR. We reached the temple premises very quickly in less than 40 mins due to the village routes chosen by driver.

Jogulamba temple in alampur is one of the powerful temple among the ashtadasa shakti peetas. There were no bounds to my joy when I see the Tungabadra river in the the evening just beside the temple. It's really worthy trip at the end.

Read more


Grep multiline pattern between two words. find particular block from set of files.

Grep Multi-line pattern between two words. find particular block from set of files.
The below shell script searches the list of java files in the current directory and try to look for the catch blocks that doesn't contain any logger initiated messages.
Ex file :
public class Download extends HttpServlet {

static final String sccsId = "%Z%%M% %I% %W% %G% %U%";

private static final PDLogger msgLogger = Logger.getCDSLoggerByName(Logger.PORTAL_LOGGER);
private static final String className = Download.class.getName();

static PublicKey anonymousPublicKey;
// standard anonymous public Key
static {
try {
KeyPairGenerator keyGen = null;
keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(1024);
KeyPair keyPair = keyGen.generateKeyPair();
anonymousPublicKey = keyPair.getPublic();
} catch (Exception ex) {
msgLogger.exception(Level.DEBUG_MIN, className, "{static}", ex);
}

}
}

In the above file there is logger initiated message so, the script won't report any thing. But in case it won't find any keyword "logger" in catch block it reports the information.

Shell Script to recognize multi-line pattern :
#!/bin/sh
echo "Starting Recursive catch block search on the Dir : `pwd`"
fileCount=1
for i in `find . -name '*.java'`
do
echo "Working with file no:$fileCount and the file is:$i"
let fileCount="fileCount+1"
ttl=`cat $i | wc -l`
n=1
TTL=`cat $i | grep -c catch`
while read line
do

found=`echo $line | grep -i "catch" | sed 's/ //g' | cut -d "(" -f1`
if [ $found ]; then
while [ $n -le $TTL ]
do
begLineno=`grep -n catch $i | sed -n "$n"p | cut -d ":" -f1`
EndLineno=`sed = $i | sed 'N;s/\n/:/' | sed -n $begLineno,${ttl}p | grep -v "catch" | grep "}" | sed -n 1p | cut -d ":" -f1`
Logfound=`sed -n $begLineno,${EndLineno}p $i | grep -i Logger | sed 's/ //g' | cut -d "(" -f1 | sed -n 1p`
if [ $Logfound ]; then
echo "Logger message found In the $begLineno,$EndLineno Range Catch block" >> FoundLog.log
else
echo "No Logger messages(s)found In the $begLineno,$EndLineno Range Catch block in file $i" >> NotFound.log
fi
n=`expr $n + 1`
done
fi
done<$i
done

Hope this helps !

Read more

Popular Posts

Enter your email address:

Buffs ...

Tags


Powered by WidgetsForFree