简体   繁体   English

如何在 java 中显示项目结构

[英]How to display project structure in java

I have a error in a project I am currently working on.我目前正在处理的项目中有一个错误。 I wanted to post the problem in Stack overflow and want to display project structure like this:我想在堆栈溢出中发布问题,并希望像这样显示项目结构:

src
├── main
│   └── java
│       └── Main.java
├── manifest.txt
├── run.sh
└── test
    └── java
        └── MainTest.java

I have copied this structure from another question.我从另一个问题中复制了这个结构。 I am currently using eclipse and maven as well.我目前也在使用 eclipse 和 maven 。 If i amnot clear about my question.. here it is again.如果我不清楚我的问题.. 又来了。 how to get project structure of a java project I am working on-like done above-??如何获得我正在从事的 java 项目的项目结构 - ? )Sorry for the bad english. )抱歉英语不好。 not my first language)不是我的母语)

The simplest way I know to resolve this is using OS commands.我知道解决此问题的最简单方法是使用操作系统命令。 In that case, the question was already answwered in other posts like this在那种情况下, 这个问题已经在其他类似的帖子中得到了回答

In Windows you can run the following commands in a cmd terminal:在 Windows 中,您可以在 cmd 终端中运行以下命令:

  • cd the\root\folder\of\your\project
  • tree /f or tree /f > tree.txt tree /ftree /f > tree.txt

In Linux, the tree command should be available in most distributions.在 Linux 中, tree命令应该在大多数发行版中都可用。 You could use it by typing in a command terminal:您可以通过在命令终端中键入来使用它:

  • tree /the/root/folder/of/your/project

If you are looking for a specific feature in Eclipse, then I can't help you.如果您正在寻找 Eclipse 中的特定功能,那么我无法帮助您。 I don't know if such a feature exists.不知道有没有这样的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM