Warning message running Play 2.5.x

前端 未结 3 615
走了就别回头了
走了就别回头了 2021-01-01 17:15

Whenever I run my application with activator run I get the following warning:

\"The system cannot find the file BIN_DIRECTORY\\..\\conf\\sbtconf         


        
相关标签:
3条回答
  • 2021-01-01 17:45

    @ps0604 Firstly, you should follow James Higgins-Thomas's 2nd answer and edit the C:\your\path\to\activator-dist-1.3.10\bin\activator.bat file and add a closing % symbol

    set SBT_HOME=%BIN_DIRECTORY%
    

    Secondly, the sbtconfig.txt found in the Scala directory C:\Program Files\sbt\conf\ needs to be copied to C:\your\path\to\activator-dist-1.3.10\conf. The google posting is from 2013 - so I think it's a bit dated

    Mind you, I think that it's odd that the SBT_HOME variable would point to a directory in Activator. It might be better to have

    set SBT_HOME="c:\Program Files\sbt\"
    

    (I know it's hard coded - not the best)

    And then fix

    set FN="%SBT_HOME%\conf\sbtconfig.txt"
    
    0 讨论(0)
  • 2021-01-01 17:57

    Fix activator.bat

    In addition to fixing the missing % after %BIN_DIRECTORY

    set SBT_HOME=%BIN_DIRECTORY%
    

    I also had to add quotes arround it in

    for %%D in ("%BIN_DIRECTORY%") do
    

    I put all my java in Program Files which contains a space..... The old drama still around every now an then....

    But now it starts :)

    [info] play - Application started (Prod)
    [info] play - Listening for HTTP on /127.0.0.1:8888
    [info] a.e.s.Slf4jLogger - Slf4jLogger started
    
    0 讨论(0)
  • 2021-01-01 17:57

    @Haim Raman. Or you could just leave the set SBT_HOME=%BIN_DIRECTORY% and rather define your sbtconfig.txt file location in the same activator.bat file.

    i.e. pathToactivatorfolder/bin/activator.bat

    So let's say if your activator is installed in "C:\activator" you do that by changing the line:
    set FN=%SBT_HOME%..\conf\sbtconfig.txt.

    To : set FN=%SBT_HOME%\..\..\pathTosbtfolder\conf\sbtconfig.txt

    So let's say if your sbt is installed in "C:\Program Files (x86)\sbt" (remember activator is installed in "C:\activator")

    then your settings will look like this:
    set FN=%SBT_HOME%\..\..\Program Files (x86)\sbt\conf\sbtconfig.txt
    Note that \..\..\ just means going up two directories. So you can always define your sbtconfig.txt location relative to your activator install path.

    0 讨论(0)
提交回复
热议问题