Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Have You succeeded in running Britannica on Linux? There a page about that - but I can't make it work. Nor it works through the wine.

Edit 2:

My Britannica DVD is 2011 one. In the page linked above - there are a perl script for 2004 version of Britannica.

I'm on Kubuntu 11.04

 java -version 

gives:

java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) 

I also tried following that page with no luck. And also commented the check of britannica version. Original script gave me errors at line 102. So I added these lines

print "product_id is ", $product_id, "\n";
print "BCDDIR is ", $BCDDIR, "\n";
print "product_jar is ", $product_jar, "\n";

for debug purposes. Now the script is:

#!/usr/bin/perl -X
#
# Copyright (C) 2004 Encyclopaedia Britannica, Inc.
#
# Perl script to install and run any single disc,
# 2004 Encyclopaedia Britannica product on a modern
# Linux installation. 
#
# This Perl script, including the source code, documentation
# and related data, is placed into the public domain.
#
# The original author is Benjamin Gimpert.
# Modifications by Brian Schultz and Kevin Boers.
#
# THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY
# OF ANY KIND, NOT EVEN THE IMPLIED WARRANTY OF
# MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE,
# ASSUMES _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE
# RESULTING FROM THE USE, MODIFICATION, OR
# REDISTRIBUTION OF THIS SOFTWARE.
#
# For more information, contact:
#
#     Encyclopaedia Britannica, Inc.
#     Attn: Software Development
#     310 South Michigan Ave
#     Chicago, IL 60604, U.S.A.
#     http://support.britannica.com/
#

#
# KNOWN BUGS
# - many Java VM messages of the form "Font specified in font.properties not
#   found", fixed by replacing your .../jdk/jre/lib/font.properties with:
#       http://java.sun.com/j2se/1.3/font.properties
# - preferences must be edited manually under:
#       ~/britannica/[product]/conf/[user].[product].preferences.properties
# - on the first .show(), marketing dialogs are too small
#

$ENV{JAVA_HOME} = "/usr";

print "Enter location of the Britannica Software:";
my $input = <STDIN>;
chomp ($input);
if ($input)
        {
        $BCDDIR = $input;
        }
else 
        {
        $BCDDIR = ("/home/boris/virtual-drives/1");
        }

my %PRODUCTS = (
    'Children\'s Edition CD', 'BcdChildApp.jar',
    'Concise CD', 'BcdConciseApp.jar',
    'Britannica Deluxe Edition 2004', 'BcdDeluxe.jar',
    'Homework Essential', 'BcdKids.jar',
    'Ready Reference CD', 'BcdReadyRefApp.jar',
    'Britannica Standard Edition 2004', 'BcdStandard.jar',
    'Homework Essential Plus', 'BcdStudent.jar',
    'Ultimate Reference Suite', 'URSApp.jar',
    'Ultimate Reference Suite CD-ROM', 'URSCDApp.jar',
);

my $start_dir = `pwd`;
chomp($start_dir);
#eval <<'EOF_CHDIR_EVAL';
print "Changing to home directory...";
chdir or die "\n  failed";
print " done\n";
if (! (-e 'britannica')) {
    print "Making work directory ~/britannica/...";
    mkdir('britannica') or die "\n  failed";
    print " done\n";
}
print "Changing to work directory...";
chdir('britannica') or die "\n  failed";
print " done\n";

print "Searching for product JAR...";
my $product = '';
open (AUTORUN_INF, "< $BCDDIR/autorun.inf") or die "\n  failed";
while (<AUTORUN_INF>) {
    chomp;
    $product = $1 if (/^value=([^\n\r]*)/);
}
close (AUTORUN_INF) or die "\n  failed";
my $product_jar = $PRODUCTS{$product};
# die "\n  failed" if ($product_jar eq '');
print " found \"$product_jar\"\n";

print "Searching for default preferences file name in product JAR...";
`$ENV{JAVA_HOME}/bin/jar tf $BCDDIR/jars/$product_jar` =~ /^(\w+)\.preferences\.properties\.default/m;
my $product_id = $1;
my $default_preferences_file = $product_id . '.preferences.properties.default';
print " found \"$default_preferences_file\"\n";

print "product_id is ", $product_id, "\n";
print "BCDDIR is ", $BCDDIR, "\n";
print "product_jar is ", $product_jar, "\n";

if (! (-e $product_id)) {
    print "Making a work directory for this product...";
    mkdir($product_id) or die "\n  failed";
    print " done\n";
}
print "Changing to work directory for this product...";
chdir($product_id) or die "\n failed";
print " done\n";

print "Checking for version 1.3 of the Java VM...";
die "\n  failed" if (! (-e $ENV{JAVA_HOME}));
my $java_version_string = `$ENV{JAVA_HOME}/bin/java -version 2>&1`;
$java_version_string =~ /java version \"([0-9\._]+)\"/;
my $java_version = $1;
# die "\n  failed, found \"$java_version\"" if (! ($java_version =~ /^1\.3/));
print " found \"$java_version\"\n";

print "Constructing launch CLASSPATH...";
my $classpath = '';
my @jars = <$BCDDIR/jars/*.jar>;
if (scalar(@jars) > 0) {
    $classpath = ".";
    foreach $jar (@jars) {
      $classpath .= ":$jar";
    }
}
$classpath .= ":$BCDDIR/imagefiles/";
print " done\n";

print "Constructing system properties for the Java VM command line...";
my $options = '';
$options .= '-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser';
$options .= ' -Djava.protocol.handler.pkgs=com.britannica.net\|org.apache.naming.resources';
$options .= ' -Dcom.britannica.configurator.configuratorPropFile=britannica.ini';
$options .= ' -Dcom.britannica.lucene.search.searchPropFile=britannica.ini';
$options .= ' -Djdbc.drivers=com.britannica.cd.db.AxionCDConnectionDriver:oracle.jdbc.driver.OracleDriver:org.apache.commons.dbcp.PoolingDriver:com.britannica.db.proxy.ConnectionProxyDriver:org.axiondb.jdbc.AxionDriver';
$options .= ' -Dorg.axiondb.engine.TransactionManagerImpl.NEVER_APPLY=true';
$options .= ' -Djava.class.path=' . $classpath;
print " done\n";

if (! (-e 'britannica.ini')) {
    print "Extracting the application configuration file from product JAR...";
    `$ENV{JAVA_HOME}/bin/jar xf $BCDDIR/jars/$product_jar britannica.ini`; die "\n  failed: $!" if $?;
    print " done\n";

    print "Altering the application configuration file with local settings...";
    my $britannica_ini = '';
    open (BRITANNICA_INI_FILE, "< britannica.ini") or die "\n  failed";
    while (<BRITANNICA_INI_FILE>) {
      $britannica_ini .= $_;
    }
    close (BRITANNICA_INI_FILE) or die "\n  failed";

    # regexp's to modify britannica.ini here:
    $britannica_ini =~ s/^LOCAL=.*/LOCAL=\./m;
    $britannica_ini =~ s/^BCDDEV=.*/BCDDEV=$BCDDIR/m;

    open (BRITANNICA_INI_FILE, "> britannica.ini") or die "\n  failed";
    print BRITANNICA_INI_FILE $britannica_ini;
    close (BRITANNICA_INI_FILE) or die "\n  failed";
    print " done\n";
}

if (! (-e 'index/')) {
    print "Unzipping index archive in the local filesystem...";
    `unzip $BCDDIR/index.zip`; die "\n  failed: $!" if $?;
    print " done\n";
}

if (! (-e 'data/')) {
    print "Making data directory in the local filesystem...";
    mkdir('data') or die "\n  failed";
    print " done\nUnzipping autocomplete archive in the data directory...";
    `unzip $BCDDIR/autocomplete.zip -d data`; die "\n  failed: $!" if $?;
    print " done\nCopying local databases to the data directory (slow!)...";
    `cp -R $BCDDIR/data/* data`; die "\n failed: $!" if $?;
    print " done\n";
}

if (! (-e 'conf/')) {
    print "Making preferences directory in the local filesystem...";
    mkdir('conf') or die "\n  failed";
    print " done\n";
}

if (! (-e 'conf/' . $default_preferences_file)) {
    print "Extracting the default preferences file from product JAR...";
    `$ENV{JAVA_HOME}/bin/jar xf $BCDDIR/jars/$product_jar $default_preferences_file`; die "\n  failed: $!" if $?;
    print " done\nMoving default preferences file to the preferences directory...";
    `mv $default_preferences_file conf/`; die "\n  failed: $!" if $?;
    print " done\n";
}

my $command = "java $options com.britannica.cd.AppMain";
print "Launching the Java VM...\n";
system($command);
#EOF_CHDIR_EVAL
print "Changing back to startup directory...";
chdir($start_dir) or die "\n  failed";
print " done\n";

and it gives:

Enter location of the Britannica Software:
Changing to home directory... done
Changing to work directory... done
Searching for product JAR... found ""
Searching for default preferences file name in product JAR...java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:131)
        at java.util.zip.ZipFile.<init>(ZipFile.java:92)
        at sun.tools.jar.Main.list(Main.java:997)
        at sun.tools.jar.Main.run(Main.java:242)
        at sun.tools.jar.Main.main(Main.java:1167)
 found ".preferences.properties.default"
product_id is
BCDDIR is /home/boris/virtual-drives/1
product_jar is

  failed at ./linux-launch2.0.pl line 106.
Making a work directory for this product...

As You can see - variables product_id and product_jar are nothing - which I think causes the problem.

Line 106 is:

mkdir($product_id) or die "\n  failed";

$product_id is (line 96)

$product_id = $1

$1 is the first capture at line 95, here's the line:

`$ENV{JAVA_HOME}/bin/jar tf $BCDDIR/jars/$product_jar` =~ /^(\w+)\.preferences\.properties\.default/m;

It will be very cool if we'll manage to run Britannica on Linux!

share|improve this question
    
What part exactly can't you "make work"? –  slhck Sep 20 '11 at 17:00
    
Well - I can't find java 1.3.1 and also my Britannica is 2011 - not 2004. Here it is recommended to switch off the java's verison check - but it doesn't work for me either. –  Adobe Sep 20 '11 at 17:18

1 Answer 1

You didn't correctly follow Silas Brown's instructions, and missed out the semi-colon at the end of the statement, that is shown in those instructions. Of course, you only need that part of M. Brown's instructions if you haven't correctly followed the original Britannica instructions — about setting the JAVA_HOME environment variable in ~/.profile, ~/.bashrc, or somewhere similar — in the first place.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.