使用jxbrower报错,原因时证书检验失败,

解决方案:

1.首先创建证书,下面是我在IDEA maven项目中创建的位置,Java项目中在src/目录下创建,

META-INF/teamdev.licenses

Product: JxBrowser
Version: 6.x
Licensed to:POPK
License type: Enterprise
License info: JxBrowser License
Expiration date: 01-01-9999
Support expiration date: NO SUPPORT
Generation date: 01-01-1970
Platforms: win32/x86;win32/x64;mac/x86;mac/x64;linux/x86;linux/x64
Company name: TeamDev Ltd.
SigB: 1
SigA: 1

2.添加静态代码

static {
try {
Field e = aq.class.getDeclaredField("e");
e.setAccessible(true);
Field f = aq.class.getDeclaredField("f");
f.setAccessible(true);
Field modifersField = Field.class.getDeclaredField("modifiers");
modifersField.setAccessible(true);
modifersField.setInt(e, e.getModifiers() & ~Modifier.FINAL);
modifersField.setInt(f, f.getModifiers() & ~Modifier.FINAL);
e.set(null, new BigInteger("1"));
f.set(null, new BigInteger("1"));
modifersField.setAccessible(false);
} catch (Exception e1) {
e1.printStackTrace();
}
}
可以将静态代码段添加在项目启动处
此代码针对jxbrowser-win-6.6.jar版本,原理就是通过反射来修改字段,使验证通过,(不同版本需反射的类不同,)。



Caused by: java.lang.RuntimeException: JxBrowser license check failed: No valid license found的更多相关文章

  1. sqoop导出hive数据到mysql错误: Caused by: java.lang.RuntimeException: Can't parse input data

    Sqoop Export数据到本地数据库时出现错误,命令如下: sqoop export \ --connect 'jdbc:mysql://202.193.60.117/dataweb?useUni ...

  2. Caused by: java.lang.RuntimeException: java.io.IOException: invalid constant type: 18

    工程启动的时候有报下面这个错误的,更新下工程的jar包依赖,然后在工程的pom文件里加上下面的jar包 Caused by: java.lang.RuntimeException: java.io.I ...

  3. hive Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

    Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata. ...

  4. Caused by: java.net.ConnectException: Connection refused/Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    1.使用sqoop技术将mysql的数据导入到Hive出现的错误如下所示: 第一次使用命令如下所示: [hadoop@slaver1 sqoop--cdh5.3.6]$ bin/sqoop impor ...

  5. ambari-server启动出现Caused by: java.lang.RuntimeException:java.lang.ClassNotFoundEception:com.mysql.jdbc.Driver问题解决办法(图文详解)

    不多说,直接上干货! 问题详解 启动ambari-server出现 Caused by: java.lang.RuntimeException:java.lang.ClassNotFoundEcept ...

  6. RxVolley报错:Caused by: java.lang.RuntimeException: RequestQueue-> DiskBasedCache cache dir error

    Caused by: java.lang.RuntimeException: RequestQueue-> DiskBasedCache cache dir error 这是因为SD卡动态权限导 ...

  7. Caused by: java.lang.RuntimeException: by java.lang.OutOfMemoryError: PermGen space(tomcat 启动时提示内存溢出)

    设置MaxPermSize大小TOMCAT_HOME/bin/catalina.bat 文件头加set JAVA_OPTS='-Xms512m -Xmx1024m -XX:MaxPermSize=51 ...

  8. cxf之Caused by: java.lang.RuntimeException: Soap 1.1 endpoint already registered on address /rest

    发布rest服务 但是spring-cxf-rest.xml中配置的却是 <jaxws:server address="/weather".................. ...

  9. Android Studio 导入应用时报错 Error:java.lang.RuntimeException: Some file crunching failed, see logs for details

    在app文件夹的build.gradle里加上 android { ...... aaptOptions.cruncherEnabled = false aaptOptions.useNewCrunc ...

随机推荐

  1. CF 1477A. Nezzar and Board

    传送门 思路: 从k = 2 * x - y ==> 2 * x = k + y ,可以看出x是k,y的中间值,则如果存在x1,x2,且x1 = x2 ± 1,则通过x1,x2可以得到所有整数, ...

  2. element-ui dialog loading

    element-ui dialog loading 指令方式 服务方式 v-loading 当使用指令方式时,全屏遮罩需要添加fullscreen修饰符(遮罩会插入至 body 上),此时若需要锁定屏 ...

  3. How to get a DOM element's ::before content with JavaScript?

    How to get a DOM element's ::before content with JavaScript? https://stackoverflow.com/questions/443 ...

  4. js destructuring assignment bug

    js destructuring assignment bug https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Op ...

  5. web performance optimise & css

    web performance optimise & css 俄罗斯套娃 clients hints https://cloudinary.com/blog/automatic_respons ...

  6. python中yaml模块的使用

    1.yaml库的导入 经过尝试,发现在python2 和python3语言环境下,安装yaml库的命令行语句不一样. python2: pip install yaml python3:pip ins ...

  7. RecycleView 点击事件监听

    1.定义RecycleView 监听接口类 1 package com.example.*****; 2 3 import android.view.View; 4 5 public interfac ...

  8. epoll使用

    epoll通过下面3个epoll系统调用为用户提供服务. (1)epoll_create系统调用 epoll_create在C库中的原型如下: int epoll_create(int size); ...

  9. js 一元运算符

    一元运算符还有一个常用的用法就是将自执行函数的function从函数声明变成表达式. 常用的有 + - - ! void + function () { } - function () { } ~ f ...

  10. 鸿蒙开源第三方组件——进度轮ProgressWheel

    目录:1.前言2.背景3.组件功能展示4.Sample解析5.Library解析6.作者系列文章合集 前言 基于安卓平台的进度轮组件ProgressWheel(https://github.com/A ...