Re: native2ascii and JDK/JRE
SimonBate <[email protected]>
| Newsgroups | gmane.comp.jakarta.ant.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks, Martin, The DITA Open Toolkit is a bit of on odd duck. It uses Ant, but not to build Java, so the JDK isn't required to run the OT. (People just get used to the constant "missing tools.jar" messages.) As I said, the DITA OT only requires a JRE. So yes, you're correct, if the user has the JDK, adding tool.jar to the classpath is a good thing to do (and solves my elegance question). However, absent the JDK, the situation is a bit stickier. Simon On 9/12/14, 4:27 PM, Martin Gainty wrote: > >> Date: Fri, 12 Sep 2014 15:59:13 -0400 >> From: [email protected] >> To: [email protected] >> 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. >> [email protected] <mailto:[email protected]> >> phone: 919.433.2606 >> twitter: @simonbate >> > -- Simon Bate 919.433.2606 @simonbate