File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How do i run any exe with low priority? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How do i run any exe with low priority?" Watch "How do i run any exe with low priority?" New topic
Author

How do i run any exe with low priority?

yatin baraiya
Ranch Hand

Joined: Jul 17, 2012
Posts: 30
Hi

When i execute the following java program it gives me the error,

Actually i want to run this exe with low process priority.

Check the below code , which i have write, Can any body tell me that my command string is proper or not?



I have try it with notepad.exe ,for the notepad.exe it working fine and proper but not working with this exe file ,SAV32CLI123.EXE
and for testing purpose , i have manually run this SAV32CLI123.EXE through command prompt , it gives me the same working result as like my notepad.exe case.
But from java , i can not run it ?
Let me know ,if you want to need other information?

Thanks & Regards
Yatin Baraiya
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9961
    
163

yatin baraiya wrote:

When i execute the following java program it gives me the error,

Actually i want to run this exe with low process priority.

Check the below code , which i have write, Can any body tell me that my command string is proper or not?

I don't know if there any problem with that command and what error you are running into. But I'm curious - why do you need a Java program to trigger an exe?


[My Blog] [JavaRanch Journal]
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

It would help if you'd provide the exact, complete error message.

At a guess, though, I'd say you need quotes around your executable name, since it contains a space.

yatin baraiya
Ranch Hand

Joined: Jul 17, 2012
Posts: 30
hi Jeff Verdegan

thanks for quick reply

when i execute with the below code , it will not create any process in task manger and not giving any error as well


but when i execute with the below command, it create this process "SAV32CLI123" in task manger process section with normal priority.


yatin baraiya
Ranch Hand

Joined: Jul 17, 2012
Posts: 30
hi all

finally i have find the problem

it is working fine when i remove space in exe path, as like below


now anybody have idea which run my command if my exe having whatever path?

Regards
Yatin Baraiya
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do i run any exe with low priority?
 
Similar Threads
createProcess error=193, %1 is not a valid win 32 application
C execute in java program
As a command it runs fine from cmd prompt but not from java code
C execute in java program