我今天安装了 Postgre,我想查看数据库 shema。
我决定使用 schemaSpy 并下载它以及 schemaSpyGui
然后我看到:
This is the command (password not displayed!) SchemaSpyGUI has generated:
java -jar "D:\free\schemaSpy_5.0.0.jar" -dp "D:\free\postgresql-9.1-903.jdbc4.jar" -t pgsql -db marc_db -host localhost -port 5432 -u marc -connprops "D:\free\schemaSpyGUI20090302\properties\pgsql.properties" -o "D:\free\schemaSpyGUI20090302\marc_marc_db_"
Failed to query Graphviz version information
with: dot -V
java.io.IOException: Cannot run program "dot": CreateProcess error=2, The system cannot find the file specified
Using database properties:
[D:\free\schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/pgsql.properties
Gathering schema details...
No tables or views were found in schema 'marc'.
The schema does not exist in the database.
Make sure that you specify a valid schema with the -s option and that
the user specified (marc) can read from the schema.
Note that schema names are usually case sensitive.
3 schemas exist in this database.
Some of these "schemas" may be users or system schemas.
information_schema pg_catalog public
These schemas contain tables/views that user 'marc' can see:
information_schema pg_catalE=2og publicI=2
我已经安装Graphviz2.38
如果从 cmd 我输入
C:\Program Files (x86)\Graphviz2.38\bin>dot -V
dot - graphviz version 2.38.0 (20140413.2041)
请帮忙。
更新
根据评论中的建议,我将其添加path\to\Graphviz2.38\bin
到Path
环境变量中,现在我看到以下内容:
This is the command (password not displayed!) SchemaSpyGUI has generated:
java -jar "D:\freelance\db_things\schemaSpy_5.0.0.jar" -dp "C:\Users\redwhite\.m2\repository\postgresql\postgresql\9.0-801.jdbc4\postgresql-9.0-801.jdbc4.jar" -t pgsql -db marc_db -host localhost -port 5432 -u marc -connprops "D:\freelance\db_things\schemaSpyGUI20090302\properties\pgsql.properties" -o "D:\freelance\db_things\schemaSpyGUI20090302\marc_marc_db_"
Using database properties:
[D:\freelance\db_things\schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/pgsql.properties
Gathering schema details...
No tables or views were found in schema 'marc'.
The schema does not exist in the database.
Make sure that you specify a valid schema with the -s option and that
the user specified (marc) can read from the schema.
Note that schema names are usually case sensitive.
4 schemas exist in this database.
Some of these "schemas" may be users or system schemas.
information_schema pg_catalog pg_toast_temp_1 public
These schemas contain tables/views that user 'marc' can see:
informationE=2_sch emapg_catalog publicI=2
我的 shema 看起来像这样:
答案1
我可以通过将 C:\Program Files (x86)\Graphviz2.38\bin 添加到我的“路径”来解决此问题,以便 Java 可以从执行的目录中找到它。