OpenJDK

How to deserialize object in OpenJDK (Android 7+), which has been serialized in Apache Harmony (Android *-6)?

大憨熊 提交于 2019-12-19 03:58:56
问题 My app uses http://prevayler.org/ for persistence, piggybacking Java Object serialization. After upgrade to Android 7.0 (Nougat) users cannot open their data, since the deserialization does not work any more: java.io.StreamCorruptedException: invalid type code: 71 at java.io.ObjectInputStream.readString(ObjectInputStream.java:1647) at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:1737) ... at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373) at org.prevayler

How to compile an OpenJDK 7 debug build on Ubuntu 11.10

六月ゝ 毕业季﹏ 提交于 2019-12-18 12:44:08
问题 Where can I find a simple set of instructions to compile an OpenJDK 7 debug build on Ubuntu 11.10 (Oneiric)? A debug build would make more JVM options available for troubleshooting purposes; for example, WizardMode . The developers' guide and build README have a lot of noise and are hard to follow. 回答1: Install relevant packages: sudo apt-get install ant build-essential openjdk-6-jdk sudo apt-get build-dep openjdk-6-jdk Find the master OpenJDK Mercurial repository you want to start from.

linux安装openjdk1.8

不羁岁月 提交于 2019-12-18 12:03:08
1、 使用yum查找jdk yum search java|grep jdk [root@node1 ~]# yum search java|grep jdk ldapjdk-javadoc.noarch : Javadoc for ldapjdk java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment java-1.7.0-openjdk-accessibility.x86_64 : OpenJDK accessibility connector java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos java-1.7.0

Is it safe to distribute tools.jar along with a Java application bundle?

蓝咒 提交于 2019-12-18 08:58:36
问题 Although tools.jar is not a component in JRE, but it comes with all major implementations of JDK such as Oracle JDK and OpenJDK. Not being standard component of JRE means that when I distribute a Java application which uses tools.jar , I have to distribute it along with the application bundle OR include it in classpath. My questions are: Does tools.jar contain platform-dependent components that prevent it from being distributed across different platforms (Windows/Linux/OSX)? We already know

tomcat错误This is very likely to create a memory leak

倖福魔咒の 提交于 2019-12-18 07:53:44
现象:最近时间出现了两次tomcat无法响应,重启就恢复正常。经查看日志,有几处可疑点。 下面是查找此问题用到的工具和方法和大家共享。 阿里云centos目前安装的是openjdk,先执行whereis java查看目录,找到bin文件java.exe同个目录发现没有,安装openjdk-devel 执行yum install java-1.7.0-openjdk-devel,安装后java文件夹有调试工具。安装运行jmap出错 Caused by: java.lang.RuntimeException: unknown CollectedHeap type : class sun.jvm.hotspot.gc_interface.CollectedHeap 这个是需要下载 openjdk-debuginfo包 https://www.rpmfind.net/linux/rpm2html/search.php?query=java-1.8.0-openjdk-debuginfo,安装包安装后还是出现的话,一般是版本不一致导致的。 jdk工具之jps jps主要用来输出JVM中运行的进程状态信息 jdk工具之jstack jstack主要用来查看某个Java进程内的线程堆栈信息。jstack可以定位到线程堆栈,根据堆栈信息我们可以定位到具体代码,所以它在JVM性能调优中使用得非常多。

When is a Java Class loaded?

让人想犯罪 __ 提交于 2019-12-18 04:07:57
问题 I searched the internet for more than couple of hours and could not reach any conclusion. Recently I decided to use BouncyCastle for SSL but I wanted it to off by default, so that BouncyCastle jar may not be in the class path. private void enableBouncyCastleForSSL() { if (config.isBouncyCastleEnabled()) { Security.insertProviderAt(new BouncyCastleProvider(), 1); } } Even when config is disabled, it was looking for BouncyCastle and it failed with class loader error. java.lang

GitLab+Jenkins+Ansible

会有一股神秘感。 提交于 2019-12-18 03:59:28
本文章针对个人使用记录请知悉 平台:Centos7.0 Jenkins下载路径: jenkins-2.89.4-1.1.noarch.rpm GitLab下载路径: gitlab-ce-10.6.6-ce.0.el7.x86_64.rpm 注意: 1、安装GitLab时内存不可少于2G 2、关闭防火墙和Selinux(如果公司有防火墙要求则可以自行配置开放GitLab服务端口) 3、此文档不讲Ansible安装方法和使用方法。 可配置阿里源(可选操作): wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 一、安装GitLab 1、安装依赖 yum install -y curl openssh-server openssh-clients postfix cronie policycoreutils-python 2、设置邮件服务开机启动 本次配置这个是因为后续操作更新什么的可以邮件通知systemctl start postfix systemctl enable postfix 3、安装GitLab的RPM包(在上面已提供下载RPM包地址) (在rpm所在目录下执行)rpm -ivh gitlab-ce-10.0.2-ce.0.el7.x86_64.rpm

Where can I find the JDK 8/JavaFX 8 source code? [closed]

爱⌒轻易说出口 提交于 2019-12-17 19:57:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I would like to override the Implementation of FXMLLoader and recompile the JDK 8. Where can I find the source code of the JDK8 / JavaFX 8 ? 回答1: The source for JavaFX 8 is available at: http://hg.openjdk.java.net/openjfx/8/master/rt JavaFX 8 is almost completely open source today. Instructions for building

How to compile mavenized OSGi 4.3 bundle with OpenJDK 7?

ⅰ亾dé卋堺 提交于 2019-12-17 19:39:58
问题 i am trying to compile my OSGi bundle against OSGi specification 4.3 using OpenJDK7 but i am getting error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project example: Compilation failure [ERROR] /tmp/baka/example/src/main/java/org/example/Activator.java:[14,24] error: type ServiceReference does not take parameters here is my Activator.java: package org.example; import org.osgi.framework.BundleActivator; import org.osgi

AWS 推出长期支持的 OpenJDK 免费分发版本 —— Amazon Corretto

大憨熊 提交于 2019-12-17 18:35:14
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 简评:听说 Oracle JDK 要收费了,Oracle 要限制 Java 的商业或生产用途,针对这个问题,AWS 将会推出 Amazon Corretto。 Java 是 AWS 用户使用的最流行的编程语言之一,亚马逊一直致力于支持 Java 并使其保持免费,但是许多用户担心他们必须要支付 Java 的长期支持版本的费用才能运行他们的 Workload 。作为第一步,亚马逊最近 重申了在 Amazon Linux 中对 Java 的长期支持 ,但是,亚马逊的用户(和更广泛的 Java 社区)在包括 AWS 的各种平台上运行 Java,因此亚马逊宣布发布 Amazon Corretto 的预览版,这是一个免费的、多平台支持的,可生产的 OpenJDK 分发版。 亚马逊在使用 Java 方面有着悠久而深厚的历史,我很高兴看到我们内部 Java 团队的工作在全世界范围内可用。 —— James Gosling James Gosling(詹姆斯·高斯林,Java 之父) Corretto 支持多种平台,可以在云端、本地和本地计算机上运行。目前,亚马逊 Linux 2、Microsoft Windows、macOS 平台和 Docker 镜像都提供了与 OpenJDK 8 对应的 Corretto 8 预览版