Results 1 to 1 of 1
- 05-11-2011, 12:31 PM #1
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
Ubuntu, run executable file in java
Hi, I'm try run a executable file in Ubuntu (linux) since a java program, but It don't run.
The call of external program, I have with a button, and in the linux terminal, I can execute with the following sentence:
/home/Placas/./miprueba
I write the subroutine:
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
//Intento lanzar un ejecutable
try
{
/* directorio/ejecutable es el path del ejecutable y un nombre */
Process p = Runtime.getRuntime().exec ("/home/Placas/./miprueba");
}
catch (Exception e)
{
/* Se lanza una excepción si no se encuentra en ejecutable o el fichero no es ejecutable. */
e.printStackTrace();
}
}
Thanks for your help
Similar Threads
-
create windows executable using executable jar file
By sarwar1234 in forum New To JavaReplies: 2Last Post: 02-07-2011, 08:29 PM -
How do I make a Java file executable
By jacatone in forum Java AppletsReplies: 12Last Post: 12-17-2010, 01:10 AM -
How to create java executable file through CMD
By Riaz Ali in forum New To JavaReplies: 4Last Post: 08-03-2010, 08:20 AM -
Error while executing the executable jar file using Java webstart (JNLP)
By praveen_has in forum New To JavaReplies: 0Last Post: 04-28-2010, 03:33 PM -
Executable java to read and write to a txt file
By njoymirror in forum New To JavaReplies: 2Last Post: 03-21-2009, 01:19 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks