Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Installing J2EE under Ubuntu x64

I can't install Oracle JDK J2EE like i show in the pix below

installing failure

this is my java (Oracle J2SE JDK) configuration


when I typed which java, terminal showed this

which java

How should I do? I'm very pleased for your help. sorry for my english

share|improve this question

marked as duplicate by Tom Brossman, con-f-use, Stephen Myall, Ringtail, Jorge Castro Oct 24 '12 at 16:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

It can be seen that you have JDK installed, but are you sure that JDK's bin directory is included in $PATH? Do a quick check with jar or javac.

As java is also present in JRE's directory(/usr/lib/jvm/jdk1.7.0_04/jre/bin/) it'll show up but it cannot package new jar files. You'll be needing jar utility for that task, as in here. jar only comes in JDK's directory, so you need to include JDK's directory i.e. /usr/lib/jvm/jdk1.7.0_04/bin/ to $PATH. To do that add the following line to /etc/profile or ~/.profile:

export PATH=$PATH:/usr/lib/jvm/jdk1.7.0_04/bin

then logout and retry.

share|improve this answer
thank you. but, how do I check them? how to add some lines to /etc/profile? –  obysr Jun 25 '12 at 1:14
@obysr Just type those commands(jar or javac) in a terminal window. If they are present in $PATH they will show their usage. alternatively you can type echo $PATH to see it's current state. the directories under $PATH will be separated with :. To add text to /etc/profile use sudo gedit /etc/profile and for ~/.profile use gedit ~/.profile –  Samik Jun 25 '12 at 9:14

I've found the solving. The problem locates in my machine. My Ubuntu is 64-bit machine and so is my JRE. J2EE SDK can't run on JRE 64-bit. the solving just install both of them, 32-bit and 64-bit version of JREs.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.