Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Ant error - Unrecognized option <option_name>

807603Nov 19 2007 — edited Nov 19 2007
This post is for future generations...
After a couple of months o&#1072; quite stable work my Ant script has started to fail with the following error
[javac] Unrecognized option: -J-Xmx256m
[javac] Could not create the Java virtual machine.
After digging up through a few links (there were not more then a dozen google could find) asking on a couple of forums for any clues on that mystery I was almost sure I would never find how to rectify that error. But finally I got it myself. The problem was that my build.properties file has this:

javac.executable="C:/j2sdk1.4.2_08/bin/java.exe"

instead of this

javac.executable="C:/j2sdk1.4.2_08/bin/javac.exe" - note javac not java

Well, thats pretty much of my problem that was successfully resolved
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2007
Added on Nov 19 2007
0 comments
380 views