Hi,
Currently I have one more issue to be solved. When I run the following code from eclipse
IDE, the code runs fine. But when I create a jar file with the class files and run that jar file from command line, I get the following error - C:\WINNT\system32\ntvdm.exe Erro while setting up environment for the application. Choose 'Close' to terminate the application
-------------------------------------------------------------------------------------------------------------
try
{
String osName = System.getProperty("os.name" );
String[] cmd = new String[4];
if( osName.startsWith("Win"))
{
cmd[0] = "command.com" ;
cmd[1] = "/C" ;
cmd[2] = "unzip";
cmd[3] = fileName;
}
Runtime rt = Runtime.getRuntime();
System.out.println("Execing " + cmd[0] + " " + cmd[1]
+ " " + cmd[2] + " " + cmd[3]);
process = runTime.exec(cmd);
InputStream ins = process.getErrorStream();
BufferedReader bfr = new BufferedReader(new InputStreamReader(ins));
String line = null;
while((line = bfr.readLine()) != null) {
System.out.println(line);
}
int exitval = process.waitFor();
System.out.println("Wait over..." + exitval);
}
catch(IOException ioe)
{
ioe.printStackTrace();
}
catch (Exception e)
{
e.printStackTrace();
}
-----------------------------------------------------------------------------------------------------------------------
Please let me know how to solve this issue.
Thanks in advance!!