> Date: Fri, 12 Sep 2014 15:59:13 -0400 > From: sb...@scriptorium.com > To: user@ant.apache.org > Subject: native2ascii and JDK/JRE > > [Trying again with a better subject and no garbage at the end...sorry.] > > Excuse me if this has been answered or documented elsewhere, I've been > searching > for the past couple of hours and have found very little on this issue. > > I have a project that uses the native2ascii task, that works fine on a > machine > with JRE 6 (1.6.0_65-b14-462-11M4609). > > However, when trying to run the same project under JRE 7 (1.7.0_67-b01), it > fails with the Java message "Error starting Sun's native2ascii." > > Eventually I was able to fix this issue by copying tools.jar from a JDK into > the > lib file of my JRE.
MG>you should already have tools.jar for JAVA_HOME on CLASSPATH e.g. export CLASSPATH=$JAVA_HOME/lib/tools.jar:$CLASSPATH find . -name tools.jar Directory of ./Java7/lib 09/20/2013 07:42 AM 15,228,504 tools.jar 1 File(s) 15,228,504 bytes Directory of ./jdk1.6.0_23/lib 01/31/2011 12:16 PM 12,633,716 tools.jar 1 File(s) 12,633,716 bytes MG>native2ascii for your JAVA_HOME should already be located on PATH e.g. export PATH=$JAVA_HOME/bin:$PATH find . -name native2ascii.* Java7/bin 09/20/2013 07:42 AM 15,752 native2ascii.exe 1 File(s) 15,752 bytes jdk1.6.0_23/bin 01/31/2011 12:16 PM 33,536 native2ascii.exe 1 File(s) 33,536 bytes MG>please verify > I'm surprised to have to go to such lengths to fix this issue. I'm also > surprised there's not more documentation in the native2ascii task in the Ant > manual pointing out this problem. > > Is there a more elegant solution out there than copying tools.jar? (I'm using > Apache Ant under the DITA Open Toolkit; most DITA OT users just use the JRE.) > > Thanks for any help or suggestions, > Simon > > -------------------------------------------------------------------------------- > Simon F. Bate > Senior Technical Consultant, Scriptorium Publishing Services, Inc. > sb...@scriptorium.com <mailto:sb...@scriptorium.com> > phone: 919.433.2606 > twitter: @simonbate >