Bug 175394 - scala console and scala_home
scala console and scala_home
Status: RESOLVED INVALID
Product: contrib
Classification: Unclassified
Component: Scala
6.x
PC Linux
: P3 (vote)
: TBD
Assigned To: _ dcaoyuan
issues@obsolete
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-25 23:03 UTC by pezzacolori
Modified: 2012-04-24 13:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pezzacolori 2009-10-25 23:03:44 UTC
when trying the new scala plugin with the NB6.8beta (but also with the nightly builds) I still get the message:
"SCALA_HOME environment variable is not set, or is invalid. Please select a SCALA_HOME first!"  (2 times)
followed by a 
"Can not found ${SCALA_HOME}/bin/scala, the environment variable SCALA_HOME may be invalid. Please set proper SCALA_HOME
first!" 

when trying to open the SCALA console window.   (on the other way I can compile scala projects within Netbeans ...).

The console works with NB6.7.1 and scala 2.7.3 ...

I set the SCALA_HOME in  .bashrc  and opening a terminal and writing >echo $SCALA_HOME return the correct answer (same
for the PATH). Also writing >scala in a terminal starts scala2.8.0
I also set the scala home in the netbeans.conf file.
Comment 1 pezzacolori 2009-11-29 18:18:11 UTC
I could figure out that the problem is probably a general problem of Netbeans on ubuntu or linux platforms:
Netbeans is not always PATH-aware, depending on how this environment variables are set.
Setting them in 
~/.bhsrc
makes them available to Netbeans only if :
-1 the bash terminal is started
-2 Netbeans is started from that console

Using the menu shortcut doesn't allow Netbeans to read the environment variables set in ~/.bshrc, not even if the shortcut is set as "Application in terminal" (which actually starts up a terminal)!

I could solve it setting the environment variables in 
~/.profile
instead of  ~/.bshrc, which should set the login console.

A small note on this in the wiki could be helpful for the linux newbies like me ...

Cheers,
Boris
Comment 2 reinouts 2012-04-24 13:59:45 UTC
Adding -J-Dscala.home=<yourscaladir> to the netbeans_default_options in netbeans-7.1.1/etc/netbeans.conf should do the trick as well.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo