Monday, October 8, 2007

"Could not find jar tool executable" When Packaging

Originally, when I tried to compile the file for deployment, I received this error:


Could not find jar tool executable.
The jar tool requires a full JDK installation.
Specify a full JDK installation in the Java preferences.


Reason:
Could not find jar tool executable.



Solution from http://www.eclipseme.org/docs/faq.html#jar,:


"Could not find jar tool executable" When Packaging


The process of obfuscated packaging requires that the jar file created by the obfuscation tool must be preverified again. The preverifier tool needs to be able to invoke the jar executable tool while preverifying the jar file from the PATH environment. EclipseME searches for the jar executable within the "Installed Java Runtime Environments" in your Eclipse installation. EclipseME must find at least one full Java Development Kit within the Installed JRE's (a subcategory of the Java category). By default, Eclipse will recognize a JRE rather than a full JDK on Windows. To solve this problem, make sure to point the location of the installed JRE instance to the root directory of the JDK directory. For instance on Windows, that might be something like c:\j2sdk1.4.2.


In English:
1- Download and install the j2sdk1.4.2 from Sun
2- Right Click project, go to Properties
3- Run/Debug Settings
4- Highlight Main, Click Edit
5- Click on JRE Tab
6- Click radio button for Alternate JRE
7- Locate installed JRE

1 comment:

Rohit said...

Thanks; I faced the same problem, and your post helped.