Didn't I already answer this question for you? In your
duplicate post?
It's really easy to get Sun Java (or, more or less equivalently, OpenJDK) working in Ubuntu.
Please try what I suggested, and please post back any follow-on questions you might have. Please cut/paste the exact output of any errors you encounter.