123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
Use of Runtime Class.

--------------------------------------------------------------------------------

Description : Runtime class is used to execute the dos command as well as
running the other applications such as word,notepad etc.
This Example shows you how to send message to other machine through Java
code.. I have used for loop just for sending one message for no of times
..

import java.io.*;
class test extends Thread
{
public void run()
{
Runtime r=Runtime.getRuntime();
Process p=null;
try
{
for(int i=0;i<=100;i++)
{
p=r.exec("net send vishal how r u!");
//p.waitFor();
Thread.sleep(5000);
}
}
catch(Exception e)
{
System.out.println(e);
}
}

public static void main(String args[])
{
test t=new test();
t.run();

}
 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG