Multilingual Wiki Documentation

You are currently using syntax.
In an attempt to improve PlantUML documentation...
Please do not use this website for your own diagrams.
You can click here and use the online server here for your own documentation.

Wiki Toc    Recent changes    View page history    Add new chapter    Reorder page    Raw


假如您和我一样也是个急性子

尝试 PlantUML 最简单快捷的方法就是使用在线编辑服务。例如访问在线服务器

PlantUML for the impatient

The easiest way to test PlantUML is in an online solution that has PlantUML embedded, such as our online server.

本地安装和使用

当您对PlantUML有了基本的了解, 就可以在本地安装和使用PlantUML了。

如果安装和使用中遇到任何问题,可以先尝试在这里找找答案(FAQ)。

软件要求:
  • Java: 是运行PlantUML的必需条件, 请在您的环境中安装Java。
  • graphviz-dot: 可选的, 但是建议安装 (如果想绘制除 时序图和活动图以外的图, 就需要安装 Graphviz 软件)。

从下载适合您当前操作系统的graphviz软件包, 安装或者解压到你指定的目录。 然后需要设置系统环境变量,命令窗口中输入"sysdm.cpl"›高级›环境变量。建立变量名GRAPHVIZ_DOT,值为刚才安装的路径。

接下来, 需要下载 plantuml.jar 文件, 保存到本地安装目录。
WARNING
 This translation need to be updated. 
WARNING

Local installation

After testing, you may want to install PlantUML locally.

You need these things to run PlantUML:

Installed the above? Then simply download plantuml.jar and run it to open PlantUML's graphical user interface. There is no need to unpack or install anything.

以命令行方式运行 PlantUML

使用 PlantUML 的命令行语法来将 PlantUML 集成到您的脚本和文档工具上。

  1. 此时,您就可以尝试绘制您的第一个UML图了。您可以使用任何您喜欢的文本工具,例如,在工作目录中建立一个sequenceDiagram.txt,内容如下:

@startuml
Alice -> Bob: test
@enduml

2. 运行 PlantUML(或使用您的软件来调用),将sequenceDiagram.txt作为命令输入,输出即为图像,可以在其他软件中显示,也可以写入到磁盘中的文件上。例如:

java -jar plantuml.jar sequenceDiagram.txt

这条命令会将您的顺序图输出到sequenceDiagram.png这个文件中。

Run PlantUML from the command line

Use PlantUML's command line syntax to include it in your own scripts or documentation tools.

  1. Create a text file with PlantUML commands, like this example called sequenceDiagram.txt:

@startuml
Alice -> Bob: test
@enduml

2. Run (or have your software call) PlantUML, using sequenceDiagram.txt as input. The output is an image, which either appears in the other software, or is written to an image file on disk.
For example:

java -jar plantuml.jar sequenceDiagram.txt

This outputs your sequence diagram to a file called sequenceDiagram.png.


Please report any bugs to plantuml@gmail.com or here.
This website is still in beta testing.