Skip to content

Instantly share code, notes, and snippets.

@cwchien
cwchien / register_jdk7_for_update_alternatives.sh
Last active January 6, 2023 19:42
script for registering JDK7 to update-alternatives in Debian's way
#!/bin/bash
# "Register JDK7 for update-alternatives Script in Debian Way"
# Based on 1. codeslinger's "install_java7_alternatives" from https://gist.github.com/445930
# 2. sun-java6-plugin.deb postint script (for plugin)
# Modified by Cheng-Wei Chien<e.cwchien@gmail.com>, 2012-08-16
# ------------------------------------------------------------------------------
# Note: This script works on x86/amd64 Debian GNU/Linux|Ubuntu.
# If you use other arch or distro, you may have to modify some parameters.
#
# Usage: 1. Extract jdk7 tar.gz to, for example, /usr/lib/jvm/java-7-sun-1.7.0.13,
@cwchien
cwchien / java-7-sun.jinfo
Last active January 6, 2023 19:43
jdk7 jinfo file modified from /usr/lib/jvm/.java-6-sun.jinfo on Debian GNU/Linux (amd64 version)
name=java-7-sun-1.7.0.13
alias=java-7-sun
priority=73
section=non-free
jre ControlPanel /usr/lib/jvm/java-7-sun/jre/bin/ControlPanel
jre java /usr/lib/jvm/java-7-sun/jre/bin/java
jre java_vm /usr/lib/jvm/java-7-sun/jre/bin/java_vm
jre javaws /usr/lib/jvm/java-7-sun/jre/bin/javaws
jre jcontrol /usr/lib/jvm/java-7-sun/jre/bin/jcontrol