Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用exec发出不同输出的同一命令_Java_Apache_Centos6_Apache Tika - Fatal编程技术网

Java 使用exec发出不同输出的同一命令

Java 使用exec发出不同输出的同一命令,java,apache,centos6,apache-tika,Java,Apache,Centos6,Apache Tika,我正在从一台服务器迁移到另一台服务器,看到同一个exec命令提供不同的输出。我不确定需要检查和确保什么,以便看到一致的输出 Example of the command that is executed: java -jar /var/www/html/PhpTikaWrapper-master/vendor/tika-app-1.5.jar -m one.jpg 1) 服务器1(这是我想要的) 服务器2(这是我在新服务器中得到的): 两台服务器上的Java版本相同,如下所示 java

我正在从一台服务器迁移到另一台服务器,看到同一个exec命令提供不同的输出。我不确定需要检查和确保什么,以便看到一致的输出

Example of the command that is executed:



java -jar /var/www/html/PhpTikaWrapper-master/vendor/tika-app-1.5.jar -m one.jpg
1) 服务器1(这是我想要的)

服务器2(这是我在新服务器中得到的):

两台服务器上的Java版本相同,如下所示

java version "1.7.0_141"
OpenJDK Runtime Environment (rhel-2.6.10.1.el6_9-x86_64 u141-b02)
OpenJDK 64-Bit Server VM (build 24.141-b02, mixed mode)
此外,该命令不会返回新服务器上的宽度


任何帮助都将不胜感激。谢谢。

我已经确定了这个问题,实际上apache tikka为提供的不同文件类型提供了不同的响应格式

对于JPEG,我们将得到不同的响应,对于png,我们将得到不同的响应,正如我上面所说的


希望这能为将来节省一些时间

您是否在这两个计算机上都安装了
exiftool
Array
(
    [0] => Comments: Lavc56.5.100
    [1] => Component 1: Y component: Quantization table 0, Sampling factors 2 horiz/2 vert
    [2] => Component 2: Cb component: Quantization table 0, Sampling factors 1 horiz/1 vert
    [3] => Component 3: Cr component: Quantization table 0, Sampling factors 1 horiz/1 vert
    [4] => Compression Type: Baseline
    [5] => Content-Length: 25259
    [6] => Content-Type: image/jpeg
    [7] => Data Precision: 8 bits
    [8] => Image Height: 840 pixels
    [9] => Image Width: 840 pixels
    [10] => Jpeg Comment: Lavc56.5.100
    [11] => Number of Components: 3
    [12] => Resolution Units: none
    [13] => X Resolution: 1 dot
    [14] => Y Resolution: 1 dot
    [15] => comment: Lavc56.5.100
    [16] => resourceName: ankita2_comp.jpg
    [17] => tiff:BitsPerSample: 8
    [18] => tiff:ImageLength: 840
    [19] => tiff:ImageWidth: 840
    [20] => w:comments: Lavc56.5.100
)
java version "1.7.0_141"
OpenJDK Runtime Environment (rhel-2.6.10.1.el6_9-x86_64 u141-b02)
OpenJDK 64-Bit Server VM (build 24.141-b02, mixed mode)