I have a java class in which I call the runhellscript method that will execute the script. It worked fine with mysql, but I can't figure out why it doesn't work with psql. Here is an excerpt from my runhell method:
public class RunShellScript { public static void runShellScript (String unixCommand) { try { Runtime runtime=Runtime.getRuntime();
the problem is that when I put this behind the event with a click of the mouse, it says that the command was not found. Here is the code for the mous event
private void jMenuItem13MousePressed(java.awt.event.MouseEvent evt) { String shellCommand="vobs/tools/Scripts/DataValidation/mysqlconnection.csh"; RunShellScript.runShellScript(shellCommand);
The strange thing is that when I go directly to the directory where the script is located and types. / mysqlconnection, the script is running. But when I just type mysqlconnection, it says that the command was not found. For some reason, this does not recognize my script name as a command?
rambokayambo
source share