Posted in How To..., Others

Installation and Overview of openSUSE 12.2


Installation and Overview of openSUSE 12.2

openSUSE is an operating system built on top of the Linux kernel 3.4.

Developed by the community-supported openSUSE Project and sponsored by SUSE. Novell acquired SUSE Linux in January 2004 and decided to release the SUSE Linux Professional product as a 100% open source project.

Initial Release: Beta version of SUSE Linux 10.0

Latest Stable Version: openSUSE 12.2

System Requirements

  • openSUSE 12.2 supports 32-bit i586 and 64-bit x86-64 PC hardware.
  • CPU: Intel PIII 500 MHz or higher, P4 2.4 GHZ / AMD64 / Intel64 CPU.
  • RAM: 1 GB
  • Disk: 3 GB for minimal system; 5 GB for standard system

New Features

  • Privilege separation and sandboxing by OpenSSH 6.0
  • DNSSEC support by Bind 9.9
  • TLS version 1.1 and 1.2 support
Download Free EBooks and Whitepapers on Big DATA
Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Website

http://www.opensuse.org/en/

opensuse.org Website
opensuse.org Website

How to Download?

http://software.opensuse.org/122/en

Download OpenSUSE 12.2
Download OpenSUSE 12.2

Now… Insert bootable DVD, Change the Boot order if needed from the BIOS settings…

openSUSE Screen
openSUSE Screen
openSUSE Installation Program - Starting udev
openSUSE Installation Program – Starting udev

Select Language, Keyboard Layout and Accept License Agreement!!

openSUSE Installation Preparation - Welcome
openSUSE Installation Preparation – Welcome
openSUSE Installation - System Analysis
openSUSE Installation – System Analysis

Select Installation Mode

openSUSE Installation - Installation Mode
openSUSE Installation – Installation Mode

Select Clock and Timezone as per preferences…

openSUSE Installation - Time Zone
openSUSE Installation – Time Zone

Select a Desktop, We select KDE Desktop

openSUSE Installation - Desktop Selection
openSUSE Installation – Desktop Selection

Suggest Partitioning, you can create, import or edit Partition setup as desired.

openSUSE Installation - Disk
openSUSE Installation – Disk

Create New User

openSUSE Installation - User Setting
openSUSE Installation – User Setting

YaST2- Retrieving cracklib-dict-full.rpm

openSUSE Installation - User Setting - YaST2
openSUSE Installation – User Setting – YaST2

Installation Settings

openSUSE Installation - Overview
openSUSE Installation – Overview

YaST2 – Confirm Installation

openSUSE Installation - Confirm Installation
openSUSE Installation – Confirm Installation

Now…Automatic Configuration

openSUSE Installation - Automatic Configuration
openSUSE Installation – Automatic Configuration

Get

openSUSE Desktop in Seconds 1
openSUSE Desktop in Seconds 1

Set

openSUSE Desktop in Seconds 2
openSUSE Desktop in Seconds 2

Go

openSUSE Desktop
openSUSE Desktop

My Computer in openSUSE

openSUSE - My Computer
openSUSE – My Computer

Done!!!

Advertisements
Posted in How To..., Java, JEE / J2EE / JSP / Servlets

How to remove Empty Packages from Package Explorer in Eclipse


remove Empty Packages from Package Explorer in Eclipse

Open Eclipse -> Go to Package Explorer View

Empty Packages in Project Explorer in Eclipse
Empty Packages in Project Explorer in Eclipse
Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Select Filters

Filters for Packages in Eclipse
Filters for Packages in Eclipse

Java Element Filters in Eclipse…

Select the Empty Packages Element to From the View
Select the Empty Packages Element to From the View

Done!!!

Posted in How To...

Create a Local Yum Repository in CentOS 6.3 in 5 steps


Create a Local Yum Repository in CentOS 6.3 in 5 steps

1) Install CentOS 6.3 -> How to install CentOS 6.3 ; In CentOS6.3 Desktop Installation, Apache is installed in built. Verify

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers
Apache status in CentOS 6.3
Apache status in CentOS 6.3

2) Insert DVD/ISO into DVD-Drive. 3) Create Directory with mkdir -pv /var/www/html/centos/6.3/i386/RPMS/ and copy all RPM files from the DVD (Part-I, Part-II)

ifconfig - verify the IP Address of the Machine
ifconfig – verify the IP Address of the Machine

cp /var/www/html/centos6.3/i386/createrepo* /tmp/repo/

cp /var/www/html/centos6.3/i386/deltarpm* /tmp/repo/cp /var/www/html/centos6.3/i386/python-deltarpm* /tmp/repo/cp /var/www/html/centos6.3/i386/libxml2-python* /tmp/repo/
RPMs needed to run create Repository command createrepo
RPMs needed to run create Repository command createrepo
Run the RPMs
RPMs needed to run create Repository command createrepo 1
RPMs needed to run create Repository command createrepo 1
[root@localhost admin]# rpm-ivh /tmp/repo/deltarpm-3.5-0.5.20090913git.el6.i686.rpm
[root@localhost admin]# rpm -ivh /tmp/repo/python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm[root@localhost admin]# rpm -ivh /tmp/repo/libxml2-python-2.7.6-4.el6_2.4.i686.rpm [root@localhost admin]# rpm -ivh /tmp/repo/createrepo-0.9.8-5.el6.noarch.rpm
createrepo - Create repomd (xml-rpm-metadata) repository
createrepo  is a program that creates a repomd (xml-based rpm metadata)
       repository from a set of rpms.
4) [root@localhost admin]# createrepo /var/www/html/centos6.3/i386/
createrepo command
createrepo command

[root@localhost admin]# createrepo /var/www/html/centos6.3/i386/2559/4776 – php-tidy-5.3.3-3.el6_2.8.i686.rpm

iso-8859-1 encoding on Ville Skytt� <ville.skytta@iki.fi> – 2.8.24776/4776 – diffutils-2.8.1-28.el6.i686.rpm
Saving Primary metadata Saving file lists metadata Saving other metadata [root@localhost admin]#

Use Rsync to create the updates-released repository (Not tried) 5) Change baseurl as per assigned IP address or use Localhost; Make sure that you change baseurl in all sections in the /etc/yum.repos.d/CentOS-Base.repo file (Hint: You need to make sure that baseurl is correct else it will give error for repodata/repomd.xml file; If createrepo command will run successfully then this directory along with files will be created where all RPMs are located or where you have created repository. ).

edit -etc-yum.repos.d-CentOS-Base.repo
edit -etc-yum.repos.d-CentOS-Base.repo

Done!!!

Posted in How To..., Java, JEE / J2EE / JSP / Servlets, Tomcat

How to Export WAR file from Eclipse to Tomcat


To export WAR file from the Dynamic Web Project in Eclipse, Follow below steps:

Export WAR File
Export WAR File

Java – Download Free EBooks and Whitepapers

Now select the destination where you want to deploy the WAR file; in our case, it will be Tomcat‘s “webapps” directory.

Select Destination to Deploy WAR file
Select Destination to Deploy WAR file

If you want to maintain source files (.java) then click on export source files as well.

Select Destination to Deploy WAR file
Select Destination to Deploy WAR file

Now verify the webapps directory in Tomcat’s distribution folder.

webapps directory in Tomcat's distribution folder
webapps directory in Tomcat’s distribution folder

Lets run the Web Application and verify

Run Tomcat, and you will notice that the WAR file content will be extracted into the folder

Once tomcat is Up and Running, Open Browser and open the URL http://localhost:8080/JavaWebProject/HelloWorldExample, you will see

Successful Servlet Execution in Tomcat Server in Browser
Successful Servlet Execution in Tomcat Server in Browser

Done!!! 🙂

Other Interesting Tomcat related Articles:

Posted in How To..., Java, JEE / J2EE / JSP / Servlets

How to Solve Servlet Errors in Eclipse?


Servlet Errors in Eclipse

For new users, it’s common to encounter following errors while developing servlet in Eclipse (I am using eclipse-jee-indigo-SR2-win32) or without it:

HttpServlet cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
ServletException cannot be resolved to a type
The import javax.servlet cannot be resolved
WebServlet cannot be resolved to a type

servlet-api.jar errors in eclipse
servlet-api.jar errors in eclipse

Java – Download Free EBooks and Whitepapers

The problem is “servlet-api.jar” is not on classpath.

How to add servlet-api.jar in classpath from Eclipse?

Right Click on the Web Project and Click on Properties

Dynamic Web Project Properties in Eclipse
Dynamic Web Project Properties in Eclipse

Select Java Build Path

Java Build Path in Eclipse
Java Build Path in Eclipse

Click on the Library Tab

Java Build Path in Eclipse-Libraries
Java Build Path in Eclipse-Libraries

Click on “Add External Jar” -> Locate servlet-api.jar from your local system (It’s available in Tomcat Distribution directory.)

Add External Jar servlet-api.jar from tomcat installation dir
Add External Jar servlet-api.jar from tomcat installation dir
servlet-api.jar external jar added
servlet-api.jar external jar added

Click OK and all errors will be resolved.

Servlet errors resolved
Servlet errors resolved

Done!!!

Other Interesting Tomcat related Articles:

Posted in How To..., Java, Uncategorized

Java – How to Decompile Class files from Jar Files


How to Decompile Class files from Jar Files?

Decompiler
According to Wikipedia, A decompiler is the name given to a computer program that performs, as far as possible, the reverse operation to that of a compiler. That is, it translates a file containing information at a relatively low level of abstraction (usually designed to be computer readable rather than human readable) into a form having a higher level of abstraction (usually designed to be human readable). The decompiler does not reconstruct the original source code, and its output is far less intelligible to a human than original source code.

Java – Download Free EBooks and Whitepapers

The term decompiler is most commonly applied to a program which translates executable programs (the output from a compiler) into source code in a (relatively) high level language which, when compiled, will produce an executable whose behavior is the same as the original executable program. By comparison, a disassembler translates an executable program into assembly language (and an assembler could be used to assemble it back into an executable program).
Java De-compiler
The “Java Decompiler project” aims to develop tools in order to decompile and analyze Java 5 “byte code” and the later versions.

JD-Core is a library that reconstructs Java source code from one or more “.class” files. JD-Core may be used to recover lost source code and explore the source of Java runtime libraries. New features of Java 5, such as annotations, generics or type “enum”, are supported. JD-GUI and JD-Eclipse include JD-Core library.

JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.

JD-Eclipse is a plug-in for the Eclipse platform. It allows you to display all the Java sources during your debugging process, even if you do not have them all.

Features

  • JD-Core and JD-GUI are written in C++. This allows an extremely fast decompilation and a display.
  • JD-Core does not require the Java runtime environment for its functioning, therefore no special setup is required.
  • JD-Core works with most current compilers including the following:
    • jdk1.1.8
    • jdk1.3.1
    • jdk1.4.2
    • jdk1.5.0
    • jdk1.6.0
    • jdk1.7.0
    • jikes-1.22
    • harmony-jdk-r533500
    • Eclipse Java Compiler v_677_R32x, 3.2.1 release
    • jrockit90_150_06
  • JD-Core supports the following new features of Java 5:
    • Annotations
    • Generics
    • Type “enum”
  • JD-GUI supports Drag and Drop.
  • JD-GUI supports JAR files.
  • JD-GUI displays color coded Java source code.
  • JD-GUI allows you to browse the “class” files hierarchy.
  • JD-GUI displays “log” files, and allow you to decompile “class” files appearing in Java stack traces.
  • JD-Core, JD-GUI and JD-Eclipse use the excellent cross-platform wxWidgets toolkit.

Download

Download from http://java.decompiler.free.fr/?q=jdgui

Download Java Decompiler
Download Java Decompiler

Extract jd-gui-0.3.3.windows.zip file -> Click on jd-gui Application

Slect Jar file to Decompile in JD-GUI
Slect Jar file to Decompile in JD-GUI
Decompiled Java Class from Jar File
Decompiled Java Class from Jar File

References

http://java.decompiler.free.fr/
http://en.wikipedia.org/wiki/Decompiler

Posted in How To..., Java

How to Import Existing Java Project in Eclipse


Import Existing Java Project -> Open Eclipse -> Click on File Menu -> New -> Java Project
Java Project
Java Project

Java – Download Free EBooks and Whitepapers

Give Java Project Name

New Java Project
New Java Project
New Java Project Settings
New Java Project Settings

Click on Finish; New Java Project will be available in Project Explorer -> Right Click on it…

Import Existing Project
Import Existing Project
Select General -> File System
Select General -> File System

a

Select Existing Project from File System
Select Existing Project from File System
Overwrite Dialog Box
Overwrite Dialog Box

See the Red Cross Mark in added Project due to Jar files

Java Source File Errors
Java Source File Errors

Right Click on the Imported Project

configure build path in eclipse
configure build path in eclipse

Click on Add Jars;

Add Jars in Eclipse
Add Jars in Eclipse

If Jars are not available in the Same Project which is imported then click on Add External Jar in above dialog box, Select Jars from the directory available on your system.

Jar Selcetion
Jar Selcetion

Click on Ok.

Notice, Red Marks are Gone..

Source Files Errors Removed After adding Jars in Classpath
Source Files Errors Removed After adding Jars in Classpath