How to turn on xampp in conjunction with a desktop program? [closed]

0

My question is this, I am learning how to program and I recently created a small desktop program in netbeans and I would like to know if there is any way that every time I open the jar type program I also start the database that I have in xampp so that I can save and obtain information, so that the person who is going to use the program does not have to activate the database before using the program but will open and close it automatically with the program, or some alternative solution Can you inform me? since thank you very much !!!

    
asked by Iván Duarte 07.07.2018 в 16:55
source

1 answer

0

Program in Java, right?

From a Java application you can start programs on your computer, using the Runtime class, for example:

try 
{ 
   /* directorio/ejecutable es el path del ejecutable y un nombre */ 
   Process p = Runtime.getRuntime().exec ("directorio/ejecutable"); 
} 
catch (Exception e) 
{ 
   /* Se lanza una excepción si no se encuentra en ejecutable o el fichero no es ejecutable. */ 
}

Code: link

And if you can open Xampp from your program, you must have it configured to automatically start the services you require (in Xampp itself).

    
answered by 07.07.2018 / 17:39
source