Cari,
di seguito il mio problema:
Ho necessità di lanciare un file .bash contenuto nel mio jar file.
Questo è il codice in questione:
final String scriptLocation = "Resources/scripts/getUSBdevices.bash";
URL scriptURL = Adtf_usbDevicesManager.class.getClassLoader().getR esource(scriptLocation);
if (scriptURL != null){
Process p = Runtime.getRuntime().exec(scriptURL.getPath());
}[...]
se lancio il jar file, questo è l'errore che ottengo.
java.io.IOException: Cannot run program "file:/C:/ADTF_GUI/ADTF/ADTF.jar!/Resources/scripts/getUSBdevices.bash": CreateProcess error=2, The system cannot find the file specified
La mia domanda è:
come posso ottenere in modo corretto il path della risorsa che carico?
Grazie
frapal

Rispondi quotando

