In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
In this issue, the editor will bring you a dockerfile about how to set up a docker image in openoffice. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
FROM centos:7.7.1908RUN yum-y install wget & &\ mv / etc/yum.repos.d/CentOS-Base.repo / etc/yum.repos.d/CentOS-Base.repo.backup & &\ wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo & &\ yum clean all & &\ yum makecacheADD. / jdk-8u212-linux-x64.tar.gz / usr/local/ENV JAVA _ HOME/ usr/local/jdk1.8.0_212ENV JRE_HOME/ usr/local/jdk1.8.0_212/jreENV PATH $JAVA_HOME/bin:$JRE_HOME/bin:$PATHADD. / Apache_OpenOffice_4.1.10_Linux_x86-64_install-rpm_zh-CN.tar.gz / tmp/Apache_OpenOffice_4.1.10_Linux_x86-64_install-rpm_zh-CNRUN cd / tmp & &\ yum install- y / tmp/Apache_OpenOffice_4 .1.10_Linux_x86-64_install-rpm_zh-CN/zh-CN/RPMS/*.rpm & &\ yum install- y / tmp/Apache_OpenOffice_4.1.10_Linux_x86-64_install-rpm_zh-CN/zh-CN/RPMS/desktop-integration/openoffice4.1.10-redhat-menus-4.1.10-9807.noarch.rpmRUN yum install- y libXext.x86_64 & &\ yum install- y gcc & &\ yum install -y gcc-c++ & &\ yum install-y freetype-devel & &\ yum install-y glib2-devel & &\ yum install-y cairo-develADD. / fonts/ usr/share/fontsRUN cd / usr/share/fonts/ & &\ chmod-R 755 / usr/share/fonts & &\ yum install-y mkfontscale & &\ yum install-y fontconfig & &\ mkfontscale & &\ mkfontdir & &\ fc-cache-fvRUN yum groupinstall-y "X Window System "RUN yum-y install net-tools# exposure Interface EXPOSE 8100 # Startup Service Occupy port 8100 CMD / opt/openoffice4/program/soffice-headless-accept= "socket,host=0.0.0.0,port=8100 Urp; "- nofirststartwizard
Example of file format conversion by connecting java to openoffice:
Maven dependence
Com.artofsolving jodconverter 2.2.1 org.openoffice jurt 3.0.1 org.openoffice ridl 3.0.1 org.openoffice juh 3.0.1 Org.openoffice unoil 3.0.1 org.slf4j slf4j-jdk14 1.4.3
Java code implementation
Package openofficetest;import com.artofsolving.jodconverter.DocumentConverter;import com.artofsolving.jodconverter.openoffice.connection.OpenOfficeConnection;import com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection;import com.artofsolving.jodconverter.openoffice.converter.StreamOpenOfficeDocumentConverter;import com.sun.star.frame.XComponentLoader;import java.io.File;import java.net.ConnectException / * @ author pxu * @ create 2021-05-19 15:25 * / public class Main {public static void main (String [] args) {File srcFile = new File ("E:\ tmp\\ access_2013_05_30.csv"); File outFile = new File ("E:\ tmp\\ access_2013_05_30.xls"); convert (srcFile,outFile) } public static void convert (File sourceFile, File targetFile) {OpenOfficeConnection connection = null; try {connection = new SocketOpenOfficeConnection ("172.25.2.168", 8100); connection.connect (); DocumentConverter converter = new StreamOpenOfficeDocumentConverter (connection); converter.convert (sourceFile,targetFile) } catch (ConnectException e) {e.printStackTrace ();} finally {if (connectionless null) connection.disconnect ();} this is how to create the dockerfile of docker image in openoffice shared by Xiaobian. If you happen to have similar doubts, please refer to the above analysis. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.