Posted by: Chyne on: November 13, 2009
JAD Java Decompiler is a tool that use for decompiling a .class file into a java source file. I had tried this tool one year ago on Windows environment (Decompile a Java Class File) and I feel is very useful whenever I have the class files but I need to analyze the codes from the java source files.
Recently, I did a personal research on how to make it work on Ubuntu and I just figured out that there is such plugin available in IntelliJ IDEA as well. The JAD plugin doesn’t work for me from the Available Plugins in Intellij which I can download via File > Settings. I’m not sure what’s the reason and probably I missed out some settings. Whenever I open a .class file, it will ask for the path of the jad executable file. I assumed it should be worked after I installed the plugin but it requires me to point to the executable file from the jad plugin that I downloaded from another page (http://sourceforge.net/projects/ideajad/).
If the jad executable file cannot be found, there will be a dialog box asking for the path. Another method to set the path is via File > Settings > IntelliJad Project.
When I had set the path for the jad executable file and tried to open a .class file, I got the following error:-
Executing Jad: '/opt/idea/8.1/lib/ideajad/bin/linux/jad -s java -radix10 -lradix10 -l64 -pv3 -pc _cls -pf _fld -pl _lcl -pm _mth -pp _prm -pe _ex -p /tmp/ij1258071358360/BarChart.class'
...
Result is empty. Re-executing Jad: '/opt/idea/8.1/lib/ideajad/bin/linux/jad -s java -radix10 -lradix10 -l64 -pv3 -pc _cls -pf _fld -pl _lcl -pm _mth -pp _prm -pe _ex -p /tmp/ij1258071358360/BarChart.class'
...
...
...
...
/opt/idea/8.1/lib/ideajad/bin/linux/jad: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
Note: I tried with the command: sudo apt-get install libstdc++2.10-glibc2.2 but it doesn’t work for me.
Solution
1. Download the package from http://packages.ubuntu.com/dapper/i386/libstdc++2.10-glibc2.2/download
2. sudo dpkg -i libstdc++2.10-glibc2.2_2.95.4-24_i386.deb3. If you don’t have the following items in the package, please install:-
- sudo apt-get install libexpat1
- sudo apt-get install libtiff4
4. sudo ln -s /usr/lib/libexpat.so.1 /usr/lib/libexpat.so.0
5. sudo ln -s /usr/lib/libtiff.so.4 /usr/lib/libtiff.so.3
Posted by: Chyne on: November 3, 2009
Everytime when I access to mysql database that is installed in my laptop, I need to perform the following command in order to get the access:
sudo mysql -hlocalhost -ppassword
I feel frustrated and tedious to do that everytime when I need to access to the database. If I try it with the command ‘mysql’, I will get the following error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Finally, I got the trick and found the solution from the following blog:
Solutions
# sudo gedit /etc/mysql/my.cnf
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
user=root
password=password
[mysqladmin]
user=root
password=password
Note: If you wish to know which user that you are going to add on, you can follow the following steps:-
1) Access to the mysql database (#sudo mysql -hlocalhost -ppassword)
2) Run the command: use mysql
3) Perform the sql query: select * from user;
You can check the user/username that you want to add based from the ‘user’ table.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 125
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
Note: It’s not recommended if you are considering about security issue.
Posted by: Chyne on: November 2, 2009
Some commands that you need to know during installing Java on Linux environment:
1) Get the installation package from this command:
sudo apt-get install sun-java-6-jdk
2) Check java version
java -version
3) Check location of installed jdk
sudo update-java-alternatives -l
4)Set default java
sudo update -java-alternatives -s java-6-sun
5) Set JAVA_HOME based on location
export JAVA_HOME=/usr/lib/jvm/java-6-sun
6) Set all the environment path in /etc/environment
JAVA_HOME=/usr/lib/jvm/java
7) Set in the /etc/bash.bashrc
JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
8 ) Check the environment path
env|grep PATH
If possible, requires restart the pc.
Posted by: Chyne on: November 2, 2009
After performing an update in Firefox, whatever searches that I tried in google will shows popup with the following error message:
ASSERT: *** Search: _installLocation: engine has no file!
Stack Trace:
0:ENSURE_WARN(false,_installLocation: engine has no file!,2147500037)
1:()
2:()
3:()
4:epsGetAttr([object Object],alias)
5:()
6:SRCH_SVC_getEngineByAlias(http://www.google.com.au/search?q=how+to+include+user+as+a+root+in+Ubuntu%3F&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a)
7:getEngineByAlias(http://www.google.com.au/search?q=how+to+include+user+as+a+root+in+Ubuntu%3F&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a)
8:getShortcutOrURI(http://www.google.com.au/search?q=how+to+include+user+as+a+root+in+Ubuntu%3F&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a,[object Object])
9:canonizeUrl(null,[object Object])
10:handleURLBarCommand(null)
11:anonymous(textentered,null)
12:fireEvent(textentered,null)
13:onTextEntered()
14:handleEnter(true)
15:onPopupClick([object MouseEvent])
16:onxblmouseup([object MouseEvent])
Affect
Whatever URL links and pages will not be able to opened up and will be prompted with a pop-up that consists of the errors.
Root Cause of the Problem
This issue occurs when you already perform an update or upgrade in Firefox and you didn’t restart the browser.
Solution
In order to resolve this problem, you need to restart the Firefox browser to get rid of the error.
Further Research
Posted by: Chyne on: October 6, 2009
I just remembered that I had read an interesting site few months ago that uses Javascript to guess the user’s gender based on the browser URL history.
Although the idea sounds interesting but the thing that more attracts my interest is how to make it happens. The author has done a research for the most visited sites based from the poll and each site will be given a ratio of male and female users.
This is the result from the analysis for my browsing history (nothing to hide
)
Likelihood of you being FEMALE is 72%
Likelihood of you being MALE is 28%Site Male-Female Ratio
yahoo.com 0.9
youtube.com 1
wordpress.com 0.98
download.com 1.27
hotmail.com 0.83
popcap.com 0.41
I’m wondering is there any Javascript to detect someone’s personality or even age based on browsing history and I really interested about the calculations for the estimation. So, have fun with this site and check how accurate is your “gender”