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 最简单快捷的方法就是使用在线编辑服务. 例如, 访问 online server.

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 文件, 保存到本地安装目录.

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.

Run PlantUML from the command line

双击 plantuml.jar 文件, 启动 plantUML界面. 可以点击"Change Directory"按钮 来重新指定工作目录. 保持界面处于打开状态,不要关闭.

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

@startuml
Alice -> Bob: test
@enduml

PlantUML 会扫描和检测工作目录中的文件修改, 并且自动生成UML图像文件, 例如 sequenceDiagram.png.

当然 PlantUML 也可以通过命令行的方式来执行

java -jar plantuml.jar sequenceDiagram.txt

png图像文件中的UML图, 效果还是很不错呢!! ^_^

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.