Ubuntu 12.10, 32bit
Problem too damn simple: I have a NTFS partition and unpacked from .tar.gz jdk on it. All I need from bash, is to see javac compiler, that is located in directory /media/mallniya/data/jdk1.7.0_25/bin. As it advised, I add the path to the javac in $PATH like this:

export PATH=$PATH:/media/mallniya/data/jdk1.7.0_25/bin

output of $echo $PATH:
And then I try to found or execute javac AND HAVE NOTHING:
output of which javac gives just nothing;
output of ls -l in the /media/$USERNAME/home/mallniya/jdk1.7.0_25/bin (without other files):

-rwxrwxrwx 1 root root 5897 Jun  6 06:13 javac

output of javac Example.java (Example.java do exist, permission is ok):

bash: /media/mallniya/data/jdk1.7.0_25/bin/javac: Permission denied

output of sudo javac Example.java:

sudo: javac: command not found

If the same directory jdk1.7.0_25/bin located on the other partition (ext4, for example), the problem is disappear.

I've found no restrictions about adding path in environment variable $PATH, but, obviously, for whatever reason it doesn't work with paths of NTFS partition.

Question: is it possible to add NTFS paths in the $PATH? I understand, that I can use the other path to add in the $PATH, but for now I want jdk to stay where it is. Thank you.

Output of cat /proc/mounts:

rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=1003380k,nr_inodes=216328,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=202320k,mode=755 0 0
/dev/disk/by-uuid/027924f8-ab47-4304-ab4d-f0586a6734bb / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
none /sys/fs/cgroup tmpfs rw,relatime,size=4k,mode=755 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
none /run/user tmpfs rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755 0 0<br>
/dev/sda7 /home ext4 rw,relatime,data=ordered 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
gvfsd-fuse /run/user/mallniya/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0<br>
/dev/sr0 /media/mallniya/GRMCULF(X)REO_EN-RU_DVD udf ro,nosuid,nodev,relatime,uid=1000,gid=1000,umask=77,iocharset=utf8 0 0<br>
/dev/sda3 /media/mallniya/data fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
  • 1
    Welcome to Ask Ubuntu! Please provide the output of cat /proc/mounts. This will list the mounts and mount options. I suspect noexec is added as an option to your drive at /media, which will not allow to run applications from that medium. I can provide an answer if that's the case. Provide the information by editing your question. – gertvdijk Jun 23 '13 at 12:02
  • 1
    Do you really need to install the JDK from upstream tar file? The Oracle Java JDK is available in a PPA: launchpad.net/~webupd8team/+archive/java – gertvdijk Jun 23 '13 at 12:05
  • On a side note, use type rather than which to see what/where the command is. type javac, or type -a javac to also see other javac commands available. – geirha Jun 23 '13 at 13:53
  • @gertvdijk, thank you for rapid response and I'm so sorry about my slow reaction :( The output of cat /proc/mounts now in the question. And yeah - it's better to use PPA. @geriha: your method actually works and javac dispays in the output of type javac. – mallniya Jul 1 '13 at 1:15
  • And a little surprise for me: it's eventually worked, when I had changed /etc/fstab like this:<br> UUID=7A0063220062E49B /media/mallniya/data ntfs 0 0 remount and try which again. All is ok. And the other important thing: to the output of cat /proc/mounts in the line /dev/sda3 /media/mallniya/data was added only string default_permissions. I'm pretty sure, that's the problem was with mount options. – mallniya Jul 1 '13 at 1:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.