0

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

1 Answer 1

2

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.

3
  • 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, 2014 at 16:47
  • if there is a different program that can program java and it works easily tell me plz :)
    – user66237
    Apr 26, 2014 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, 2014 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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