diff --git a/jOOQ-website/download.php b/jOOQ-website/download.php index 46f6d46557..3f0aa49f98 100644 --- a/jOOQ-website/download.php +++ b/jOOQ-website/download.php @@ -8,6 +8,7 @@ function getActiveMenu() { } function printContent() { global $root; + global $version; ?>
@@ -36,7 +38,7 @@ Alternatively, you can create a Maven dependency: <groupId>org.jooq</groupId> <!-- artefacts are jooq, jooq-meta, jooq-codegen --> <artifactId>jooq</artifactId> - <version>2.0.0</version> + <version>=$version?></version> </dependency>
@@ -99,7 +101,8 @@ that looks like this: org.util.[database].[database]Database --> <name>org.jooq.util.mysql.MySQLDatabase</name> - <!-- The database schema (or owner, user, database name) to be generated --> + <!-- The database schema (or in the absence of schema support, in your RDBMS this + can be the owner, user, database name) to be generated --> <inputSchema>guestbook</inputSchema> <!-- All elements that are generated from your schema (several Java regular expressions, separated by comma) @@ -147,14 +150,14 @@ Once you have the JAR files and guestbook.xml in your temp directory, type this (use colons instead of semi-colons on UNIX/Linux systems):
-java -classpath jooq-2.0.0.jar;jooq-meta-2.0.0.jar;jooq-codegen-2.0.0.jar;mysql-connector-java-5.1.18-bin.jar;. org.jooq.util.GenerationTool /guestbook.xml +java -classpath jooq-=$version?>.jar;jooq-meta-=$version?>.jar;jooq-codegen-=$version?>.jar;mysql-connector-java-5.1.18-bin.jar;. org.jooq.util.GenerationTool /guestbook.xml
Note the prefix slash before guestbook.properies. Even though it's in our working directory, we need to prepend a slash, as it is loaded from the classpath. Replace the filenames with your filenames. -In this example, jOOQ 2.0.0 is being used. +In this example, jOOQ =$version?> is being used. If everything has worked, you should see this in your console output:
@@ -247,7 +250,10 @@ public class Main {
e.printStackTrace();
} finally {
if (conn != null) {
- conn.close();
+ try {
+ conn.close();
+ } catch (SQLException ignore) {
+ }
}
}
}
@@ -331,7 +337,7 @@ public class Main {
conn = DriverManager.getConnection(url, userName, password);
GuestbookFactory create = new GuestbookFactory(conn);
- Result result = create.select().from(POSTS).fetch();
+ Result<?> result = create.select().from(POSTS).fetch();
for (Record r : result) {
Long id = r.getValue(POSTS.ID);
@@ -344,7 +350,10 @@ public class Main {
e.printStackTrace();
} finally {
if (conn != null) {
- conn.close();
+ try {
+ conn.close();
+ } catch (SQLException ignore) {
+ }
}
}
}