Search code examples
intellij-ideasdkpatherlang

intellij Mac set a SDK home path to /usr


Using Intellij IDEA 14.1.2 I am trying to set an Erlang SDK home path, the only option I have for doing this is a file browser that does not let me view my /usr/local file. That is, I have no option for typing the desired path. I am forced to use the Apple gui file browser (that does not show /bin or /usr)

File -> Project Structure -> SDK's

I made a sym-link, but I don't really want stray links.

ln -s /usr/local/path/to/erlang ~/erlang

I can "type" the classpath and sourcepath but not the main "Erlang SDK home path:"

any ideas?


Solution

  • Solution: installing erlang in a directory visible for Intellij IDEA

    Steps:
    // 1-7 could be found here http://www.erlang.org/doc/installation_guide/INSTALL.html
    1. Download "OTP 17.5 Source File" from http://www.erlang.org/download.html
    2. $ tar -zxf otp_src_17.5.tar.gz (unpack)
    3. $ cd otp_src_17.5
    4. $ export ERL_TOP='pwd'
    5. $ ./configure --prefix=/users/myuser/otp (use obsolete path; "~/" didn't work for me)
    6. $ make
    7. $ sudo make install
    //
    8. File -> Project Structure -> SDK's (chose /users/myuser/otp)
    9. Finally to be able to use erlang from command line still; edit or create .bash_profile in the home directory and add the erlang's directory to the PATH variable (export PATH=${PATH}:/users/myuser/otp/bin/)
    10. Finally Finally :) $ source .bash_profile

    For me that did the job!