This discussion is archived
2 Replies Latest reply: Oct 14, 2011 7:14 AM by shakir.gusaroff RSS

Displaying Open Office word doc in browser using JavaFX

894508 Newbie
Currently Being Moderated
My requirement is to display open office doc in my application for modification
  • 1. Re: Displaying Open Office word doc in browser using JavaFX
    805536 Journeyer
    Currently Being Moderated
    A Google search reveals this library for writing the files:

    But I very much doubt there is anything out there to render it in JavaFX, so you will have to write the UI on your own.
  • 2. Re: Displaying Open Office word doc in browser using JavaFX
    shakir.gusaroff Expert
    Currently Being Moderated
    Hi. The following works for Microsoft Word docs and Notepad.
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.stage.Stage;
     * @author gusaros
    public class OpenOffice extends Application {
         * @param args the command line arguments
        public static void main(String[] args) {
        public void start(Stage primaryStage) {
            primaryStage.setTitle("Hello World");
            Group root = new Group();
            Scene scene = new Scene(root, 300, 250);
            Button btn = new Button();
            btn.setText("Hello World");
            btn.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                    String[] cmdArray = {"cmd", "/c", "start", "c:\\fdres.doc"};
                    try {
                    } catch (Exception s) {


  • Correct Answers - 10 points
  • Helpful Answers - 5 points