簡體   English   中英

我意外刪除了.sbt目錄,如何使sbt重新運行?

[英]I deleted the .sbt directory in accident, How to make the sbt run again?

我的系統是Windows 8,sbt版本是0.13.0,但是我猜所有的窗口版本都有類似的問題。

我將用戶配置文件形式從“ something Dev”折疊遷移到“ something” fold。

當前的錯誤是:

C:\activator>sbt
java.io.FileNotFoundException: C:\Users\propertymode Dev\.sbt\boot\update.log (T
he system cannot find the path specified)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
    at java.io.FileWriter.<init>(FileWriter.java:90)
    at xsbt.boot.Update.<init>(Update.scala:51)
    at xsbt.boot.Launch.update(Launch.scala:279)
    at xsbt.boot.Launch$$anonfun$jansiLoader$1.apply(Launch.scala:124)
    at scala.Option.getOrElse(Option.scala:120)
    at xsbt.boot.Launch.jansiLoader$2f324eef(Launch.scala:119)
    at xsbt.boot.Launch.<init>(Launch.scala:96)
    at xsbt.boot.Launcher$.apply(Launch.scala:294)
    at xsbt.boot.Launch$.apply(Launch.scala:16)
    at xsbt.boot.Boot$.runImpl(Boot.scala:32)
    at xsbt.boot.Boot$.main(Boot.scala:21)
    at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.FileNotFoundException: C:\Users\propertymode
Dev\.sbt\boot\update.log (The system cannot find the path specified)

我的設定是:

C:\Users\property>SET
ALLUSERSPROFILE=C:\ProgramData
AMDAPPSDKROOT=C:\Program Files (x86)\AMD APP\
APPDATA=C:\Users\property\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=PROPERTYMODE
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
GDAL_DATA=C:\PostgreSQL\9.3\gdal-data
GEOS_LIBRARY_PATH=c:\python27\DLLs\geos_c.dll
HOMEDRIVE=C:
HOMEPATH=\Users\property
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_40
LOCALAPPDATA=C:\Users\property\AppData\Local
LOGONSERVER=\PROPERTYMODE
NUMBER_OF_PROCESSORS=4
OnlineServices=Online Services
OS=Windows_NT
Path=C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bi
n\x86;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Clie
nt\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\
WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Compon
ents\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Pro
gram Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program File
s (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\W
iFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x
86)\ATI Technologies\ATI.ACE\Core-Static;C:\Python27;C:\Python27\Scripts;C:\Prog
ram Files (x86)\Bitvise Tunnelier;C:\Program Files (x86)\Git\cmd;C:\Program File
s\nodejs\;C:\scala\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jd
k1.7.0_40\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS
\System32\WindowsPowerShell\v1.0\;C:\cygwin64\bin\;C:\activator\;C:\sbt\bin;C:\U
sers\property\AppData\Roaming\npm
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PCBRAND=Pavilion
Platform=BNB
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3a09
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROJ_LIB=%PROJ_LIB%
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SBT_HOME=C:\sbt\
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\property\AppData\Local\Temp
TMP=C:\Users\property\AppData\Local\Temp
USERDOMAIN=propertymode
USERDOMAIN_ROAMINGPROFILE=propertymode
USERNAME=property
USERPROFILE=C:\Users\property
VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
windir=C:\WINDOWS

我的%HOMEPATH%和%USERPROFILE%是:

C:\Users\property>echo %HOMEPATH%
\Users\property

C:\Users\property>echo %USERPROFILE%
C:\Users\property

我知道我可以通過設置sbt.boot.directory參數來制定規范,但是默認路徑不會更改,並且sbt之上的任何程序(如激活程序)仍會應用舊路徑。

我在sbt目錄中找到一種解決方法,有一個配置文件sbtconfig.txt

在下面添加2行:

-Dsbt.global.base=C:\users\[your user profile]\.sbt
-Dsbt.ivy.home=C:\Users\[your user profile]\.ivy2

然后sbt和其他sbt依賴關系將找到路徑

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM