java - Runtime.getRuntime().exec() issue -


i'm trying run programm java code:

string[] command = {"gdal_polygonize.py", "/home/user/myoldfiles/proceeded.tiff", "-mask", "/home/user/myoldfiles/biomass_02.08.14.tif", "-f", "'esri shapefile'", "/home/user/myoldfiles/proceeded.shp", "dn"}; process p = runtime.getruntime().exec(command); 

i have no file proceeded.shp created in /home/user/myoldfiles/ command output obtained bufferedreader looks like:

creating output /home/user/myoldfiles/proceeded.shp of format 'esri shapefile'. 

when run next command in terminal(ubuntu)

 gdal_polygonize.py '/home/user/myoldfiles/proceeded.tiff' -mask '/home/user/myoldfiles/biomass_02.08.14.tif' -f 'esri shapefile' '/home/user/myoldfiles/proceeded.shp' 

it prints

creating output /home/user/myoldfiles/proceeded.shp of format esri shapefile. 0...10...20...30...40...50...60...70...80...90...100 - done. 

and creates proceeded.shp file. doing wrong in java code?

thanks help! find solution here. problem in single quotes in 'esri shapefile', deleted them , works fine now!


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -