Results 1 to 4 of 4
Thread: Problem using Runtime.exec
- 03-20-2012, 03:10 AM #1
Member
- Join Date
- Mar 2012
- Posts
- 3
- Rep Power
- 0
Problem using Runtime.exec
Hi all, I have some problems regarding the use of Process class.
I have an external application that I need to call using Process. The external application that I use is BulkImageProcessor which is a plugin for Paint.Net. It can use command line parameters to call the functions of the program.
In my code, I wrote something like this.
Java Code:Runtime rt = Runtime.getRuntime(); String command = "C:\\Paint.NET\\PDNBulkUpdaterCmd.exe "; command += "\"C:\\pictures\\*.*\" "; command += "\"\/oC:\\pictures\\converted\" "; command += "/alg:bicubic "; command += "/oft:jpg"; Process p = rt.exec(command);
I am not sure what went wrong because when I try to execute in the command prompt, the command works. Did I miss out anything?Java Code:Fatal Error: Could not locate PDNBulkUpdater.dll! System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0X8007002) at System.Reflection.Assembly.nLoadFile(String path, Evidence evidence) at System.Reflection.Assembly.LoadFile (String File) at PDNBulkUpdaterCmd.Program.Main(String[] args)
- 03-20-2012, 05:14 AM #2
Re: Problem using Runtime.exec
Why do they call it rush hour when nothing moves? - Robin Williams
- 03-20-2012, 08:55 PM #3
Freelance Java Programmer
- Join Date
- Feb 2012
- Location
- Norway
- Posts
- 3
- Rep Power
- 0
Re: Problem using Runtime.exec
You need to have PDNBulkUpdater.dll in the working directory of the java programme.
- 03-21-2012, 04:19 AM #4
Member
- Join Date
- Mar 2012
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
problem with Runtime.getRuntime().exec when running java in .bat
By Shayko in forum Threads and SynchronizationReplies: 2Last Post: 01-27-2010, 07:46 PM -
Problem with Runtime.getRuntime().exec with Linux Commands
By swapnilnawale in forum Threads and SynchronizationReplies: 1Last Post: 09-23-2009, 10:23 PM -
runtime.exec
By cotede2 in forum Advanced JavaReplies: 3Last Post: 04-17-2009, 05:18 PM -
Runtime.exec()
By hknyo in forum Advanced JavaReplies: 2Last Post: 08-16-2008, 12:40 AM -
Problem with Runtime.exec()
By nhabibi in forum Advanced JavaReplies: 11Last Post: 07-02-2008, 01:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks