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.2><1.0, 1.0, 0.4><1.0, 1.0, 0.6><1.0, 1.0, 0.8><1.0, 1.0, 1.0>

To install OPENJDK (javac/java) in Fedora(14/18/19/20)


Follow these steps:


[vinayak@localhost ~]$ su -



[root@localhost ~]# java-1.7.0-openjdk.i686                    
[root@localhost ~]# java-1.7.0-openjdk-accessibility.i686 
[root@localhost ~]# java-1.7.0-openjdk-devel.i686           
[root@localhost ~]# java-1.7.0-openjdk-headless.i686  

Friday, February 28, 2014

To install freeglut for LINUX-MINT


Open a terminal and enter the following commands to install the necessary libraries for OpenGL development:


1)  [vinayak@localhost ~]$ su -

enter admin pasword

2)

 [root@localhost ~]#   sudo apt-get update
[root@localhost ~]# sudo apt-get install freeglut3
[root@localhost ~]# sudo apt-get install freeglut3-dev
[root@localhost ~]# sudo apt-get install binutils-gold
[root@localhost ~]# sudo apt-get install g++ cmake
[root@localhost ~]# sudo apt-get install libglew-dev
[root@localhost ~]# sudo apt-get install g++
[root@localhost ~]# sudo apt-get install mesa-common-dev
[root@localhost ~]# sudo apt-get install build-essential
[root@localhost ~]# sudo apt-get install libglew1.5-dev libglm-dev
[root@localhost ~]#  exit

3)  [vinayak@localhost ~]$ gcc prog.c -lglut -lGL -lGLU

 
 




    

Thursday, February 20, 2014

How to install "Open Jdk" (java developement kit) in Ubuntu(Linux)? 


Step 1: Open Applicaction>> Accessories>> Terminal 

Step 2: Type commandline as below
... sudo apt-get install openjdk-7-jdk 

Step 3: Type commandline as below
... apt-cache search jdk
 (Note: openjdk-7-jdk is symbolically used here you can choose jdk version as per your requirment.) 

How to set "Environment Variables" for "Open jdk" in Ubuntu(Linux)?

 Step 4: For "JAVA_HOME" (Environment Variable) type command as shown below, in "Terminal" using your installation path

... export JAVA_HOME=/usr/lib/jvm/java-7-openjdk

 (Note: "/usr/lib/jvm/java-7-openjdk" is symbolically used here just for demostration you should use your path as per your installation.)

 Step 5: For "PATH" (Environment Variable) type command as shown below, in "Terminal" using your installation path

... export PATH=$PATH:/usr/lib/jvm/java-7-openjdk/bin 

(Note: "/usr/lib/jvm/java-7-openjdk" is symbolically used here just for demostration you should use your path as per your installation.)

 Step 6: Check for "open jdk" installation, just type command in "Terminal" as shown below javac

Wednesday, February 19, 2014

To Install GLUT in Fedora-20

*************************


Instruction:


1)  su -

enter your Administrator password


2)   [root@localhost ~]# yum list freeglut*


it shows list of freegluts


3)  [root@localhost ~]# yum install freeglut-devel.i686


4) [root@localhost ~]# yum install mesa-libEGL.i686
or
[root@localhost ~]# yum install mesa-libGL.i686

5)[root@localhost ~]# updatedb


6) [root@localhost ~]#exit





Thats all


Vinayak Bhat
+918880080188
vinayakb2011@gmail.com


HowTo: Install Java Plugins in Google Chrome / Firefox in Fedora 18/20

Step 1:
download Linux x64 RPM in http://www.java.com/en/download/manual.jsp?locale=en

Step 2:
open terminal and type the following
su -
cd /home/**username**/Downloads (replace **username** with yours)
rpm -ivh jre-7u11-linux-x64.rpm
you will see some few errors but its ok

Step 3:

updatedb
locate libnpjp2.so
copy the path of the libnpjp2.so file
Step 4a: (Firefox Users)
cd /home/user/.mozilla/plugins (replace user with your username)
ln -s path/of/libnpjp.so
Step 4b: (Chrome Users)
cd /opt/google/chrome/
mkdir plugins
cd plugins
ln -s path/of/libnpjp.so
Step 5:
close and run your browser. visit other java websites to check your java installation. My java installation wont work in java's website. the circle loading thingy just wont stop loading.

Sunday, September 15, 2013

What is the difference between processes and threads?

The memory space, where a given application is executed is called - process. A Process is the memory set aside for an application to be executed in.
Within this process the thing, which is really executed is the thread.
The key difference is that processes are fully isolated from each other; threads share (heap) memory with other threads running in the same application.
Threads share the address space of the process that created it; processes have their own address.
Threads have direct access to the data segment of its process; processes have their own copy of the data segment of the parent process.
Threads can directly communicate with other threads of its process; processes must use inter-process communication to communicate with sibling processes.
Threads have almost no overhead; processes have considerable overhead.
New threads are easily created; new processes require duplication of the parent process.
Threads can exercise considerable control over threads of the same process; processes can only exercise control over child processes.