To get translated text in UTF-8 working with my Lift application, I'm
trying to set up the SBT native2ascii plugin as described at
http://blog.getintheloop.eu/2010/8/18/native2ascii-plugin-for-sbt
So far I have no luck. Executing the "native2ascii" action in SBT
gives me:
java.lang.NoClassDefFoundError: sun/tools/native2ascii/Main
Indeed, I cannot compile a Java program with "new
sun.tools.native2ascii.Main();" in it, without first adding tools.jar
from the JDK to CLASSPATH, so I figure that's the problem.
Next I tried adding tools.jar as a dependency in project/build/
LiftProject.scala, like so:
val suntools = "sun" % "tools" % "1.6.0" % "system" from
"file://" + Path.fileProperty("java.home") + "/lib/
tools.jar"
When I run the "update" action in SBT it copies tools.jar to
lib_managed/scala_2.8.0/system/, but running "native2ascii" still
fails with the same error.
I also tried setting a classpath in the shell script that launches
SBT, which also did no good.
Some of my setup:
> java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
> cat project/build.properties
[...]
sbt.version=0.7.4
project.version=1.0
def.scala.version=2.7.7
build.scala.versions=2.8.0
I have googled to my wits end. Any suggestions?
Regards,
Geir H. Hansen