2

I have installed NetBeans 7.3.1 on Mac OSX 10.8.4 with scala.

Could not load definitions from resource scala/tools/ant/antlib.xml. It could not be found. init: deps-jar: /Users/.../NetBeansProjects/ScalaApplication2/nbproject/build-impl.xml:405: The following error occurred while executing this line: /Users/..../NetBeansProjects/ScalaApplication2/nbproject/build-impl.xml:238: Problem: failed to create task or type scalac Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any / declarations have taken place. BUILD FAILED (total time: 0 seconds)

I have added J-Dscala.home=%SCALA_HOME% to the netbeans.conf file and on the mac terminal echo $SCALA_HOME gives /usr/local/Cellar/scala/2.10.1/libexec where lib directory lives.

1 Answer 1

0

The netbeans error message could be worded more clearly.

One issue is that you are using MS Window's syntax %SCALA_HOME% for evaluating your environment variable. The Unix syntax is $SCALA_HOME or ${SCALA_HOME}.

The following works for me: First add the following line to .profile

export SCALA_HOME=/usr/local/Cellar/scala/2.10.1/libexec

and append the following to netbeans_default_options in netbeans.conf

-J-Dscala.home=/usr/local/Cellar/scala/2.10.1/libexec

I'd prefer to just list the scala home directory in one place to make upgrades more foolproof, but referencing ${SCALA_HOME} from netbeans.conf didn't work for me. Maybe the environment variable needs to be defined elsewhere to be visible from netbeans.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.