Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have problems with jgrasp. I get the following error message when I run it.

----jGRASP exec: javac -g R.java ----jGRASP wedge: could not execute javac ---- error number 2. ---- ---- Target does not exist or is not on PATH. ---- ---- ---- PATH is ":/usr/lib/jvm/java-6-openjdk-amd64/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games".

----jGRASP: operation complete.

what should i do please help

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It's trying to call javac, the java compiler. This isn't installed as part of the java runtime environment (JRE).

On ubuntu I believe the package with the compiler has a jdk suffix, try:

sudo apt-get install openjdk-6-jdk

You may want to change that '6' to a '7' to upgrade your java installation.

share|improve this answer
    
i tried to write your command but see :raghad@raghad-Latitude-E5430-non-vPro:~$ apt-get install openjdk-6-jdk E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? –  user66237 Apr 26 at 16:47
    
if there is a different program that can program java and it works easily tell me plz :) –  user66237 Apr 26 at 16:51
    
Sorry, you need to run that with privileges, so sudo ... -- I've edited this in. If you can't do that because this isn't your computer, ask a question, "How can I install a java compiler to my home directory?" and I'll answer that. –  goldilocks Apr 26 at 17:03
    
thank you it works !! finally :D –  user66237 Apr 26 at 17:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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