Tuesday, January 22, 2013

Can't change default jre even though path has been modified

Problem:

The Path in environment variable is using JDK1.6 but java -version shows actually JRE 1.7 is being used.

Solution:

I am on a Windows 7 machine. I am using this way but I don't like it.

Go to C:\Windows\System32, change the java.exe and javaw.exe to whatever you like.
Then the system will pick up the setting in Path.

Wednesday, January 9, 2013

error: can't create transaction lock on /var/lib/rpm/__db.000

error: can't create transaction lock on /var/lib/rpm/__db.000

Solution:

Install it as root user.

Wednesday, November 21, 2012

grep: unknown devices method


# grep -r "-DACE_NDEBUG" .
grep: unknown devices method


solution:
remove -
use #grep -r "DACE_NDEBUG" .


Monday, November 12, 2012

Friday, November 9, 2012

Let's do some shell programming!

1. Check what shell version you have:
$ cat /etc/shells

2. Show which shell you are using currently:
echo $SHELL

3. This is a good website for learning shell:
http://arachnoid.com/linux/shell_programming.html

Monday, November 5, 2012

Failed to install java 1.3 in a x86-64 suse 11

Failed to install java 1.3 in a x86-64 suse 11.

Get the error message like: Error: can't find libjava.so.

It seems that java 1.3 has not x86 64 version.

export not working in Unix

Problem:

Create a script,  aaa.script

export bbb=/opt/ccc

Then, run it by typing ./aaa.script.

After that, # echo bbb and get nothing.

Solution:

run it by typing . aaa.script