Eager to Code, Enjoy to Debug ~ Embark into Each Stage with Your Heart

Archive for the ‘Java’ Category

Installing Java on Ubuntu

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 [...]

History of JavaScript or How JScript was born?

Posted by: Chyne on: September 2, 2009

I knew history is quite a boring subject for certain people but few days ago, I just read an interesting history related to JavaScript else I won’t remember the story after several days. Anyway, I try to make it as interesting as possible because I always feel that telling a story is not a difficult [...]

How JVM Crash Looks Like?

Posted by: Chyne on: July 20, 2009

How do you know the reported problem it’s a JVM crash and not related to the application itself?
Here are the steps (ranking from lowest to the highest probability) for you to track down and troubleshoot the problem:

1. Application Behaviour
The service terminated unexpectedly or the application suddenly shutdown.
2. JVM version
The installed JVM is in the version [...]

Tags:

java.io.FileNotFoundException with (Permission Denied)

Posted by: Chyne on: July 13, 2009

Error exporting data: java.io.FileNotFoundException: /usr/local/temp/backup.zip (Permission denied)
Root Cause
If the log shows the exception ‘FileNotFoundException’ with the ‘Permission Denied’, the main root cause of this error is the file does not being granted for write permission. It means when the user tries to execute an action to write the data into the file and the file [...]

‘Interface was expected’ for JPEGImageEncoder

Posted by: Chyne on: July 12, 2009

java.lang.IncompatibleClassChangeError: Found class com.sun.image.codec.jpeg.JPEGImageEncoder, but interface was expected
Root Cause
If you found this error appears in the log file, the biggest possibility and maybe the only reason that this exception being thrown is you are using the OpenJDK instead of Sun JDK. Well, the exception message is obvious to tell you that the com.sun.image.codec.jpeg.JPEGImageEncoder is a [...]


Friday’s Java Snack


In Java, "thread" means:

  • An instance of class java.lang.Thread
  • A thread of execution


An instance of Thread is just an object that has variables and methods, and lives and dies on the heap.
 
A thread of execution is an individual process that has its own call stack (one thread per call stack).

 

November 2009
M T W T F S S
« Oct    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Archives


  • Polprav: Hello from Russia! Can I quote a post in your blog with the link to you?
  • Alex: Huge Thanks! This bug has annoyed me for a long time.
  • Donnieboy: Just wanted to drop you a line to say, I enjoy reading your site. I thought about starting a blog myself but don't have the time. Oh well maybe one

StatCounter

free hit counters