Ant “JAVA_HOME does not point to the JDK” – but it does

The real message is that Ant can’t find com.sun.tools.javac.Main. Which, together with the fact that the latest “Sun” (Oracle) JDK is 1.7.0_13 (or maybe _14, but definitely not the “_52” that your install dir indicates), makes me think that you’re not using a distribution that Ant recognizes. You can verify this by running jar tvf $JAVA_HOME/lib/tools.jar, and … Read more

Textarea Auto height

It can be achieved using JS. Here is a ‘one-line’ solution using elastic.js: Updated: Seems like elastic.js is not there anymore, but if you are looking for an external library, I can recommend autosize.js by Jack Moore. This is the working example: Check this similar topics too: Autosizing textarea using Prototype Textarea to resize based on content length Creating … Read more

var.replace is not a function

My guess is that the code that’s calling your trim function is not actually passing a string to it. To fix this, you can make str a string, like this: str.toString().replace(…)…as alper pointed out below.