Saturday 27 October 2012

Windows-8 shortcuts

Windows-8 key shortcuts

  • Win : switch between the Start screen and the last-running Windows 8 app
  • Win + C : displays the Charms: the Settings, Devices, Share and Search options
  • Win + D : launches the desktop
  • Win + E : launches Explorer
  • Win + F : opens the File Search pane
  • Win + H : opens the Share pane
  • Win + I : opens Settings
  • Win + K : opens the Devices pane
  • Win + L : locks your PC
  • Win + M : minimises the current Explorer or Internet Explorer window (works in the full-screen IE, too)
  • Win + O : toggles device orientation lock on and off
  • Win + P : switch your display to a second display or projector
  • Win + Q : open the App Search pane
  • Win + R : opens the Run box
  • Win + U : open the Ease of Access Centre
  • Win + V : cycle through toasts (notifications)
  • Win + W : search your system settings (type POWER for links to all power-related options, say)
  • Win + X : displays a text menu of useful Windows tools and applets
  • Win + Z : displays the right-click context menu when in a full-screen app
  • Win + + : launch Magnifier and zoom in
  • Win + - : zoom out
  • Win + , : Aero peek at the desktop
  • Win + Enter : launch Narrator
  • Win + PgUp : move the current screen to the left-hand monitor
  • Win + PgDn : move the current screen to the right-hand monitor
  • Win + PrtSc : capture the current screen and save it to your Pictures folder
  • Win + Tab : switch between running apps

Windows 8 tips, tricks and secrets - toturials 4

27. SmartScreen

Windows 8 now uses Internet Explorer's SmartScreen system-wide, checking downloaded files to ensure they're safe. In general this is a good thing, but if you have any problems then it can be tweaked.
Launch Control Panel, open the Action Centre applet, and click Change Windows SmartScreen Settings in the left-hand pane. Here you can keep the warning, but avoid the requirement for administrator approval, or turn SmartScreen off altogether. Make your choice and click OK to finish.

28. Windows 8 File History

Windows 8 includes an excellent File History feature, which can regularly and automatically back up your libraries, desktop, contacts and favourites to a second drive (even a USB flash drive - just connect it, and choose 'Configure this drive for backup using File History' from the menu).
To set this up, go to Control Panel > System and Security > File History. Click Exclude Folders to help define what you're saving, Advanced Settings to choose the backup frequency, Change Drive to choose the backup destination, and Turn On to enable the feature with your settings.
And once it's been running for a while, you can check on the history for any file in Explorer by selecting it, choosing the Home tab and clicking History.
50 Windows 8 tips, tricks and secrets

29. VHD - enhanced

Windows 7 added support for creating and attaching virtual hard drives in Microsoft's VHD format. Now Windows 8 extends this with the new VHDX format, which improves performance, extends the maximum file size from 2 to 16TB, and makes the format "more resilient to power failure events" (so they shouldn't get corrupted as easily). Launch the Computer Management Control Panel applet, choose Disk Management, and click Actions > Create VHD to give the format a try.

30. Storage Spaces

If you have multiple hard drives packed with data then you'll know that managing them can be a hassle. But that's all about to change with a new Windows 8 feature, Storage Spaces.
The idea is that you can take all your hard drives, whether connected via USB, SATA or SAS (Serial Attached SCSI), and add them to a storage pool. And you can then create one or more spaces within this pool, formatting and accessing them as a single drive, so you've only one drive letter to worry about.
What's more, the technology can also maximise your performance by spreading files across multiple drives (the system can then access each chunk simultaneously). There's an option to mirror your files, too, so even if one disk fails your data remains safe. And if your Storage Space begins to fill up then just plug in another drive, add it to the pool and you can carry on as before.
Yes, we know, this is just a consumer-friendly take on RAID. But there's nothing wrong with that, and it looks promising. If you'd like to read up on the technical details then the official Windows 8 blog has more, and you can then create and manage your drive pool from the new Control Panel\System and Security 'Storage Spaces' applet.
50 Windows 8 tips, tricks and secrets

31. Virtual Machines

Install Windows 8 and you also get Microsoft's Hyper-V, enabling you to create and run virtual machines (as long as you're not running in a virtual machine already). Launch OptionalFeatures.exe (press Windows Key and R and type it in to run), check Hyper-V and click OK to enable the feature. Then switch back to the Start screen, scroll to the right, find and click on the Hyper-V Manager tile to begin exploring its capabilities.

32. Smart Searching

When you're in the mood to track down new Windows 8 features relating to a particular topic, you might be tempted to start by manually browsing Control Panel for interesting applets - but there is a simpler way.
If you'd like to know what's new in the area of storage, say, just press Win+W to launch the Settings Search dialog, type "drive", and the system will return a host of related options. That is, not just those with "drive" in the name, but anything storage-related: BitLocker, Device Manager, backup tools, disk cleanup, and interesting new features such as Storage Spaces.
This Search feature isn't new, of course, but it's easy to forget how useful this can be, especially when you're trying to learn about a new operating system. So don't just carry out specific searches, use the Apps search to look for general keywords such as "privacy" or "performance", and you just might discover something new.
Windows 8 tips

Windows 8 tips, tricks and secrets -toturials 3 shortcuts

19. Disable the lock screen

If you like your PC to boot just as fast as possible then the new Windows 8 lock screen may not appeal. Don't worry, though, if you'd like to ditch this then it only takes a moment.
Launch GPEdit.msc (the Local Group Policy Editor) and browse to Computer Configuration > Administrative Templates > Control Panel > Personalisation.
Double-click 'Do not display the lock screen', select Enabled and click OK.
Restart and the lock screen will have gone.
If you can't easily find GPEdit.msc by searching in the Start screen, search for 'mmc', and then press Enter. On the File menu, click 'Add/Remove Snap-in', then in the 'Add or Remove Snap-ins' dialog box, click 'Group Policy Object Editor', and then click 'Add'.
In the 'Select Group Policy Object' dialog box, click 'Browse'. Click 'This Computer' to edit the Local Group Policy object, or click 'Users' to edit Administrator, Non-Administrator, or per-user Local Group Policy objects, then click 'Finish'.
50 Windows 8 tips, tricks and secrets

20. Install anything

Most mobile platforms recommend you only install apps from approved sources to protect your security, and Windows 8 is the same: it'll only allow you to install trusted (that is, digitally signed) apps from the Windows store.
If this proves a problem, though, and you're willing to take the security risk (because this isn't something to try unless you're entirely sure it's safe), then the system can be configured to run trusted apps from any source.
Launch GPEdit.msc (see above for instructions on how to find it), browse to Computer Configuration > Administrative Templates > Windows Components > App Package Deployment, double-click 'Allow all trusted apps to install' and select Enabled > OK.
50 Windows 8 tips, tricks and secrets

21. Log in automatically

Of course even if you remove the lock screen, you'll still be forced to manually log in every time your system starts. This can also be resolved at speed, though, using much the same technique as in previous versions of Windows.
Hold down the Windows key, press R, type 'netplwiz' and press Enter to launch the User Accounts dialog.
Clear the "Users must enter a user name and password to use this computer" box and click OK.
Enter the user name and password of the account that you'd like to be logged in automatically, click OK, restart your system and this time it should boot directly to the Start screen.

22. Replacing the Start menu

If Windows 8's search and navigation tools still leave you pining for the regular Start menu, installing ViStart will replace it with something very similar.
Download the program and install it, carefully; it's free, but the Setup program will install the trial of a commercial Registry cleaner unless you explicitly tell it otherwise.
But once that's out the way, your old Start button will return in its regular place, and clicking it (or pressing the Windows key) will bring back the usual Start menu complete with search box and all the usual menus.
The program has a few flaws - on launch it gave us an e-mail icon for Outlook Express, for instance - but otherwise works well.
There's also Start8 from Windows customisation veterans Stardock. It provides similar functionality to ViStart but with a more up-to-date look.
Windows 8 tips

23. Windows key shortcuts

  • Win : switch between the Start screen and the last-running Windows 8 app
  • Win + C : displays the Charms: the Settings, Devices, Share and Search options
  • Win + D : launches the desktop
  • Win + E : launches Explorer
  • Win + F : opens the File Search pane
  • Win + H : opens the Share pane
  • Win + I : opens Settings
  • Win + K : opens the Devices pane
  • Win + L : locks your PC
  • Win + M : minimises the current Explorer or Internet Explorer window (works in the full-screen IE, too)
  • Win + O : toggles device orientation lock on and off
  • Win + P : switch your display to a second display or projector
  • Win + Q : open the App Search pane
  • Win + R : opens the Run box
  • Win + U : open the Ease of Access Centre
  • Win + V : cycle through toasts (notifications)
  • Win + W : search your system settings (type POWER for links to all power-related options, say)
  • Win + X : displays a text menu of useful Windows tools and applets
  • Win + Z : displays the right-click context menu when in a full-screen app
  • Win + + : launch Magnifier and zoom in
  • Win + - : zoom out
  • Win + , : Aero peek at the desktop
  • Win + Enter : launch Narrator
  • Win + PgUp : move the current screen to the left-hand monitor
  • Win + PgDn : move the current screen to the right-hand monitor
  • Win + PrtSc : capture the current screen and save it to your Pictures folder
  • Win + Tab : switch between running apps

24. Launch programs fast

What you need to know
Windows Phone 8: What you need to know
Windows Phone 8
If you're a fan of keyboard shortcuts and don't like the idea of scrolling through app tiles to find the program you need, don't worry, Windows 8 still supports a useful old shortcut. Which is perfect if, say, you're looking to be able to shut down your PC with a click.
Launch the desktop app, right-click an empty part of the desktop and click New > Shortcut.
Browse to the application you'd like to launch here. Of for the sake of this example, enter
shutdown.exe -s -t 00
to shut down your PC, or
shutdown.exe -h -t 00
to hibernate it, and click Next. Type a shortcut name - 'Hibernate', say - and click Finish.
Right-click the shortcut, select Pin to Start and it should appear on the far right of the Start screen - just drag the tile wherever you like.

25. Intelligent screengrabs

If a Windows 8 application is showing something interesting and you'd like to record it for posterity, then hold down the Windows key, press PrtSc, and the image won't just go to the clipboard: it'll also be automatically saved to your My Pictures folder with the name Screenshot.png (and then Screenshot(1).png, Screenshot(2).png and so on).
You might hope that pressing Win+Alt+PrtSc would similarly save an image of the active window, but no, sadly not. Maybe next time.

26. Photo Viewer

Double-click an image file within Explorer and it won't open in a Photo Viewer window any more, at least not by default. Instead you'll be switched to the full-screen Windows 8 Photos app - bad news if you thought you'd escaped such hassles by using the desktop.
If you'd like to fix this, go to Control Panel > Programs > Default Programs and select Set your default programs.
Scroll down and click Windows Photo Viewer in the Programs list.
Finally, click 'Set this program as default' if you'd like the Viewer to open all the file types it can handle, or select the 'Choose default' options if you prefer to specify which file types it should open. Click OK when you're done.
Windows 8 tips

Windows 8 tips, tricks and secrets - toturials 2

8. App bar

Windows 8 apps aim to be simpler than old-style Windows applets, which means it's goodbye to menus, complex toolbars, and many interface standards. There will usually be a few options available on the App bar, though, so if you're unsure what to do then either right-click an empty part of the screen, press Windows+Z or flick your finger up from the bottom of the screen to take a closer look.

9. What's running?

If you launch a Windows 8 app, play with it for a while, then press the Windows key you'll switch back to the Start screen. Your app will remaining running, but as there's no taskbar then you might be wondering how you'd ever find that out.
You could just press Alt+Tab, which shows you what's running just as it always has.
Holding down the Windows key and pressing Tab displays a pane on the left-hand side of the screen with your running apps. (To see this with the mouse, move your cursor to the top left corner of the screen, wait until the thumbnail of one app appears, then drag down.)
And of course you can always press Ctrl+Shift+Esc to see all your running apps in the Task Manager, if you don't mind (or actually need) the extra technical detail.
Windows 8 tips

10. Closing an app

Windows 8 apps don't have close buttons, but this isn't the issue you might think. Apps are suspended when you switch to something else so they're only a very minimal drain on your system, and if you need the system resources then they'll automatically be shut down. (Their context will be saved, of course, so on relaunching they'll carry on where you left off.)
If you want to close down an app anyway, though, move the mouse cursor up to the top of the screen. When it turns from the regular mouse pointer to the icon of a hand, hold down the left mouse button and drag it down the screen. Your app should shrink to a thumbnail which you can drag off the screen to close it.
If that's too much hassle, then simply pressing Alt+F4 still works.
And when all else fails then press Ctrl+Shift+Esc to launch Task Manager, right-click something in the Apps list and select End Task. Beware, though, close something you shouldn't and it's easy to crash or lock up your PC.

11. Mastering Internet Explorer in Windows 8

Click the Internet Explorer tile from the Start menu and you'll launch a full-screen version without toolbars, menus or sidebars, which like so much of Windows 8 may leave you initially feeling lost.
Right-click an empty part of the page or flick your finger down from the top of the screen, though, and you'll find options to create and switch between tabs, as well as a Refresh button, a 'Find' tool and the ability to pin an Internet shortcut to the Start page. Click the spanner icon and select 'View on the desktop' to open the full desktop version of Internet Explorer.
Windows 8 tips

12. Run two apps side by side

Windows 8 apps are what Microsoft calls "immersive" applications, which basically means they run full-screen - but there is a way to view two at once. Swipe from the left and the last app you were using will turn into a thumbnail; drop this and one app displays in a sidebar pane while your current app takes the rest of the screen. And you can then swap these by swiping again.
50 Windows 8 tips, tricks and secrets

13. Spell check

Windows 8 apps all have spellcheck where relevant, which looks and works much as it does in Microsoft Office. Make a mistake and a wavy red line will appear below the offending word; tap or right-click this to see suggested alternative words, or add the word to your own dictionary if you prefer.

14. Run as Administrator

Some programs need you to run them with Administrator rights before they'll work properly. The old context menu isn't available for a pinned Start screen app, but right-click one, and if it's appropriate for this app then you'll see a Run As Administrator option.

15. Make a large app tile smaller

You'll notice that some Windows 8 apps have small live tiles, while others have larger tiles that take up the space of two tiles. Right-clicking on a Windows 8 app's Start screen tile will display a few relevant options. If this is one of the larger tiles, choosing 'Smaller' will cut it down to half the size, freeing up some valuable Start screen real estate.

16. Uninstall easily

If you want to hide an unused app for now, select 'Unpin from Start'. The tile will disappear, but if you change your mind then you can always add it again later. (Search for the app, right-click it, select 'Pin to Start'.)
Or, if you're sure you'll never want to use an app again, choose 'Uninstall' to remove it entirely.
50 Windows 8 tips, tricks and secrets

17. Apps and privacy

It is worth keeping in mind that by default Windows 8 apps can use your name, location and account picture. If you're not happy with that, it's easily changed. Press Win+I, click More PC Settings, select Privacy and click the relevant buttons to disable any details you'd rather not share.
50 Windows 8 tips, tricks and secrets

18. Administrative tools

Experienced Windows users who spend much of their time in one advanced applet or another are often a little annoyed to see their favourite tools buried by Windows 8. Microsoft has paid at least some attention, though, and there is a way to bring some of them back.
Open the Charm bar by flicking your finger from the right-hand side of the screen and select 'Settings' then 'Tiles'. Change 'Show administrative tools' to 'Yes' and click back on an empty part of the Start screen. And it's as simple as that. Scroll to the right and you'll find a host of new tiles for various key applets - Performance Monitor, Event Viewer, Task Scheduler, Resource Monitor and more - ready to be accessed at a click.
50 Windows 8 tips, tricks and secrets

Windows 8 tips, tricks and secrets -toturials 1

Windows 8 is finally here, and if you're used to previous versions of Windows then you're going to notice that quite a bit has changed. In fact, Windows has seen the biggest changes since the jump from Windows 3.1 to Windows 95.
Out goes the Start menu, in comes the new touch-oriented Start screen, new apps, new interface conventions - even experienced PC users may be left feeling a little lost.
Don't despair, though, help is at hand. We've been investigating every part of Windows 8, uncovering many of its most important tips and tricks, so read our guide and you'll soon be equipped to get the most out of Microsoft's latest release.

1. Lock screen

Windows 8 opens on its lock screen, which looks pretty but unfortunately displays no clues about what to do next.
It's all very straightforward, though. Just tap the space bar, spin the mouse wheel or swipe upwards on a touch screen to reveal a regular login screen with the user name you created during installation. Enter your password to begin.

2. Basic navigation

Windows 8 launches with its new interface, all colourful tiles and touch-friendly apps. And if you're using a tablet then it'll all be very straightforward: just swipe left or right to scroll the screen, and tap any tile of interest.
On a regular desktop, though, you might alternatively spin the mouse wheel to scroll backwards and forwards.
And you can also use the keyboard. Press the Home or End keys to jump from one end of your Start screen to the other, for instance, then use the cursor keys to select a particular tile, tapping Enter to select it. Press the Windows key to return to the Start screen; right-click (or swipe down on) apps you don't need and select Unpin to remove them; and drag and drop the other tiles around to organise them as you like.

3. App groups

The Start screen apps are initially displayed in a fairly random order, but if you'd prefer a more organised life then it's easy to sort them into custom groups.
You might drag People, Mail, Messaging and Calendar over to the left-hand side, for instance, to form a separate 'People' group. Click the 'minus' icon in the bottom right corner of the screen to zoom out and you'll now find you can drag and drop the new group (or any of the others) around as a block.
Right-click within the block (while still zoomed out) and you'll also be able to give the group a name, which - if you go on to add another 20 or 30 apps to your Start screen - will make it much easier to find the tools you need.
50 Windows 8 tips, tricks and secrets

4. Quick access menu

Right-click in the bottom left corner (or hold down the Windows key and press X) for a text-based menu that provides easy access to lots of useful applets and features: Device Manager, Control Panel, Explorer, the Search dialog and more.
50 Windows 8 tips, tricks and secrets

5. Find your applications

The Win+X menu is useful, but no substitute for the old Start menu as it doesn't provide access to your applications. To find this, hold down the Windows key and press Q or either right-click an empty part of the Start screen or swipe your finger up from the bottom of the screen and select 'All Apps' to reveal a scrolling list of all your installed applications. Browse the various tiles to find what you need and click the relevant app to launch it.
50 Windows 8 tips, tricks and secrets

6. Easy access

If there's an application you use all the time then you don't have to access it via the search system. Pin it to the Start screen and it'll be available at a click.
Start by typing part of the name of your application. To access Control Panel, for instance, type 'Control'. Right-click the 'Control Panel' tile on the Apps Search screen, and click 'Pin to Start'. If you're using a touchscreen, press and hold the icon, then flick down and select 'Pin to Start'.
Now press the Windows key, scroll to the right and you'll see the Control Panel tile at the far end. Drag and drop this over to the left somewhere if you'd like it more easily accessible, then click the tile to open the desktop along with the Control Panel window, and press the Windows key to return you to the Start screen when you're done.

7. Shutting down

To shut Windows 8 down, just move the mouse cursor to the bottom right corner of the screen, click the Settings icon - or just hold down the Windows key and press I - and you'll see a power button. Click this and choose 'Shut Down' or 'Restart'.
Some of the tricks available in previous versions of Windows still apply. Press Ctrl+Alt+Del, for instance, click the power button in the bottom right-hand corner and you'll be presented with the same 'Shut Down' and 'Restart' options.
And if you're on the desktop, press Alt+F4 and you'll be able to choose 'Shut Down', 'Restart', 'Sign Out' or 'Switch User' options.
50 Windows 8 tips, tricks and secrets

Friday 26 October 2012

Toturials and System Requirement of window 8

Microsoft today unveiled the “release preview” version of Windows 8 which mostly indicates that the new Windows operating system is feature-complete. Windows 8 Release Preview is available as a free download and it is very likely that your existing system specs are good enough to run Windows 8.
The System Requirements for Windows 8
According to Windows 8 FAQ, any machine equipped with 1 GB of RAM, 16 GB of hard disk space and 1 GHz processor should be able to handle Windows 8. The minimum RAM requirements are 2 GB in case you would like to install the 64-bit version of Windows 8.
Should you download Windows 8 Setup or the ISO Image?
Update: Where can I Download Windows 8?
As you may have noticed on the Windows 8 download page, the installation of Windows 8 can be done in two ways.
  1. You can either take the easiest route and download the Windows 8 Setup program – that’s also the default option.
  2. Alternatively, you can download ISO Images of Windows 8.
If you are planning to install Windows 8 on your existing computer, either on a different partition (dual-boot) or just want to upgrade from an older version of Windows to Windows 8, the default Setup program is a good choice.
Please note that that your installed software programs will only be preserved if you are upgrading from Windows 7 to Windows 8. If your planning to install Windows 8 on top of Windows XP or Vista, only the files will be preserved but not the various software programs that you may have on the disk.
The Windows 8 ISO image may be more handy in other situations like:
  1. Your computer has an x64 processor but is currently running the 32-bit version of Windows. If you want to install the 64-bit version of Windows 8, download the 64-bit ISO.
  2. You want to install Windows 8 on your Mac (iMac or Macbook) using Boot Camp software.
  3. You want to install Windows 8 on multiple computers. In that case, you can download the ISO once, create a bootable DVD and boot the other systems using this newly created Windows 8 disk.
  4. You plan to run Windows 8 as a Virtual Machine inside your existing copy of Windows.
  5. You are running Windows XP.
The universal product key for Windows 8 is TK8TP-9JN6P-7X7WW-RFFTV-B7QPF.
Will my software programs run inside Windows 8?
Before grabbing the ISO image of Windows 8, quickly run this setup utility and it will show a list of all software programs and hardware drivers on your system that are compatible with Windows 8. Alternatively, you can visit this page to see a list of all known software and hardware devices that are found to be working with Windows 8.
How should I go about installing Windows 8?
You can have Windows 8 on your computer in three ways – you can install Windows 8 side-by-side (also known as dual-boot), as a virtual machine (so that it runs inside your existing Windows just like any other software) or you can have Windows 8 as your primary OS (there’s no going back from here).
If you just want to try out Windows 8   but without modifying any of your existing set-up, the safest bet is to use a Virtual Machine. If you have a vacant disk partition or don’t mind creating one (it’s easy), go for the dual-boot option. Else, if you have a spare computer, you can consider upgrading to Windows 8 overwriting the previous installation of Windows.
Also note that if you are upgrading from Windows 8 Consumer Preview to the new Windows 8 Release Preview, none of your installed programs, files and account settings will be preserved though everything would be moved to the windows.old folder.

Download Window 8 Import Links

How to download Windows 8?
Before downloading windows 8, make sure you meet the minimum requirements required for installing Microsoft Win 8.
  • 1GHz or faster processor.
  • 1GB RAM for 32bit and 2Gb RAM for 64 bit
  • 16/20GB hard drive for 32/64 bit
Download the full version of Windows 8 ISO image from the link given in this post. If you’re using windows 7, you can directly use the inbuilt Disc Image burner software to write the ISO file into DVD or just use any third party software’s like Nero for burning the Windows 8 image into DVD or USB.
Note: If you’re planning to upgrade from Windows XP/Vista/7. the you have to install windows 8 without developer tools. For a clean install, all the builds are supported.


Download Links Link1 link2
Another Similar Links
Direct download links for Windows 8 
Windows 8 Developer Preview with developer tools English, 64-bit (x64): DOWNLOAD (4.8 GB)
Windows 8 Developer Preview English, 64-bit (x64): DOWNLOAD (3.6 GB)
Windows 8 Developer Preview English, 32-bit (x86): DOWNLOAD (2.8 GB)


The 10 best features in windows 8

Easy Gestures

Windows 8 is the first truly gestural version of Windows. The OS supports intuitive simple touch gestures like swiping in from the left to switch apps and swiping in from the right for the Charms menu. Semantic zoom is another big winner. Whether you’re in the Start Screen or a specific app, like the People hub, you can navigate using the pinch-to-zoom gesture to get a high-level view. For example, you can use semantic zoom in the News app to see all of the news sections available, instead of having to scroll through the app.
Other useful gestures include swiping in from the top of the screen for app-specific commands and settings and dragging an app from the top down to close it out.

For more click Here

Friday 19 October 2012

Signleton Design Pattern in Java

A singleton is a class that is instantiated only once. This is typically accomplished by creating a static field in the class representing the class. A static method exists on the class to obtain the instance of the class and is typically named something such as getInstance(). The creation of the object referenced by the static field can be done either when the class is initialized or the first time that getInstance() is called. The singleton class typically has a private constructor to prevent the singleton class from being instantiated via a constructor. Rather, the instance of the singleton is obtained via the static getInstance() method.
The SingletonExample class is an example of a typical singleton class. It contains a private static SingletonExample field. It has a private constructor so that the class can't be instantiated by outside classes. It has a public static getInstance() method that returns the one and only SingletonExample instance. If this instance doesn't already exist, the getInstance() method creates it. The SingletonExample class has a public sayHello() method that can be used to test the singleton.

SingletonExample.java

package com.cakes;

public class SingletonExample {

 private static SingletonExample singletonExample = null;

 private SingletonExample() {
 }

 public static SingletonExample getInstance() {
  if (singletonExample == null) {
   singletonExample = new SingletonExample();
  }
  return singletonExample;
 }

 public void sayHello() {
  System.out.println("Hello");
 }
}
The Demo class obtains a SingletonExample singleton class via the call to the static SingletonExample.getInstance(). We call the sayHello() method on the singleton class. Executing the Demo class outputs "Hello" to standard output.

Demo.java

package com.cakes;

public class Demo {

 public static void main(String[] args) {
  SingletonExample singletonExample = SingletonExample.getInstance();

  singletonExample.sayHello();
 }

}
Singleton classes are a useful way of concentrating access to particular resources into a single class instance.

Solr Indexing using Java ??

Coming soon

Saturday 13 October 2012

http://onerupya.blogspot.com/KEEzS826C3bra1bLcl9VuazH2eY.html

http://onerupya.blogspot.com/KEEzS826C3bra1bLcl9VuazH2eY.html

Friday 12 October 2012

Setting/Increase JVM heap size on Eclipse

java programs executes in JVM uses Heap of memory to manage the data. If your Java program requires a large amount of memory, it is possible that the virtual machine will begin to throw OutOfMemoryError instances when attempting to instantiate an object. The default heap size if 1 MB and can increase as much as 16 MB.

Setting/Increase JVM heap size on Eclipse

Right click on the main program -

run-configuration->-ArgumentTab->Inside VM   and insert the paramter.
-Xms<size>        set initial Java heap size
-Xmx<size>        set maximum Java heap size
such as  
-Xms 510 -Xmx 2048

--click on on apply and run the program.

Thanks