Because there is a 'convert.exe' in the system32 directory on Windows system, ProcessBuilder ALWAYS launch this prog when the cmd is 'convert' whatever you set in your PATH environment variable.
Don't ask me why but on Windows ProcessBuilder doesn't respect the PATH env variable order when searching for the command. It always find the windows/system32/convert.exe first.
Basically if you want to run a process with a name that clashes with one of the windows prog it has to be launched with the full path.
I have modified your ProcessStarter class to accept a static IMAGEMAGICK_HOME directory and apply it to the command (first argument) before starting the ProcessBuilder. Without that I couldn't use it.
I think it will be good to have a way in your library to set the IM path at runtime. Something like Settings.setIMHome(File dir)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
first of all, thanks to the Developers of this project for setting up such a nice library for ImageMagick!
I have been very happy to find this library, because the abilities offered by jmagick are kind of restricted at some points.
And here is my suggestion:
I have experienced the same problems with the "convert.exe" in "c:\windows\system32" and the only way to get that to work, was to add a class member to ProcessStarter, where it tries to read the "IMAGEMAGCIK_HOME" system variable using System.getenv("IMAGEMAGICK_HOME).
So, if this variable is found, the absolute path is added to the "pArgs" in the "run" method in ProcessStarter. This way it should work for all ImageMagick tools which are called.
I would like to have a setter for the IM path as suggested by me predecessor above as well. Would it be possible to add something like this?
And as a second question: would it be possible to change the Test.java in a way, that would be executable on Windows platform as well? At the moment there is a lot of platform dependend syntax in the test cases and for that reason all of them crash on windows.
Thanks anyway and cheers
Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what do you mean with "out of the box"? Of course you have to set the search-path as described in the README from within your program (see also the method testSearchPath() in the file src/org/im4java/test/Test.java).
If you did set the search path and it still does not work, could you please post a code-snippet so I could have a look at it?
Bernhard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Because there is a 'convert.exe' in the system32 directory on Windows system, ProcessBuilder ALWAYS launch this prog when the cmd is 'convert' whatever you set in your PATH environment variable.
Don't ask me why but on Windows ProcessBuilder doesn't respect the PATH env variable order when searching for the command. It always find the windows/system32/convert.exe first.
Basically if you want to run a process with a name that clashes with one of the windows prog it has to be launched with the full path.
I have modified your ProcessStarter class to accept a static IMAGEMAGICK_HOME directory and apply it to the command (first argument) before starting the ProcessBuilder. Without that I couldn't use it.
I think it will be good to have a way in your library to set the IM path at runtime. Something like Settings.setIMHome(File dir)
Hi All,
first of all, thanks to the Developers of this project for setting up such a nice library for ImageMagick!
I have been very happy to find this library, because the abilities offered by jmagick are kind of restricted at some points.
And here is my suggestion:
I have experienced the same problems with the "convert.exe" in "c:\windows\system32" and the only way to get that to work, was to add a class member to ProcessStarter, where it tries to read the "IMAGEMAGCIK_HOME" system variable using System.getenv("IMAGEMAGICK_HOME).
So, if this variable is found, the absolute path is added to the "pArgs" in the "run" method in ProcessStarter. This way it should work for all ImageMagick tools which are called.
I would like to have a setter for the IM path as suggested by me predecessor above as well. Would it be possible to add something like this?
And as a second question: would it be possible to change the Test.java in a way, that would be executable on Windows platform as well? At the moment there is a lot of platform dependend syntax in the test cases and for that reason all of them crash on windows.
Thanks anyway and cheers
Peter
Encountered the same problem on Windows XP.
Don't really understand the suggested solution. Could someone expand?
Thanks.
Hi all,
the issue should be fixed with version 0.99.0. Feedback is appreciated.
Bernhard
Hi all,
This issue doesn't seem to be fixed for me. Maybe I've missed something but it doesn't work out of the box with 0.99.0.
Thanks
Hi,
what do you mean with "out of the box"? Of course you have to set the search-path as described in the README from within your program (see also the method testSearchPath() in the file src/org/im4java/test/Test.java).
If you did set the search path and it still does not work, could you please post a code-snippet so I could have a look at it?
Bernhard