5 Replies Latest reply on Apr 14, 2009 3:43 AM by itsme

    How to add additional jar files path into jboss classpath in

      Greetings,

      currently i'm doing development using jboss 4.0.3

      I need to open up open office document while running applications on the jboss.
      I have google online that open office jars are require when booting up the jboss server to load the open office libraries.

      Therefore i open up the file run.sh in the bin folder but due to the fact that i still new in linux and .sh files, i need help on where and how to add the jar paths of the openoffice in the .sh file.

      These are the paths which i need to include in the run.sh when booting up the jboss:

      /opt/openoffice.org/ure/share/java/java_uno.jar
      /opt/openoffice.org/ure/share/java/juh.jar
      /opt/openoffice.org/ure/share/java/jurt.jar
      /opt/openoffice.org/ure/share/java/ridl.jar
      /opt/openoffice.org/ure/share/java/unoloader.jar

      Thanks in advance for the advice given :)

        • 1. Re: How to add additional jar files path into jboss classpat
          peterj

          The best place to put these JAR files is into your applications package. For example if your application is packaged as a WAR file, place them in WEB-INF/lib within your WAR. If your package is an EAR, place them in the base directory of the EAR and reference them in your META-INF/application.xml file.

          Another alternative is to add them to the server/xxx/lib directory.

          • 2. Re: How to add additional jar files path into jboss classpat

             

            The best place to put these JAR files is into your applications package. For example if your application is packaged as a WAR file, place them in WEB-INF/lib within your WAR. If your package is an EAR, place them in the base directory of the EAR and reference them in your META-INF/application.xml file.


            Yeap.. This is what i'm doing. I put them into the WEB-INF/lib directory. But its is not working due to the open office nature.

            I google and have read at the open office wiki. It seems that for java web applications to open and read the open office applications, it need to reference to the installation path of the open office jar files in my machine instead of the lib files in WEB-INF/lib.

            Therefore to read the openoffice, during the boot time, i need to add in the jar paths of the open office when i start the server.

            Any advice on how to add the path in the run.sh file?

            Thanks

            • 3. Re: How to add additional jar files path into jboss classpat
              peterj

              Try this. Before running run.sh, do this:

              export JBOSS_CLASSPATH=/opt/openoffice.org/ure/share/java/java_uno.jar:...:/opt/openoffice.org/ure/share/java/unoloader.jar

              I didn't include all of the JARs, but that should give you and idea.

              If that works, look for the first use of JBOSS_CLASSPATH in run.sh and add the above line (without the 'export') just before it.

              • 4. Re: How to add additional jar files path into jboss classpat

                Hi peter, thanks for the help... :)

                • 5. Re: How to add additional jar files path into jboss classpat
                  itsme

                  Another way would be using the bootstrapconnector. Search the web for bootstrapconnector.jar.