env.put("PATH",
env.get("PATH")+
"/usr/lib/fsl/5.0");
Hi Carmine,Paul's email links to a pure-java solution - this should work without needing to modify .bashrc etc.Kind RegardsMatthewmyabe 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 RegardsMatthewHello 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 RegardsMatthewcarmine@HpCarmine:~$ which fslinfofsl 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?
/usr/lib/fsl/5.0/fslinfo
carmine@HpCarmine:~$ which fslview
/usr/bin/fslview2015-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 RegardsMatthewSorry, i'm under debian 8.02015-11-16 14:26 GMT+01:00 Carmine Pagliaro <[log in to unmask]>:this is the ccode that i useand thi is the error:
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);
}
java.io.IOException: Cannot run program "fslinfo": error=2, File o directory non esistente2015-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 RegardsMatthewthank youcan anyone help me?this work fine only with fslview command, but with the others not.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("");
--Carmine PagliaroResearch Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
ItalyLife is for sharing.
--Carmine PagliaroResearch Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
ItalyLife is for sharing.
--Carmine PagliaroResearch Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
ItalyLife is for sharing.
--Carmine PagliaroResearch Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
ItalyLife is for sharing.
--Carmine PagliaroResearch Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
ItalyLife is for sharing.
--Carmine PagliaroResearch Fellow Neuroimaging Unit
Institute of Bioimaging and Molecular Physiology-CNR
ItalyLife is for sharing.