Tuesday, July 27, 2010

Bash: simple wrapper script for java jar files

There could be thousands of other (probably better) ways of writing a wrapper bash script for executing jar files on command line (instead of having to do "java -jar tool.jar"). For whatever it is worth, here's what I came up in quick 2 minutes. One can optimize according to his/her needs inside the for loop:
    1 #!/bin/bash
2
3 path='/home/USERNAME/android-sdk-linux_86/tools'
4
5 args=''
6 for ((i=$#;i>0;i--))
7 do
8 args="${args} ${1}"
9 shift
10 done
11
12 java -jar $path/tool.jar "$args"
13
14

Friday, July 23, 2010

Windows 7: Windows Media Player 12 "Server Execution Failed" problem

I found the solution here: http://social.answers.microsoft.com/Forums/en-US/w7music/thread/ecc08c3b-d445-48c2-b07d-9df48500434f

The solution that worked for me:
  1. Unpin media player from taskbar.
  2. Pin it back.
lol, yes, that literally solved the problem for me.

Thursday, July 22, 2010

Android: Sliding/Rotating keyboard back 'n forth in android emulator

It may be obvious to many, but just as a record - to rotate the keyboard in android emulator, the keyboard short-cut is:
Ctrl + F11