gpt4 book ai didi

java - 使用 'sbt new playframework/play-java-seed.g8' 创建新项目 java 项目时无法正常工作并出现错误

转载 作者:行者123 更新时间:2023-12-02 12:19:01 25 4
gpt4 key购买 nike

我刚刚开始学习框架教程。当我尝试使用 sbt new playframework/play-java-seed.g8 命令创建新的 java 项目时,在我的 Windows 计算机中安装了 SBT,出现以下错误。请帮助我理解并解决这个问题。请教如何使用java和play开始新项目。

"C:\Users\praveena\.sbt\preloaded\org.scala-sbt\sbt\"1.0.0"\jars\sbt.jar"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading project definition from C:\Users\praveena\project
[info] Set current project to praveena (in build file:/C:/Users/praveena/)
13:05:47.274 [main] ERROR org.eclipse.jgit.util.FS - Caught exception in FS.readPipe()
java.io.IOException: Cannot run program "bash" (in directory "C:\Users\praveena"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) ~[?:1.8.0_121]
at java.lang.Runtime.exec(Runtime.java:620) ~[?:1.8.0_121]
at org.eclipse.jgit.util.FS.readPipe(FS.java:431) ~[?:?]
at org.eclipse.jgit.util.FS_Win32.discoverGitPrefix(FS_Win32.java:113) ~[?:?]
at org.eclipse.jgit.util.FS.gitPrefix(FS.java:517) ~[?:?]
at org.eclipse.jgit.util.SystemReader$Default.openSystemConfig(SystemReader.java:92) ~[?:?]
at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:171) ~[?:?]
at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:577) ~[?:?]
at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:113) ~[?:?]
at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161) ~[?:?]
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132) ~[?:?]
at giter8.JgitHelper$.clone(JgitHelper.scala:116) ~[?:?]
at giter8.JgitHelper$.run(JgitHelper.scala:67) ~[?:?]
at giter8.JgitHelper$.run(JgitHelper.scala:80) ~[?:?]
at giter8.Giter8.$anonfun$run$2(giter8.scala:34) ~[?:?]
at scala.Option.map(Option.scala:146) ~[scala-library.jar:1.0.0]
at giter8.Giter8.run(giter8.scala:33) ~[?:?]
at sbtgiter8resolver.Giter8TemplateResolver.run(Giter8TemplateResolver.scala:31) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
at sbt.TemplateCommandUtil$.call(TemplateCommand.scala:93) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:71) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.TemplateCommandUtil$.$anonfun$run$1(TemplateCommand.scala:51) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.TemplateCommandUtil$.$anonfun$run$1$adapted(TemplateCommand.scala:47) ~[main_2.12-1.0.0.jar:1.0.0]
at scala.collection.LinearSeqOptimized.find(LinearSeqOptimized.scala:111) ~[scala-library.jar:1.0.0]
at scala.collection.LinearSeqOptimized.find$(LinearSeqOptimized.scala:108) ~[scala-library.jar:1.0.0]
at scala.collection.immutable.List.find(List.scala:86) ~[scala-library.jar:1.0.0]
at sbt.TemplateCommandUtil$.run(TemplateCommand.scala:47) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:34) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.TemplateCommandUtil$.$anonfun$templateCommand$2(TemplateCommand.scala:17) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.Command$.$anonfun$applyEffect$4(Command.scala:125) ~[command_2.12-1.0.0.jar:1.0.0]
at sbt.Command$.$anonfun$applyEffect$2(Command.scala:121) ~[command_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.processCommand(MainLoop.scala:121) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.State$$anon$1.runCmd$1(State.scala:228) ~[command_2.12-1.0.0.jar:1.0.0]
at sbt.State$$anon$1.process(State.scala:234) ~[command_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:17) ~[util-control_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.next(MainLoop.scala:105) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.run(MainLoop.scala:98) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.io.Using.apply(Using.scala:23) ~[io_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.MainLoop$.runLogged(MainLoop.scala:29) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.StandardMain$.runManaged(Main.scala:104) ~[main_2.12-1.0.0.jar:1.0.0]
at sbt.xMain.run(Main.scala:71) ~[main_2.12-1.0.0.jar:1.0.0]
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109) ~[?:?]
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128) ~[?:?]
at xsbt.boot.Launch$.run(Launch.scala:109) ~[?:?]
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35) ~[?:?]
at xsbt.boot.Launch$.launch(Launch.scala:117) ~[?:?]
at xsbt.boot.Launch$.apply(Launch.scala:18) ~[?:?]
at xsbt.boot.Boot$.runImpl(Boot.scala:41) ~[?:?]
at xsbt.boot.Boot$.main(Boot.scala:17) ~[?:?]
at xsbt.boot.Boot.main(Boot.scala) ~[?:?]
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_121]
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386) ~[?:1.8.0_121]
at java.lang.ProcessImpl.start(ProcessImpl.java:137) ~[?:1.8.0_121]
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_121]
... 58 more
[error] org.eclipse.jgit.api.errors.TransportException: git@github.com:playframework/play-java-seed.g8.git: Connection timed out: connect
[error] at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
[error] at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:193)
[error] at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:133)
[error] at giter8.JgitHelper$.clone(JgitHelper.scala:116)
[error] at giter8.JgitHelper$.run(JgitHelper.scala:67)
[error] at giter8.Giter8.$anonfun$run$2(giter8.scala:34)
[error] at scala.Option.map(Option.scala:146)
[error] at giter8.Giter8.run(giter8.scala:33)
[error] at sbtgiter8resolver.Giter8TemplateResolver.run(Giter8TemplateResolver.scala:31)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] at sbt.TemplateCommandUtil$.call(TemplateCommand.scala:93)
[error] at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:71)
[error] at sbt.TemplateCommandUtil$.$anonfun$run$1(TemplateCommand.scala:51)
[error] at sbt.TemplateCommandUtil$.$anonfun$run$1$adapted(TemplateCommand.scala:47)
[error] at scala.collection.LinearSeqOptimized.find(LinearSeqOptimized.scala:111)
[error] at scala.collection.LinearSeqOptimized.find$(LinearSeqOptimized.scala:108)
[error] at scala.collection.immutable.List.find(List.scala:86)
[error] at sbt.TemplateCommandUtil$.run(TemplateCommand.scala:47)
[error] at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:34)
[error] at sbt.TemplateCommandUtil$.$anonfun$templateCommand$2(TemplateCommand.scala:17)
[error] at sbt.Command$.$anonfun$applyEffect$4(Command.scala:125)
[error] at sbt.Command$.$anonfun$applyEffect$2(Command.scala:121)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:121)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:228)
[error] at sbt.State$$anon$1.process(State.scala:234)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
[error] at sbt.MainLoop$.next(MainLoop.scala:105)
[error] at sbt.MainLoop$.run(MainLoop.scala:98)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76)
[error] at sbt.io.Using.apply(Using.scala:23)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:29)
[error] at sbt.StandardMain$.runManaged(Main.scala:104)
[error] at sbt.xMain.run(Main.scala:71)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] Caused by: org.eclipse.jgit.errors.TransportException: git@github.com:playframework/play-java-seed.g8.git: Connection timed out: connect
[error] at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:158)
[error] at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)
[error] at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
[error] at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
[error] at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
[error] at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
[error] at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
[error] at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
[error] at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:193)
[error] at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:133)
[error] at giter8.JgitHelper$.clone(JgitHelper.scala:116)
[error] at giter8.JgitHelper$.run(JgitHelper.scala:67)
[error] at giter8.Giter8.$anonfun$run$2(giter8.scala:34)
[error] at scala.Option.map(Option.scala:146)
[error] at giter8.Giter8.run(giter8.scala:33)
[error] at sbtgiter8resolver.Giter8TemplateResolver.run(Giter8TemplateResolver.scala:31)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] at sbt.TemplateCommandUtil$.call(TemplateCommand.scala:93)
[error] at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:71)
[error] at sbt.TemplateCommandUtil$.$anonfun$run$1(TemplateCommand.scala:51)
[error] at sbt.TemplateCommandUtil$.$anonfun$run$1$adapted(TemplateCommand.scala:47)
[error] at scala.collection.LinearSeqOptimized.find(LinearSeqOptimized.scala:111)
[error] at scala.collection.LinearSeqOptimized.find$(LinearSeqOptimized.scala:108)
[error] at scala.collection.immutable.List.find(List.scala:86)
[error] at sbt.TemplateCommandUtil$.run(TemplateCommand.scala:47)
[error] at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:34)
[error] at sbt.TemplateCommandUtil$.$anonfun$templateCommand$2(TemplateCommand.scala:17)
[error] at sbt.Command$.$anonfun$applyEffect$4(Command.scala:125)
[error] at sbt.Command$.$anonfun$applyEffect$2(Command.scala:121)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:121)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:228)
[error] at sbt.State$$anon$1.process(State.scala:234)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
[error] at sbt.MainLoop$.next(MainLoop.scala:105)
[error] at sbt.MainLoop$.run(MainLoop.scala:98)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76)
[error] at sbt.io.Using.apply(Using.scala:23)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:29)
[error] at sbt.StandardMain$.runManaged(Main.scala:104)
[error] at sbt.xMain.run(Main.scala:71)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] org.eclipse.jgit.api.errors.TransportException: git@github.com:playframework/play-java-seed.g8.git: Connection timed out: connect
[error] Use 'last' for the full log.

最佳答案

您的系统中似乎没有安装 git bash。尝试安装 git( https://git-scm.com/downloads ) 并尝试再次运行相同的命令。这对我来说很有效。

关于java - 使用 'sbt new playframework/play-java-seed.g8' 创建新项目 java 项目时无法正常工作并出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45933412/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com