Unable to execute JAR file in Windows xp
Hello, I have created the jar file with the help of jdk 1.5 and when I try to run or execute that file on my computer which is having installed Windows xp. When I try to execute this file I got the error of below:
Code:
<terminated>Ftp_test [Java application] c:/program files/java/jre1.5.0_06/bin/javaw.exe.
What is the reason behind this.
Re: Unable to execute JAR file in Windows xp
There may be possibility that you are not able to create the jar file in right way and that is why you are getting this problem. So, again create the jar file and then you can able to run the jar file on your Windows xp without any problem. So, just try to do this and solve your problem. It may fix all your syntax related problems.
Re: Unable to execute JAR file in Windows xp
I think that you may need to type the command below on your command prompt by opening it into the administrator account.
Code:
C:\>assoc .jar=jarfile
C:\>ftype jarfile="C:\Program Files\Java\jre\bin\javaw.exe" -jar "%1" %*
C:\>ftype jarfile="C:\path\to\your\javaw.exe" -jar "%1" %*
Re: Unable to execute JAR file in Windows xp
There may be possibility that you have not created the right jar file and that is why you are getting this sort of error. If you want to create a jar file then you need to use the command below:
Code:
jar cf jar-file other
For providing arguments you can make use of the options below:- c - It is used to create a JAR file.
- f - Output sent to the file.
- jar-file - Name of the jar file which you want to create.
- other - These are the files which you want to add into the jar file.
Re: Unable to execute JAR file in Windows xp
Hello, I am also getting the same problem while opening the jar file. When I try to open the jar file it gives me error as unable to open the jar file. I have checked all the syntax and it is having all the correct syntax. I am not able to find out any error from the file. What is the reason behind this problem. If I try to open other files then also I got the same error. How to resolve it.
Re: Unable to execute JAR file in Windows xp
It may be possible that you are having problem with the Java Virtual Machine and that is why you are getting this error. So, you may need to uninstall the JDK and then again try to install it. If you are using high version of the JDK for creating jar file and now opening it with the low version then also it may possible that you will get that error.