java: not found
java: not found
I am having a very strange issue with filebot on my synology NAS. I have a python script which I can run without issue if I kick it off via SSH logging in as root (it uses the subprocess module to call filebot), however for the scheduled job (also running as root with crontab) I receive the error message:
'/usr/local/bin/filebot: line 37 java not found'
I have tried inserting the absolute path of my java installation in line 37 and that does not work either. Any suggestions would be greatly appreciated.
'/usr/local/bin/filebot: line 37 java not found'
I have tried inserting the absolute path of my java installation in line 37 and that does not work either. Any suggestions would be greatly appreciated.
Re: Filebot not identifying java
As always once I posted about an issue I solved it... a symlink to java in the filebot directory seems to have solved the problem. Hope this helps someone
Re: Filebot not identifying java
Please read the Notes section:
viewtopic.php?f=3&t=1802
It's for Synology NAS but "installing" java correctly is probably pretty much the same for any embedded Linux.
viewtopic.php?f=3&t=1802
It's for Synology NAS but "installing" java correctly is probably pretty much the same for any embedded Linux.
Re: Filebot not identifying java
would you please post how did you create the symlink?adplax18 wrote:As always once I posted about an issue I solved it... a symlink to java in the filebot directory seems to have solved the problem. Hope this helps someone
Re: Filebot not identifying java
Code: Select all
ln -s /path/to/jre/bin/java /usr/local/bin/java
Re: Filebot not identifying java
thanks for your reply, but that's exactly what i did.rednoah wrote:Code: Select all
ln -s /path/to/jre/bin/java /usr/local/bin/java
DiskStation> ln -s /path/to/jre/bin/java /usr/local/bin/java
ln: /usr/local/bin/java: File exists
DiskStation>
and still it says java not found
-----------------------------------
don't know what i did, but it comes back with another problem
Failed to initialize cache: java.nio.file.AccessDeniedException: /volume1/@appstore/filebot/data/cache/0/.lock
Re: Filebot not identifying java
1)
/path/to/jre/bin/java is NOT to be taken verbatim. It is the path to the java executable after downloading and unpacking the JDK.
For EXAMPLE:
2)
Uninstall FileBot. Install the latest beta version of FileBot. Always run filebot as admin, never as root.
/path/to/jre/bin/java is NOT to be taken verbatim. It is the path to the java executable after downloading and unpacking the JDK.
For EXAMPLE:
Code: Select all
/volume1/app/jdk1.8.0_33/bin/java
Uninstall FileBot. Install the latest beta version of FileBot. Always run filebot as admin, never as root.
Re: Filebot not identifying java
hey guys,
i am struggling with the same problem.heres what i did so far:
(DS 415+ latest DSM)
• installing java 8
first try: /usr/bin/filebot: line 53: java: not found
tried to link the folders. here are the results who all didn't work out:
info about the location of java (i think, this shell and linux things are not my comfort zone)
which led to:

i am struggling with the same problem.heres what i did so far:
(DS 415+ latest DSM)
• installing java 8
• installing filebotDiskStation> java -version
java version "1.8.0_51"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_51-b07, headless)
Java HotSpot(TM) Embedded Server VM (build 25.51-b07, mixed mode)
• installing filebot nodeDiskStation> filebot -version
FileBot 4.6.1 (r3166) / Java(TM) SE Embedded Runtime Environment 1.8.0_51 (headless)
first try: /usr/bin/filebot: line 53: java: not found
tried to link the folders. here are the results who all didn't work out:
info about the location of java (i think, this shell and linux things are not my comfort zone)
so i tried the follwing:DiskStation> cd /volume1/@appstore/java8/
DiskStation> dir
drwxr-xr-x 5 root root 4096 Aug 13 08:35 .
drwxrwxrwx 27 root root 4096 Aug 13 08:57 ..
drwxr-xr-x 6 root root 4096 Aug 13 08:35 ejdk1.8.0_51
-rw-r--r-- 1 root root 511 Aug 13 08:35 output.log
drwxr-xr-x 2 root root 4096 Jul 17 2014 tools
drwxr-xr-x 21 root root 4096 Nov 11 2014 zoneinfo
DiskStation> cd ejdk1.8.0_51
DiskStation> dir
drwxr-xr-x 6 root root 4096 Aug 13 08:35 .
drwxr-xr-x 5 root root 4096 Aug 13 08:35 ..
drwxr-xr-x 2 root root 4096 Jun 25 19:49 bin
drwxr-xr-x 2 root root 4096 Jun 25 19:49 doc
drwxr-xr-x 2 root root 4096 Jun 25 19:49 lib
drwxr-xr-x 7 root root 4096 Jun 25 19:49 linux_i586
DiskStation> cd linux_i586
DiskStation> dir
drwxr-xr-x 7 root root 4096 Jun 25 19:49 .
drwxr-xr-x 6 root root 4096 Aug 13 08:35 ..
drwxr-xr-x 4 root root 4096 Jun 25 19:49 compact1
drwxr-xr-x 4 root root 4096 Jun 25 19:49 compact2
drwxr-xr-x 4 root root 4096 Jun 25 19:49 compact3
drwxr-xr-x 9 root root 4096 Jun 25 19:49 extensions
drwxr-xr-x 4 root root 4096 Jun 25 19:49 jre
DiskStation> cd jre
DiskStation> dir
drwxr-xr-x 4 root root 4096 Jun 25 19:49 .
drwxr-xr-x 7 root root 4096 Jun 25 19:49 ..
-r--r--r-- 1 root root 3244 Jun 25 19:48 COPYRIGHT
-r--r--r-- 1 root root 46 Jun 25 19:48 README
-r--r--r-- 1 root root 178403 Jun 25 19:48 THIRDPARTYLICENSEREADME.txt
drwxr-xr-x 2 root root 4096 Jun 25 19:48 bin
drwxr-xr-x 12 root root 4096 Jun 25 20:42 lib
-rw-r--r-- 1 root root 524 Jun 25 19:48 release
DiskStation> cd bin
DiskStation> dir
drwxr-xr-x 2 root root 4096 Jun 25 19:48 .
drwxr-xr-x 4 root root 4096 Jun 25 19:49 ..
-rwxr-xr-x 1 root root 4100 Jun 25 19:48 java
-rwxr-xr-x 1 root root 4172 Jun 25 19:48 jjs
-rwxr-xr-x 1 root root 4184 Jun 25 19:48 keytool
-rwxr-xr-x 1 root root 4320 Jun 25 19:48 orbd
-rwxr-xr-x 1 root root 4188 Jun 25 19:48 pack200
-rwxr-xr-x 1 root root 4288 Jun 25 19:48 policytool
-rwxr-xr-x 1 root root 4172 Jun 25 19:48 rmid
-rwxr-xr-x 1 root root 4184 Jun 25 19:48 rmiregistry
-rwxr-xr-x 1 root root 4200 Jun 25 19:48 servertool
-rwxr-xr-x 1 root root 4352 Jun 25 19:48 tnameserv
-rwxr-xr-x 1 root root 202672 Jun 25 19:48 unpack200
Code: Select all
ln -s /volume1/@appstore/java8/ejdk1.8.0_51/bin/java /volume1/@appstore/filebot/
and some other things / links.... this is driving me nuts. spent some hours on this. so this is my challenge for the rest of the week. please, save my weekendDiskStation> cd /volume1/@appstore/filebot
DiskStation> dir
drwxr-xr-x 3 root root 4096 Aug 13 21:20 .
drwxrwxrwx 27 root root 4096 Aug 13 08:57 ..
-rw-r--r-- 1 root root 30956070 Aug 7 12:45 FileBot.jar
drwxrwxrwx 2 admin users 4096 Aug 12 23:58 data
-rwxr-xr-x 1 root root 1970 Aug 7 12:40 filebot.sh
lrwxrwxrwx 1 root root 46 Aug 13 21:20 java -> /volume1/@appstore/java8/ejdk1.8.0_51/bin/java

Re: Filebot not identifying java
You need to link the java executable into /usr/bin and not whatever it is you tried to do.
You need to change /path/to/jre/bin/java and you must not change /usr/local/bin/java
Here's a video tutorial:
https://www.youtube.com/watch?v=8N6hYNj_QzY
You need to change /path/to/jre/bin/java and you must not change /usr/local/bin/java
Code: Select all
ln -s -f /path/to/jre/bin/java /usr/local/bin/java
https://www.youtube.com/watch?v=8N6hYNj_QzY
Re: Filebot not identifying java
ok, i startet from scratch and followed your yt-tutorial. everything is working out until this point:
downlod ok - extract with "tar -zxvf java.tar.gz" (ds is extracting something)
next step: ls command - my result is different to the video:
downlod ok - extract with "tar -zxvf java.tar.gz" (ds is extracting something)
next step: ls command - my result is different to the video:
and if check which version of java:DiskStation> ls
jrecreate.bat jrecreate.config.properties jrecreate.sh
thanks for your patience...DiskStation> java
-ash: java: not found
DiskStation> java -version
-ash: java: not found
DiskStation>
Re: Filebot not identifying java
Since you already have java and confirmed it's working you don't need to worry about that. Just need to symlink to /usr/bin like the example says.
Here, I replaced the path for you. Now you really just need to copy and paste...
Here, I replaced the path for you. Now you really just need to copy and paste...
Code: Select all
ln -s -f /volume1/@appstore/java8/ejdk1.8.0_51/bin/java /usr/local/bin/java
Re: java: not found
....thx. but still a missing java.
/usr/bin/filebot: line 41: java: not found
Status quo:
/usr/bin/filebot: line 41: java: not found
Status quo:
DiskStation> java -version
java version "1.8.0_51"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_51-b07, headless)
Java HotSpot(TM) Embedded Server VM (build 25.51-b07, mixed mode)
DiskStation> cd /usr/local/bin/
DiskStation> dir
drwxr-xr-x 2 root root 4096 Aug 14 06:33 .
drwxr-xr-x 9 root root 4096 Aug 14 06:32 ..
lrwxrwxrwx 1 root root 37 Aug 14 06:32 filebot -> /volume1/@appstore/filebot/filebot.sh
lrwxrwxrwx 1 root root 46 Aug 14 06:33 java -> /volume1/@appstore/java8/ejdk1.8.0_51/bin/java
-rwxr-xr-x 1 root root 5776 Aug 12 11:58 ldd
Re: java: not found
Well, that doesn't make any sense! 
Next step: Modify filebot.sh and just put in the absolute path for "java" instead of "java" and see what happens.

Next step: Modify filebot.sh and just put in the absolute path for "java" instead of "java" and see what happens.
Re: java: not found
in a weired way this is good news - i am not that incompetent 
but, as you know by now, i am not a linux/code/ssh crack...
vi filebot.sh .... so far so good. and now, cant find the exact location where to put the java path
(/volume1/@appstore/java8/ejdk1.8.0_51/bin/java)

but, as you know by now, i am not a linux/code/ssh crack...
vi filebot.sh .... so far so good. and now, cant find the exact location where to put the java path

Re: java: not found
1. Go to last line
2. Replace "java" with "/volume1/@appstore/java8/ejdk1.8.0_51/bin/java"
2. Replace "java" with "/volume1/@appstore/java8/ejdk1.8.0_51/bin/java"
Re: java: not found
at least something, erroris a little bit different

fyi the content:/usr/bin/filebot: line 41: /volume1/@appstore/java8/ejdk1.8.0_51/bin/java: not found
what the hack?DiskStation> cd /volume1/@appstore/java8/ejdk1.8.0_51/bin
DiskStation> dir
drwxr-xr-x 2 root root 4096 Jun 25 19:49 .
drwxr-xr-x 6 root root 4096 Aug 14 06:34 ..
-rwxr-xr-x 1 root root 1719 Jun 25 19:49 jrecreate.bat
-rw-r--r-- 1 root root 2254 Jun 25 19:49 jrecreate.config.properties
-rwxr-xr-x 1 root root 473 Jun 25 19:49 jrecreate.sh
DiskStation>
Re: java: not found
I've never seen any of these... that doesn't look like anything I'd expect in the java bin folder... there should at least be a java executable...
Re: java: not found
ok, i poked around in the java8 folder and found another folder with some more files and the executable.
now it works. thanks for your help and patience. for those who maybe struggling with the same issue, the path that worked for me:
and for those who want to edit the filebot.sh file via mac terminal:
"vi" is the command to start the editor
"fn+i" lets you edit the lines
"esc" to finish the edit
":w" to save the changes
(this is also a personal note - in case i need it again
)
now it works. thanks for your help and patience. for those who maybe struggling with the same issue, the path that worked for me:
Code: Select all
/volume1/@appstore/java8/ejdk1.8.0_51/linux_i586/jre/bin/java
"vi" is the command to start the editor
"fn+i" lets you edit the lines
"esc" to finish the edit
":w" to save the changes
(this is also a personal note - in case i need it again

Re: java: not found
My Java Installer package for Synology should take care of these issues:
https://github.com/rednoah/java-installer
https://github.com/rednoah/java-installer
Re: java: not found
hi ,
i have some problems to use file bot node on my syno 210j
when i install filebot node java not installing automatic and i'm trying to install with package found on package center.
unfortunatly the installation send me an error and i can use filebot node.
how can i install java8 on my syno ?
Thaks ans sorry for my english
i have some problems to use file bot node on my syno 210j
when i install filebot node java not installing automatic and i'm trying to install with package found on package center.
unfortunatly the installation send me an error and i can use filebot node.
how can i install java8 on my syno ?
Thaks ans sorry for my english
Re: java: not found
What have you tried? What does to log say?rednoah wrote:My Java Installer package for Synology should take care of these issues:
https://github.com/rednoah/java-installer
Re: java: not found
i follow the guide on pcloadletter.co.uk but after installation ( result OK ) i have this error
filebot -script 'fn:amc' /volume1/homes/admin/Downloads/FileBot --output /volume1/homes/admin/Downloads/Video --action duplicate -non-strict --conflict auto --lang it --def 'music=y' 'unsorted=y' 'deleteAfterExtract=y' 'excludeList=.excludes' --log info --log-file '/volume1/@appstore/filebot-node/filebot.log'
------------------------------------------
/usr/local/bin/filebot: line 53: java: not found
------------------------------------------
[Process error]
filebot -script 'fn:amc' /volume1/homes/admin/Downloads/FileBot --output /volume1/homes/admin/Downloads/Video --action duplicate -non-strict --conflict auto --lang it --def 'music=y' 'unsorted=y' 'deleteAfterExtract=y' 'excludeList=.excludes' --log info --log-file '/volume1/@appstore/filebot-node/filebot.log'
------------------------------------------
/usr/local/bin/filebot: line 53: java: not found
------------------------------------------
[Process error]
Re: java: not found
1.
What did the Java Installer log say?
2.
/usr/local/bin/java must link to the java executable. I guess the pcloadletter package doesn't set this up, so you'll need to create that link yourself via ssh.
What did the Java Installer log say?
2.
/usr/local/bin/java must link to the java executable. I guess the pcloadletter package doesn't set this up, so you'll need to create that link yourself via ssh.
Re: java: not found
how can link /usr/local/bin/java to the java executable?rednoah wrote:1.
What did the Java Installer log say?
where can i find the logs ?
2.
/usr/local/bin/java must link to the java executable. I guess the pcloadletter package doesn't set this up, so you'll need to create that link yourself via ssh.
thanks a lot
Re: java: not found
Read this thread again, from the beginning. You'll find your answer. 
@see viewtopic.php?f=13&t=2527&p=18770#p15164

@see viewtopic.php?f=13&t=2527&p=18770#p15164