I am working on a simple java editor that uses ant to call JDK.
On eclipse everything work fine, I am able to build build.xml. The problems is when I export my Editor to an executable jar, and I try to build the build.xml of a project, I get the famous problems:
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files (x86)\Java\jre7"
Important:
If i run my jar Editor from cmd it's work fine ,but if i double click the Editor jar it doesn't work , i get the famous problem (unable to find javac compiler...).
Notice:
JAVA_HOME points to the JDK.
I am using ant.jar and ant-launcher.jar.
Eclipse points to my JDK installation.
tools.jar is added to JDK/lib folder