thank Paul. in my case it look like this?

env.put("PATH", env.get("PATH")+"/usr/lib/fsl/5.0");


2015-11-16 16:52 GMT+01:00 Matthew Webster <[log in to unmask]>:
Hi Carmine,
                     Paul's email links to a pure-java solution - this should work without needing to modify .bashrc etc.
Kind Regards
Matthew

myabe i wrong something. env java command don't show fsl. i restart system too. nothing happens. what else i can do?

2015-11-16 16:26 GMT+01:00 Matthew Webster <[log in to unmask]>:
Hello - that looks good, yes. 

Kind Regards
Matthew


Hello Dr. Webster. I can confirm that fsl is not in the java env. so how can I add?
something like this:
export PATH="/usr/lib/fsl/5.0:$PATH"
?

2015-11-16 16:12 GMT+01:00 Matthew Webster <[log in to unmask]>:
Hello, 
          Can you try execing env in your java program, and check to see if /usr/lib/fsl/5.0 is in the output? If not then you might want to add it to your PATH in .bashrc.
Kind Regards
Matthew


carmine@HpCarmine:~$ which fslinfo
/usr/lib/fsl/5.0/fslinfo
carmine@HpCarmine:~$ which fslview
/usr/bin/fslview

fsl script are in the /usr/lib/fsl/5.0/ how can i link all the script. i think about a simbolic link it's the correct way?

2015-11-16 14:58 GMT+01:00 Matthew Webster <[log in to unmask]>:
Hello Carmine,
                          I think you need to check that your environment is set up correctly so that the FSL binaries can be located - the error is telling you that java cannot find the fslinfo script. You might want to run the command 'env' to check what environment java is using.

Kind Regards
Matthew

Sorry, i'm under debian 8.0

2015-11-16 14:26 GMT+01:00 Carmine Pagliaro <[log in to unmask]>:
this is the ccode that i use
String cmd2 = "fslinfo test.nii.gz";
            Process p = Runtime.getRuntime().exec(cmd2);

            BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));

            BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));

            // read the output from the command
            System.out.println("Here is the standard output of the command:\n");
            while ((s = stdInput.readLine()) != null) {
                System.out.println(s);
            }

            // read any errors from the attempted command
            System.out.println("Here is the standard error of the command (if any):\n");
            while ((s = stdError.readLine()) != null) {
                System.out.println(s);
            }

and thi is the error:

java.io.IOException: Cannot run program "fslinfo": error=2, File o directory non esistente

2015-11-16 14:01 GMT+01:00 Matthew Webster <[log in to unmask]>:
Hi Carmine,
        Can you provide a little more information on what is going wrong? Do you get any error messages?
Kind Regards
Matthew


Hi FSL team,
I would use FSL command like fslinfo, fslview flirt ecc. in java programm calling the java method:
Process p = Runtime.getRuntime().exec("");
this work fine only with fslview command, but with the others not.
can anyone help me?

thank you


--
Carmine Pagliaro
Research Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
Italy
Life is for sharing.





--
Carmine Pagliaro
Research Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
Italy
Life is for sharing.




--
Carmine Pagliaro
Research Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
Italy
Life is for sharing.





--
Carmine Pagliaro
Research Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
Italy
Life is for sharing.





--
Carmine Pagliaro
Research Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
Italy
Life is for sharing.





--
Carmine Pagliaro
Research Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
Italy
Life is for sharing.





--
Carmine Pagliaro
Research Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
Italy
Life is for sharing.