Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala sbt源代码中的主要方法在哪里?_Scala_Sbt - Fatal编程技术网

Scala sbt源代码中的主要方法在哪里?

Scala sbt源代码中的主要方法在哪里?,scala,sbt,Scala,Sbt,我克隆了sbt源代码,试图研究它,但找不到 def main 或 即使在sbt\main\src\main\scala\sbt\main.scala中 我搜索了所有的源文件,找到了一些有主要方法的文件,但是所有这些文件都在测试floder中,我认为这些方法是sbt的主要方法 那么sbt的主要方法在哪里呢?谢谢 我认为这最终是sbt启动器的主要方法 从主要 /** This class is the entry point for sbt. */ final class xMain exten

我克隆了sbt源代码,试图研究它,但找不到

def main

即使在sbt\main\src\main\scala\sbt\main.scala中

我搜索了所有的源文件,找到了一些有主要方法的文件,但是所有这些文件都在测试floder中,我认为这些方法是sbt的主要方法


那么sbt的主要方法在哪里呢?谢谢

我认为这最终是sbt启动器的主要方法

从主要

/** This class is the entry point for sbt. */
final class xMain extends xsbti.AppMain { 
  ...
}

您可以看到它如何从launcher项目扩展AppMain。不过,我不确定这项工作的神奇之处。

如何在基于*nix的系统上快速找到它

查找启动
sbt

ps aux | grep java
0:35.42 /usr/bin/java -Xms512m -Xmx3g -Xss2m -jar /.sbt/launchers/1.3.3/sbt-launch.jar shell

这说明主类位于
sbt launch.jar
jar文件中

向JVM发送信号3或使用jstack获取JVM的线程转储

 kill -3 xxxx
在这里

    at sbt.xMain.run(Main.scala:39)
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
    at xsbt.boot.Launch$.run(Launch.scala:111)
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
    at xsbt.boot.Launch$.launch(Launch.scala:119)
    at xsbt.boot.Launch$.apply(Launch.scala:20)
    at xsbt.boot.Boot$.runImpl(Boot.scala:56)
    at xsbt.boot.Boot$.main(Boot.scala:18)
    at xsbt.boot.Boot.main(Boot.scala)
    at sbt.xMain.run(Main.scala:39)
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
    at xsbt.boot.Launch$.run(Launch.scala:111)
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
    at xsbt.boot.Launch$.launch(Launch.scala:119)
    at xsbt.boot.Launch$.apply(Launch.scala:20)
    at xsbt.boot.Boot$.runImpl(Boot.scala:56)
    at xsbt.boot.Boot$.main(Boot.scala:18)
    at xsbt.boot.Boot.main(Boot.scala)