Tag Archive: Java



Oracle released VirtualBox 4.0, a new major release. It now has an open architecture using extension packs and the base package is under GPLv2.

VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL).

What is new in virtualbox 4.0


VirtualBox 4.0.0 (released 2010-12-22)

This version is a major update. The following major new features were added:

* Reorganization of VirtualBox into a base package and Extension Packs; see chapter 1.5, Installing VirtualBox and extension packs, see the manual for more information
* New settings/disk file layout for VM portability; see chapter 10.1, Where VirtualBox stores its files, see the manual for more information
* Major rework of the GUI (now called “VirtualBox Manager”):
o Redesigned user interface with guest window preview (also for screenshots)
o New “scale” display mode with scaled guest display; see chapter 1.8.5, Resizing the machine’s window, see the manual for more information
o Support for creating and starting .vbox desktop shortcuts (bug #1889)
o The VM list is now sortable
o Machines can now be deleted easily without a trace including snapshots and saved states, and optionally including attached disk images (bug #5511; also, VBoxManage unregistervm –delete can do the same now)
o Built-in creation of desktop file shortcuts to start VMs on double click (bug #2322)
* VMM: support more than 1.5/2 GB guest RAM on 32-bit hosts
* New virtual hardware:
o Intel ICH9 chipset with three PCI buses, PCI Express and Message Signaled Interrupts (MSI); see chapter 3.4.1, “Motherboard” tab, see the manual for more information
o Intel HD Audio, for better support of modern guest operating systems (e.g. 64-bit Windows; bug #2785)
* Improvements to OVF support (see chapter 1.12, Importing and exporting virtual machines, see the manual for more information):
o Open Virtualization Format Archive (OVA) support
o Significant performance improvements during export and import
o Creation of the manifest file on export is optional now
o Imported disks can have formats other than VMDK
* Resource control: added support for limiting a VM’s CPU time and IO bandwidth; see chapter 5.8, Limiting bandwidth for disk images, see the manual for more information
* Storage: support asynchronous I/O for iSCSI, VMDK, VHD and Parallels images
* Storage: support for resizing VDI and VHD images; see chapter 8.21, VBoxManage modifyhd, see the manual for more information.
* Guest Additions: support for multiple virtual screens in Linux and Solaris guests using X.Org server 1.3 and later
* Language bindings: uniform Java bindings for both local (COM/XPCOM) and remote (SOAP) invocation APIs

In addition, the following items were fixed and/or added:

* VMM: Enable large page support by default on 64-bit hosts (applies to nested paging only)
* VMM: fixed guru meditation when running Minix (VT-x only; bug #6557)
* VMM: fixed crash under certain circumstances (Linux hosts only, non VT-x/AMD-V mode only; bugs #4529 and #7819)
* GUI: add configuration dialog for port forwarding in NAT mode (bug #1657)
* GUI: show the guest window content on save and restore
* GUI: certain GUI warnings don’t stop the VM output anymore
* GUI: fixed black fullscreen minitoolbar on KDE4 hosts (Linux hosts only; bug #5449)
* BIOS: implemented multi-sector reading to speed up booting of certain guests (e.g. Solaris)
* Bridged networking: improved throughput by filtering out outgoing packets intended for the host before they reach the physical network (Linux hosts only; bug #7792)
* 3D support: allow use of CR_SYSTEM_GL_PATH again (bug #6864)
* 3D support: fixed various clipping/visibility issues (bugs #5659, #5794, #5848, #6018, #6187, #6570)
* 3D support: guest application stack corruption when using glGetVertexAttrib[ifd]v (bug #7395)
* 3D support: fixed OpenGL support for libMesa 7.9
* 3D support: fixed Unity/Compiz crashes on natty
* 2D Video acceleration: multimonitor support
* VRDP: fixed rare crash in multimonitor configuration
* VRDP: support for upstream audio
* Display: fixed occasional guest resize crash
* NAT: port forwarding rules can be applied at runtime
* SATA: allow to attach CD/DVD-ROM drives including passthrough (bug #7058)
* Floppy: support readonly image files, taking this as the criteria for making the medium readonly (bug #5651)
* Audio: fixed memory corruption during playback under rare circumstances
* Audio: the DirectSound backend now allows VMs to be audible when another DirectSound application is active, including another VM (bug #5578)
* EFI: support for SATA disks and CDROMs
* BIOS: reduce the stack usage of the VESA BIOS function #4F01 (Quake fix)
* OVF/OVA: fixed export of VMs with iSCSI disks
* Storage: Apple DMG image support for the virtual CD/DVD (bug #6760)
* Linux host USB support: introduced a less invasive way of accessing raw USB devices (bugs #1093, #5345, #7759)
* Linux hosts: support recent Linux kernels with CONFIG_DEBUG_SET_MODULE_RONX set
* Guest Additions: Shared Folders now can be marked as being auto-mounted on Windows, Linux and Solaris guests
* Linux Additions: Shared Folders now support symbolic links (bug #818)
* Linux Additions: combined 32-bit and 64-bit additions into one file
* Windows Additions: automatic logon on Windows Vista/Windows 7 is now able to handle renamed user accounts; added various bugfixes

Install virtualbox 4.0 in ubuntu 10.10/10.04/9.10

Edit /etc/apt/sources.list file

gksudo gedit /etc/apt/sources.list

Add one of the following line

For ubuntu 10.10 users

deb http://download.virtualbox.org/virtualbox/debian maverick contrib

For ubuntu 10.04 users

deb http://download.virtualbox.org/virtualbox/debian lucid contrib

For ubuntu 9.10 users

deb http://download.virtualbox.org/virtualbox/debian karmic contrib

Save and exit the file

Add gpg key

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add –

Update source list

sudo apt-get update

Install virtualbox 4.0

sudo apt-get install virtualbox-4.0

Note: Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade. For Debian it is available in Lenny backports and in the normal repository for Squeeze and later. The dkms package can be installed through the Synaptic Package manager or through the following command:

sudo apt-get install dkms

What to do when experiencing The following signatures were invalid: BADSIG … when refreshing the packages from the repository?

# sudo -s -H
# apt-get clean
# rm /var/lib/apt/lists/*
# rm /var/lib/apt/lists/partial/*
# apt-get clean
# apt-get update

Re shared Post fromhttp://www.ubuntugeek.com

 

Advertisements

Object class in Java


Class Object is the root of the class hierarchy. Every class has Object as a super class. All objects, including arrays, implement the methods of this class.

 

Every class in the Java system is a descendent (direct or indirect) of the Object class. The Object class defines the basic state and behavior that all objects must have, such as the ability to compare oneself to another object, to convert to a string, to wait on a condition variable, to notify other objects that a condition variable has changed, and to return the object’s class.

 

Object is a super class of all other languages. This means that a reference variable of type Object can refer of any other class.

Object defines the following methods, which means that they are available in every object.

 

 

Methods:

 

clone( ) :  It creates a new object, which is same as the Object being cloned.

 

equals( ) :it checks whether the object is equal or not.

finalize( ):the method is called by the garbage collector when it determines no more references to the object exist.

getClass( ) : it gets the class of an object at runtime.

hashcode( ) :it returns the hash code associated with the invoking object.

toString( ) :returns the string which describes the object

wait( ) :waits till another thread to complete execution

notify ():it resumes execution of a thread waiting on invoking object

notifyAll( ):it resumes execution of all threads waiting on the invoking object.

Google Gives $5M Worth of Java GUI Tools to Eclipse


Google has donated two open-source Java tools to the Eclipse Foundation to join the popular IDE suite in 2011.

The tech giant’s WindowBuilder and CodePro AnalytiX were part of Google’s acquisition of Instantiations in August this year. By September, Google had relaunched some of Instantiations’ tools as open-source software.

One of those tools was WindowBuilder, a WYSIWYG code generator. This drag-and-drop, bidirectional GUI designer for Java played nicely with a variety of frameworks, including Swing, XML Windowing Toolkit (XWT), the Standard Widget Toolkit (SWT) and more. With support for Windows , Linux  and Mac, the Eclipse extension was intended to make Java app creation a lot simpler and faster.

And CodePro is another interesting Eclipse plugin for “comprehensive automated software code quality and security analysis.” The toolkit included features from EclipsePro Audit and EclipsePro Test and generally attempted to improve code quality, maintenance and readability.

Instatiations’ execs estimate the software, which is slated to roll out with the rest of the Eclipse June 2011 release train, is worth around $5 million.

Google’s emphasis on Java tools is hardly surprising; the blockbuster success of the Android platform (and sometimes harsh criticism of the Android Market of apps) has practically mandated a focus on Java, which is a big part of the Android stack. Giving devs better Java tools free of charge is an investment in the future of Google’s own platforms.

That’s not to say either of these Eclipse extensions is, in itself, going to be directly used for Android applications; we’re not sure either tool is intended for mobile development. But better tools make better Java devs, who in turn are better equipped to make more and better Android apps.

Inheritance


• A class can be defined in terms an existing class.

• The new class gets all of the methods and state variables of the old classby default.

• The new class can add new methods and state variables.

• The new class can redefine methods and state variables of its parent.

• No multiple inheritance

•Interfaces provide the good features of multiple inheritance.

Superclass
A super class is basically the same as any other class in Java, except that we know thatwe want other classes to be created from it. Don’t worry about how that’s done yet; firstlet’s just see what a super class can look like.

But wait, that looks like just a normal class? That’s right. A superclass can look like anytypical class. So, the magic of the superclass does not lie within the superclass itself, butwithin the subclass. You can call Super class as a Parent class.
Subclass
A subclass is a child of the parent class. Essentially, subclasses come from theirsuperclasses. Subclass draws the characteristics from the parent class in other words .
An simple example of inheritance
The following class extends the definition of a Point to three dimensions.
class Point3D extends Point {

double z;
Point3D (double x, double y, double z) {

this.x = x;

this.y = y:

this.z = z;

}
public double length() {return Math.sqrt(x*x + y*y + z*z);}

}
• The x and y values of the point values come from Point automatically.

• The getX and setX methods from Point do not have to be rewritten.

• The length method needs to be redefined.

• The addPoints method can be retained, but an addPoints3D needs to beadded.
Inheritance and instantiation

• Inheritance and instantiation are unrelated.

• Class (object blue prints) have a strict hierarchy (no multipleinheritance).

• Objects can instantiate other objects irrespective of the class hierarchy.

• The instantiating object points to the instantiated object, but otherobjects may also point to the instantiated object so there is no stricthierarchy of objects.

• Objects become garbage when they are no longer pointed to.

%d bloggers like this: