ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i installed java runtime environment and java media framework in order to run video annotation software. The annotation software download requires unpack of .zip file using JAR. When i try using JAR command it said:
bash: jar: command not found
I tried also installing jdk package but i still get the same response. I tried find jar and got:
find: jar: No such file or directory
I am puzzled but a total newbie so it could be anything.
Any help would be greatly appreciated
Ps. i rebooted after installation and use mandrake 10.1
this is really stupid, but does that mean navigate to /etc/profile and execute the command? i tried to navigate to /etc/profile but it is not a directory - there is a profile.d.
i also tried ~/.bashrc but got
bash: /root/.bashrc: Permission denied
(i logged on as root with password but got the same)
You installed java sdk, but previously you installed java runtime. Why???? Java sdk has already java runtime. Try to log as normal user then run jar command.
Originally posted by s0450776 this is really stupid, but does that mean navigate to /etc/profile and execute the command? i tried to navigate to /etc/profile but it is not a directory - there is a profile.d.
i also tried ~/.bashrc but got
bash: /root/.bashrc: Permission denied
(i logged on as root with password but got the same)
thanks
~/.bashrc is a file that gets sourced when you start up a bash shell. So if you edit it, you should be able to find a line in it somewhere that is adding to the PATH. If not, you can just add a line like:
Code:
PATH=$PATH:/usr/local/bin/
Or wherever jar is located on your system. On my system, it is /usr/bin/jar, but I guess yours was installed somewhere else.
thanks for the help first i tried entering root and editing .bashrc with winscp and adding the line
export PATH = $PATH:/opt/jdk-6u26/bin
and then saving the file but it didn't work but then i just typed in command prompt
export PATH = $PATH:/opt/jdk-6u26/bin and got the error
-bash: export: `=': not a valid identifier
so i removed the spaces and it worked (export PATH=$PATH:/opt/jdk-6u26/bin)
although i am bewildered as i followed all the instructions when installing the java development rootkit and one of the final instructions was to export some paths.
Hello
I'm trying to build android system following this tutorial http://code.google.com/p/seek-for-an...ngTheSystemand I installed the jdk6 from the sun web site
I'm on ubuntu 11.10
When I run make update-api I have this error : host Java: jsr305lib (out/host/common/obj/JAVA_LIBRARIES/jsr305lib_intermediates/classes)
/bin/bash: jar : commande introuvable
make: *** [out/host/common/obj/JAVA_LIBRARIES/jsr305lib_intermediates/javalib.jar] Erreur 127.
I don't find any solution on internet.
Please can someone help me.
You may have no JDK installed, or your jdk/bin directory is not on the PATH
For example in my system:
Code:
/opt/jdk1.6.0_21/ -- here is JDK installed
/opt/jdk -> symlink to jdk1.6.0_21
/etc/profile contains these lines:
export JAVA_HOME=/opt/jdk
export "PATH=$PATH:$JAVA_HOME/bin"
So you should check if JDK is installed, where is it installed, and how could you add its 'bin' directory to the PATH.
You can change "/usr/lib/jvm/jdk1.6.0" to your jdk install directory.
finally run jar to see if it is working, then continue build
ketosis@android-builder:~$ jar
Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...
Options:
-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-u update existing archive
-v generate verbose output on standard output
-f specify archive file name
-m include manifest information from specified manifest file
-e specify application entry point for stand-alone application
bundled into an executable jar file
-0 store only; use no ZIP compression
-M do not create a manifest file for the entries
-i generate index information for the specified jar files
-C change to the specified directory and include the following file
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.