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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -