linux环境下编译不成功
来源:互联网 发布:淘宝客机器人免费安装 编辑:程序博客网 时间:2024/05/01 15:29
zxing_test/Test.java:12: package com.google.zxing.client.j2se does not exist
import com.google.zxing.client.j2se.*;
^
warning: com/google/zxing/BarcodeFormat.class(com/google/zxing:BarcodeFormat.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/BinaryBitmap.class(com/google/zxing:BinaryBitmap.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/DecodeHintType.class(com/google/zxingecodeHintType.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/LuminanceSource.class(com/google/zxing:LuminanceSource.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/MultiFormatReader.class(com/google/zxing:MultiFormatReader.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/MultiFormatWriter.class(com/google/zxing:MultiFormatWriter.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/Reader.class(com/google/zxing:Reader.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/ReaderException.class(com/google/zxing:ReaderException.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/Result.class(com/google/zxing:Result.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/common/BitMatrix.class(com/google/zxing/common:BitMatrix.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/common/HybridBinarizer.class(com/google/zxing/common:HybridBinarizer.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
error: Class names, 'javase.jar', are only accepted if annotation processing is explicitly requested
zxing_test/Test.java:38: cannot find symbol
symbol : variable MatrixToImageWriter
location: class zxing_test.Test
MatrixToImageWriter.writeToFile(byteMatrix, "png", file);
^
zxing_test/Test.java:57: cannot find symbol
symbol : class BufferedImageLuminanceSource
location: class zxing_test.Test
LuminanceSource source = new BufferedImageLuminanceSource(image);
^
warning: com/google/zxing/common/GlobalHistogramBinarizer.class(com/google/zxing/common:GlobalHistogramBinarizer.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: com/google/zxing/Binarizer.class(com/google/zxing:Binarizer.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
Note: zxing_test/Test.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
13 warnings
[hadoop@hd2-single 01]$ ls
com core.jar javase.jar META-INF zxing_test zxing_test.compiled.zip zxing_test.jars.zip zxing_test.src.zip
[hadoop@hd2-single 01]$
我在linux环境下怎么就是编译不成功啊?
编码问题我已经在努力克服了,转utf-8,unicode都试了,无BOM也试了啊。
结果发现:
linux下注意几点:
jdk版本一定要1.7以上,我是1.8.05;
一定要加上 -cp 参数和当前路径;
===我的操作结果如下:
[hadoop@hd2-single 01]$ java -cp *.jar:. zxing_test.Test
java -cp core.jar;javase.jar;zxing_test.jar Test param1 param2
param1: 二维码图片需要包含的文字信息
param2: 二维码图片输出路径
[hadoop@hd2-single 01]$ ls
a.png com core.jar javase.jar META-INF zxing_test zxing_test.compiled.zip zxing_test.jar zxing_test.jars.zip zxing_test.src.zip
[hadoop@hd2-single 01]$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
[hadoop@hd2-single 01]$ java -cp *.jar:. zxing_test.Test aaaaaaaaaaaaaaaaaaaaaaaaaaaa a.png
成功生成二维码
- linux环境下编译不成功
- linux环境下编译 fbreader
- Linux环境下编译CLucene
- linux下编译ffmpeg环境
- linux环境下编译C
- windows下caffe编译不成功问题分析
- 编译不成功
- linux 环境下 G++编译cpp文件
- Linux下建立交叉编译环境
- Linux环境下的程序编译
- 在Linux x86_64环境下编译memcached
- linux环境下编译 jrtplib 和 jthread
- linux下搭建unix编译环境
- windows下类似linux编译环境搭建
- Linux下交叉编译环境构建
- Linux环境下编译运行程序
- 在linux下建立交叉编译环境
- linux环境下mo编译与反编译
- 1.linux中允许数据库远程连接的命令是:
- linux系统之间互相复制文件
- eclipse经常报内存不足的原因
- 动态规划题目思路
- netstat命令详解
- linux环境下编译不成功
- 从头到尾彻底理解KMP(2014年8月22日版)
- iOS开发之使用系统库CoreLocation实现定位功能
- shell脚本的特殊字符
- JavaScript正则表达式匹配常用格式
- Android 重写Seekbar
- LeetCode之Symmetric Tree
- LeetCode 26 Remove Duplicates from Sorted Array (C,C++,Java,Python)
- Linux使用技巧