本地安装说明

序列图

安装完成后,您应该首先尝试创建一些序列图。因为这些图表在没有 Graphviz 的情况下也能运行,所以这是检查安装是否成功的最快方法。如果无法正常工作,其他图表可能无法正常工作

您应确保使用命令行而不是在您要安装的目标工具(Eclipse、Word、Mediawiki......)中测试序列图

java -jar plantuml.jar -verbose sequenceDiagram.txt

sequenceDiagram.txt 文件中,你可以进行一个非常简单的测试:

@startuml
Alice -> Bob: test
@enduml

-verbose

在 Unix 下,必须安装 X11 librairies(默认已安装)。否则会出现HeadlessException 异常。 你可能需要在 command-line[命令行]中添加一个标志 。 如果该程序可以工作,但在你的工具中却不行,那可能是由于特定工具的问题: 在 MediaWiki 和 Windows 下,你必须在 上为 PHP 网络服务扩展运行的账户设置读取和执行权限。PHP 需要这些权限才能 "分叉 "其他进程。-Djava.awt.headless=true

C:\Windows\system32\cmd.exe

Other Diagrams

Once sequence diagrams are working fine, you can focus on other diagrams.

If Graphviz is not installed on your system, you have to install it first.

Under Linux, try to launch dot command into a command shell. You may have to finalize the installation by typing dot -C.

You may have to set GRAPHVIZ_DOT variables if you have not chosen the default installation directory of Graphviz.

To test the installation of Graphviz, you can use the command line:

java -jar plantuml.jar -testdot

You can also use this special diagram description:

@startuml
testdot
@enduml

Once again, you should test using the command line and the -verbose flag:

java -jar plantuml.jar -verbose classDiagram.txt

The classDiagram.txt file can be very simple:

@startuml
A <|-- B
@enduml

If you still have issues, then you can send us a mail.


Privacy Policy      Advertise