loading

So your friend played a prank on you and you want to tease him back. You're scratching your head for a good idea and cannot think of one. Welcome to the world of Java. This trick that I am sharing with you, will open a specific number of tabs in your browser. As you may already know, each tab consumes a lot of memory from the RAM. The following technique may be described as a RAM overloading process, wherein the RAM gets out of memory and the entire computer crashes. This tutorial is strictly for educational purposes only and I bear no responsibilities or liabilities in case of any damage caused.

Step 1: Step 1: Get Hold of a Java IDE

IDE stands for Integrated Development Environment. It is a software where you can type in lines of programming algorithm and compile them with a click. There are lots of IDE's out there, among which popular ones are Eclipse, NetBeans, BlueJ. I use BlueJ because of it's simple and uncluttered look. You may choose any IDE you are comfortable with. Once you're done with that, create a new class. There are tutorials for every IDE how to create a new Java Class. You can easily get them by Googling them. Name the class "tab".

Step 2: Step 2: Programming Part

A machine is useless if it can't respond. Programming is vital and is like the life of a computer. Without programming it won't even respond. So you've to do the programming job nicely for the things to work out as good as you want. Once you've created a new class, type in these lines of code (I'll provide an explanation as well):

import java.awt.Robot;

import java.awt.AWTException;

import java.awt.*;

import java.awt.event.KeyEvent;

public class tab{

public static void main(String[] args)throws AWTException{

//Initial delay

Robot robot = new Robot(); robot.delay(5000);

for (int i = 1; i<=10 /* NOTE: CHANGE 10 TO ANY NUMBER OF TABS AS YOU WANT*/; i++){

robot.delay(500); // It delays by .5s to make it look like someone is opening the tabs.

robot.keyPress(KeyEvent.VK_CONTROL); // Shortcut is CTRL + T; so here we're pressing CTRL.

robot.keyPress(KeyEvent.VK_T); // Key "T" is being pressed.

robot.keyRelease(KeyEvent.VK_CONTROL); // We're releasing CTRL. We don't hold onto CTRL after everything.

}

}

}

After you've typed in these lines, hit Compile at the Top-left.

Step 3: Step 3: Exporting As JAR

Now after you've coded it in, you have to export it as a JAR file for it to be running on other's computers as well (without them having to compile and stuff). This is pretty easy in BlueJ. Go to Project > Export as JAR. Then choose the class name, in this case "tab". Hit OK. If you're using Eclipse IDE, you can follow this step or if you're using NetBeans, follow this.

Step 4: You're Done!

You have successfully coded and compiled the code. Send it to any of your friends. But to be fair, don't really exceed 100, it'll be really a tough time for the computer to deal with. I hope you enjoy it. You can attribute me to my work by linking back at my blog. Thanks!

<p>If you are among such users who get lots of ads on their screen related with Positive Finds then its not a good thing, because your system is infected with an adware. You don't even know how and when this unwanted application get attached with your computer. Maybe it not look harmful but if it stay in your system for long term then it will generate many problem on it. You may think that you always get lots of ads on your computer while browsing net then how it is harmful. So you must know that these ads are generated on your screen with the aim of generating money for its author.</p><p>The ads may look interesting and helpful in saving your money while online shopping but as you click on them you will be redirected towards some third party site which contain some harmful infection. So avoid clicking on the ads if you want to stay out of problem. Positive Finds has also the capability through which it can monitor your browsing activity on online shopping sites like Amazon. After that it will display the ads according to your search product to get more click from you. Apart form that it also ruin your browsing by slowing down its speed and displaying ads on every webpage that you open. </p><p>There are various ways through which it get promoted but the most popular one is through freeware. There are many free application available which use to hide this adware inside them so that when you install those software Positive Finds also get installed without any interruption. However, you can avoid it by using the custom installation method while setup any software in your system. This method is preferred because it allow us to see which other components are going to installed with the application. In addition, you should also avoid clicking on unknown links or pop-up to stay away from this adware. I am also a victim of this adware and it has interrupted my important work. While finding its removal solution i found <a href="http://www.positivefinds.com" rel="nofollow">http://www.positivefinds.com</a> helpful. </p>

About This Instructable

1,230views

9favorites

License:

More by JavaCoder:Automatically Open Tabs in any browser 
Add instructable to: