-My code is used to create and Update the environment path using java with Netbeans and cmd prompt. That is working fine in my output console, BUt when i convert it into jar file that is not working properly. what should i do to work on windows 10. Because it's Working Fine in Windows8 & WIndows7.. Thanks in Advance...
Runtime rt =Runtime.getRuntime();
StringCreoPath_textfield=Textfield.getText();
try{
rt.exec(newString[]{"CMD.exe","/C","setx CREO_PATH \""+CreoPath_textfield+""});
}catch(IOException ex){
Logger.getLogger(Environment_set.class.getName()).log(Level.SEVERE,null, ex);
}
if(CreoPath_textfield.equals(""))
{
JOptionPane.showMessageDialog(null,"<html><b><font color=red>"+"Please enter Your Creo Path"+"</font></b></html>","Error",JOptionPane.ERROR_MESSAGE);
}
else{
setVisible(false);
}