I have been working on a Scalatra project on a Linux environment and would now like to switch to a Windows environment. I've transferred the project folder to my Windows directory. Using Cygwyn, I cd to the Scalatra project and type
./sbt
> jetty:start
Nothing happens at this point. I have waited 10 minutes but nothing is printed to the console. I am having a hard time thinking of what might be the cause, since the exact same project works fine on Linux. Anyone have a Scalatra project working on Windows and remember whether there were any Windows-specific steps to set it up?
I did this on a fresh Windows 10 Professional VM in virtual box. I only allocated 1 CPU and 4 GB RAM, which may have made things unnecessarily slow. I was logged in as administrative user testvm
I always started new command prompts after modifying environment variables. All of my command prompts were run as administrator... I don't know whether that was necessary.
In general, these instructions were a good start: How to Install conscript in Windows, followed by http://scalatra.org/getting-started/first-project.html
C:\Program Files\Java\jdk1.8.0_131\bin
) to the end of the PATH
system variableset
to review the PATH
environment variable, and ran javac –version
as an additional sanity checkPATH
at this point.C:\Program Files\Git\bin
to the PATH environment variable. I’m not sure if either or both of those tweaks are required.C:\Users\testvm\.conscript\bin\cs.bat
. 100% CPU use continued for several minutes after this and eventually I clicked the close button (X) in the upper right of the conscript installer dialogue.
C:\Users\testvm\.conscript\bin\cs.bat foundweekends/giter8/0.7.2
C:\Users\testvm\.conscript\bin\g8.bat scalatra/scalatra-sbt
c:\Users\testvm\my-scalatra-web-app\sbt
my-scalatra-web-app
was installed into c:\Windows\System32\my-scalatra-web-app
, but I was able to copy it to the top of C:\
. cd
'ing in there and running just sbt
gave an error message, because there's a sbt
file in that folder, but it's not a windows executable. So I entered "c:\Program Files (x86)\sbt\bin\sbt.bat"
. Subsequently, that directory was added to my PATH environment variable, so I could just enter sbt.bat
>
prompt reappeared, entered jetty:start
and waited some moreeventually, the following appeared:
2017-05-09 07:31:15.101:INFO:oejs.ServerConnector:main: Started ServerConnector@bffcb98{HTTP/1.1}{0.0.0.0:8080} 2017-05-09 07:31:15.101:INFO:oejs.Server:main: Started @8698ms
Opened http://localhost:8080
in a web browser and saw Hello, world!