Software Development

Software Development, software engineering , computer science

How to install java 1.6.31 JRE on Ubuntu (64bit)

lnrsoft@lnrsoft:$cd /opt
lnrsoft@lnrsoft:/opt$sudo mkdir java
lnrsoft@lnrsoft:/opt$cd java
lnrsoft@lnrsoft:/opt/java$sudo mkdir 64
lnrsoft@lnrsoft:/opt/java$sudo mv ~/Desktop/jre-6u31-linux-x64.bin /opt/java/64
lnrsoft@lnrsoft:/opt/java$sudo chmod 755 /opt/java/64/jre-6u31-linux-x64.bin
lnrsoft@lnrsoft/opt/java:$cd /opt/java/64
lnrsoft@lnrsoft:/opt/java/64$sudo ./jre-6u31-linux-x64.bin

Agree the license agreement

lnrsoft@lnrsoft:/opt/java/64$sudo update-alternatives –install “/usr/bin/java” “java” “/opt/java/64/jre1.6.0_31/bin/java” 1
lnrsoft@lnrsoft:/opt/java/64$sudo update-alternatives –set java /opt/java/64/jre1.6.0_31/bin/java

Install the Firefox plugin

lnrsoft@lnrsoft:/opt/java/64$mkdir ~/.mozilla/plugins
lnrsoft@lnrsoft:/opt/java/64$sudo apt-get remove icedtea6-plugin
lnrsoft@lnrsoft:/opt/java/64$rm ~/.mozilla/plugins/libjavaplugin_oji.so
lnrsoft@lnrsoft:/opt/java/64$rm ~/.mozilla/plugins/libnpjp2.so
lnrsoft@lnrsoft:/opt/java/64$ln -s /opt/java/64/jre1.6.0_31/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Start up and shut down manually Oracle 11g on ubuntu

Start up

lnrsoft@lnrsoft:$cd /home/LnRSoft/Oracle/app/lnr/product/11.1.0/db_1/bin
lnrsoft@lnrsoft:~/Oracle/app/lnr/product/11.1.0/db_1/bin$ ./lsnrctl start
Services Summary…
Service “lnr” has 1 instance(s).
Instance “lnr”, status.
The command completed successfully

lnrsoft@lnrsoft:~/Oracle/app/lnr/product/11.1.0/db_1/bin$./sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Wed Oct 20 21:10:07 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
SQL>startup;
ORACLE instance started.
Total System Global Area 841162752 bytes
Fixed Size 1303160 bytes
Variable Size 444599688 bytes
Database Buffers 390070272 bytes
Redo Buffers 5189632 bytes
Database mounted.
Database opened.
SQL> exit;

lnrsoft@lnrsoft:~/Oracle/app/lnr/product/11.1.0/db_1/bin$ ./emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://lnr-server:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ………… started.

Shut down

lnrsoft@lnrsoft:~/Oracle/app/lnr/product/11.1.0/db_1/bin$ ./emctl stop dbconsole
Stopping Oracle Enterprise Manager 11g Database Control … Stopped.
lnrsoft@lnrsoft:~/Oracle/app/lnr/product/11.1.0/db_1/bin$./sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Wed Oct 20 21:58:12 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
SQL>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit;

Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
lnrsoft@lnrsoft:~/Oracle/app/lnr/product/11.1.0/db_1/bin$ ./lsnrctl stop

The command completed successfully

RemoteOperationException: ERROR: Invalid username and/or password

For Host Credentials Setup – NOT connected to a Domain:
username = user_name
password = pass_word

For Host Credentials Setup – connected to a Domain:
username = domainuser_name
password = pass_word

For Database Credentials Setup:
username = database_user_name
password = database_user_password

For Enterprise Manager logon Screen prompt
username = sysman
password = sysman_password

For Database logon Screen prompt
username = sys (or any database_user_name)
password = sys_password (or any database_user_password)

Set the logon as batch job from local security policy
1. Go to Control Panel, Administrative Tools.
2. Click on Local Security Policy.
3. Local Policies, User Rights Assignment.
4. Double click, ‘Log on as a batch job’

How to install java 1.6.22 JRE on ubuntu

$ cd /opt
$ sudo mkdir java
$ cd java
$ sudo mkdir 32
$ sudo mv ~/Desktop/jre-6u22-linux-i586.bin /opt/java/32
$ sudo chmod 755 /opt/java/32/jre-6u22-linux-i586.bin
$ cd /opt/java/32
$ sudo ./jre-6u22-linux-i586.bin

Agree the license agreement

$ sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/32/jre1.6.0_22/bin/java" 1
$ sudo update-alternatives --set java /opt/java/32/jre1.6.0_22/bin/java

Install the Firefox plugin

$ mkdir ~/.mozilla/plugins
$ sudo apt-get remove icedtea6-plugin
$ rm ~/.mozilla/plugins/libjavaplugin_oji.so
$ rm ~/.mozilla/plugins/libnpjp2.so
$ ln -s /opt/java/32/jre1.6.0_22/lib/i386/libnpjp2.so ~/.mozilla/plugins/

[SOLVED] Could not install Google Earth on Linux

$ ./GoogleEarthLinux.bin
Verifying archive integrity… All good.
Uncompressing Google Earth for GNU/Linux 5.2.1.1588……………………………………………………..
setup.data/setup.xml:1: parser error : Document is empty
^
setup.data/setup.xml:1: parser error : Start tag expected, ‘< ' not found ^ Couldn't load 'setup.data/setup.xml' Solution: $ ./GoogleEarthLinux.bin --target /tmp/ge $ cd /tmp/ge/setup.data/bin/Linux/x86/ $ mv setup.gtk setup.gtk2 $ cd /tmp/ge $ ./setup.sh

How to set up ORACLE_SID and ORACLE_HOME on ubuntu

1. step Open the .profile hidden file which is located in /yourname/home/.profile

2. step add the following lines to end of the .profile file

3. step save the changes , restart your computer

4. step you can check your environment variable

Path : Oracle/app/yourname/product/11.1.0/db_1/bin

UnsatisfiedLinkError exception loading native library: njni11

Installing Oracle 11g on Linux
[Oracle Net Services configuration failed.]

$./netca
Error message:
UnsatisfiedLinkError exception loading native library: njni11

java.lang.UnsatisfiedLinkError: jniGetOracleHome
at oracle.net.common.NetGetEnv.jniGetOracleHome(Native Method)
at oracle.net.common.NetGetEnv.getOracleHome(Unknown Source)
at oracle.net.ca.NetCA.main(Unknown Source)
Oracle Net Services configuration failed. The exit code is -1

Solution:
sudo apt-get install build-essential libaio1 gawk ksh

Multiple Inheritance

“Multiple Inheritance (object-oriented programming) was widely supposed to be very difficult to implement efficiently. For example, in a summary of C++ in his book on objective C Brd.Cox actually claimed that adding Multiple inheritance to C++ was impossible. Thus, multiple inheritance seemed more of a challenge. Since I had considered multiple inheritance as early as 1982 and found a simple and efficient implementation technique in 1984. I couldn’t resist the challenge. I suspect this to be the only case in which fashion affected the sequence of events.” —  Bjarne Stroustrup