dcsimg
problem in executing rpm file from java
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   amar_kumar
Posted On:   Friday, February 4, 2005 04:01 AM

Hi Folks , Here i am having problem in running rpm files from java code. I used Runtime class to run but its not working. Here i am posting the sample code of my application Runtime r = null; String line; String cmd="rpm --install pgadmin.rpm"; java.io.File file= new java.io.File("/root/RD/softwares"); Process p = r.getRuntime().exec(cmd,null,file); pls any suggestions tht will help me .. thanks and regards Amar Kumar    More>>

Hi Folks ,



Here i am having problem in running rpm files from java
code. I used Runtime class to run but its not working.


Here i am posting the sample code of my application

			

Runtime r = null;
String line;
String cmd="rpm --install pgadmin.rpm";
java.io.File file= new java.io.File("/root/RD/softwares");
Process p = r.getRuntime().exec(cmd,null,file);



pls any suggestions tht will help me ..


thanks and regards


Amar Kumar    <<Less

Re: problem in executing rpm file from java

Posted By:   a_p  
Posted On:   Wednesday, February 16, 2005 03:02 AM


To execute rpm you must be the super user...

that may cause the problem

If you can run su commad befor giving call to exec may help

Re: problem in executing rpm file from java

Posted By:   Vandana_P  
Posted On:   Tuesday, February 15, 2005 04:59 AM

Hi Amar,



Can you please tell me if you were able to solve this particular problem. I am facing a similar problem and want to know if you could make it work.



Thanks.

Re: problem in executing rpm file from java

Posted By:   Simon_Ablett  
Posted On:   Saturday, February 5, 2005 07:11 AM

Try using...

String [] cmd = { "rpm", "--install", "pgadmin.rpm" };
java.io.File file= new java.io.File("/root/RD/softwares");
Process p = r.getRuntime().exec(cmd,null,file);

Regards.
About | Sitemap | Contact