Updating Simple API demo
diff --git a/content/odftoolkit/simple/gettingstartguide.mdtext b/content/odftoolkit/simple/gettingstartguide.mdtext
index b6ce116..8bc9115 100644
--- a/content/odftoolkit/simple/gettingstartguide.mdtext
+++ b/content/odftoolkit/simple/gettingstartguide.mdtext
@@ -7,21 +7,19 @@
**Prerequisites**
-Simple ODF is written in Java, so you will need to have Java 1.5 or above installed on your system. Make sure you download the SDK (software development kit), not just the runtime version of Java.
+Simple ODF is written in Java, so you will need to have Java 1.6 or above installed on your system. Make sure you download the SDK (software development kit), not just the runtime version of Java.
-In this tutorial, you can build and run the application from the command line or IDE, such as Eclipse. Anyway, you need to download the following three jars, store them in the "lib" directory and add them into the classpatch.
+In this tutorial, you can build and run the application from the command line or IDE, such as Eclipse or Netbeans.
+Anyway, all required jars, are stored within the "lib" directory of the demo bundle and needed to be added to the classpath.
+A JAR with all dependencies had been included as download within [the resource file][2] of this demo.
- 1. [Simple ODF 0.6.6][2].
- 2. [ODFDOM 0.8.7][3].
- 3. The Apache Xerces 2.9.1 or higher version (download from [Apache
- Xerces][4] web site).
+NOTE: The latest version of this all-inclusive-JAR can be received after building the Simple ODF project. This will be JAR within the 'target' directory embracing all required JARs.
-In addition, you need to download [the resource file][5] of this demo.
**Code**
-We write all of the code needed to create the document in the HelloWorld class. For simplicity, the code is wrapped in main method directly, package declaration is omitted and hard code is also included in this program.
-
+We write all of the code needed to create the document in the HelloWorld class. For simplicity, the code is wrapped in main method directly, package declaration is omitted and hard code is also included in this program.
+
import java.net.URI;
@@ -35,24 +33,24 @@
TextDocument outputOdt;
try {
outputOdt = TextDocument.newTextDocument();
-
+
// add image
outputOdt.newImage(new URI("odf-logo.png"));
-
+
// add paragraph
outputOdt.addParagraph("Hello World, Hello Simple ODF!");
-
+
// add list
outputOdt.addParagraph("The following is a list.");
List list = outputOdt.addList();
String[] items = {"item1", "item2", "item3"};
list.addItems(items);
-
+
// add table
Table table = outputOdt.addTable(2, 2);
Cell cell = table.getCellByPosition(0, 0);
cell.setStringValue("Hello World!");
-
+
outputOdt.save("HelloWorld.odt");
} catch (Exception e) {
System.err.println("ERROR: unable to create output file.");
@@ -60,7 +58,7 @@
}
}
-The TextDocument class has these convenient methods:
+The TextDocument class has these convenient methods:
// Creates a new text document that contains an empty paragraph.
TextDocument.newTextDocument();
@@ -72,24 +70,21 @@
TextDocument.addList()
// Creates a new table with columnCount columns and rowCount rows. You can get the cell at given position and set its content.
TextDocument.addTable(int columnCount, int rowCount);
- // Saves the document at the given path.
+ // Saves the document at the given path.
TextDocument.save(String path)
**Building and Running**
-If you use Eclipse, you can just run this class as a Java Application. If you use command line, please complie code and run it with the following commands:
+If you use an IDE, you can just run this class as a Java Application. If you use command line, you may compile the code and run it with the following commands:
- javac -cp lib/odfdom-java-0.8.7.jar:lib/simple-odf-0.6.6.jar HelloWorld.java
- java -cp lib/odfdom-java-0.8.7.jar:lib/simple-odf-0.6.6.jar:lib/xercesImpl.jar:. HelloWorld
+ javac -cp lib/simple-odf-0.8.2-incubating-jar-with-dependencies.jar:. HelloWorld.java
+ java -cp lib/simple-odf-0.8.2-incubating-jar-with-dependencies.jar:. HelloWorld
**Getting the Files**
-You can download the code and resources of this demo from [here][5].
+You can download the code and resources of this demo from [here][2].
-
+
[1]: helloworld.png
- [2]: http://odftoolkit-extra.apache-extras.org.codespot.com/files/simple-odf-0.6.6.jar
- [3]: http://odftoolkit-extra.apache-extras.org.codespot.com/files/odfdom-0.8.7.jar
- [4]: http://xerces.apache.org/mirrors.cgi
- [5]: helloworld.zip
\ No newline at end of file
+ [2]: helloworld.zip
diff --git a/content/odftoolkit/simple/helloworld.zip b/content/odftoolkit/simple/helloworld.zip
index ce493a1..eb74e8a 100644
--- a/content/odftoolkit/simple/helloworld.zip
+++ b/content/odftoolkit/simple/helloworld.zip
Binary files differ