Hi every1 B) !
I wanna tell something about java.....java is the best language out there when it comes to security... and microsoft copied it's security feature and labelled a new language C# that is 70% java and mix of other things from other languages and some new features also.
BUT WHY THE H ELL U WANNA USE JAVA
A)IT NEEDS FIRST OF ALL
So u want to run and .exe file in java well here it is-
import javax.swing.*;
import java.awt.event.*;
public class testinghyper1
{
JButton b1;
public testinghyper1()
{
JFrame f=new JFrame("This program needs JDK!");
b1=new JButton("click me!");
b1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
try{
Runtime.getRuntime().exec("explorer
http://www.google.com.my");
//to open notepad use
//........exec("notepad");
//to open calculator use
//.....exec("explor
Hi every1 B) !
I wanna tell something about java.....java is the best language out there when it comes to security... and microsoft copied it's security feature and labelled a new language C# that is 70% java and mix of other things from other languages and some new features also.
BUT WHY THE H ELL U WANNA USE JAVA
A)IT NEEDS FIRST OF ALL IT NEEDS java runtime enviroment
B)U CAN ONLY INVOKE IT BY USING
java <filename>
But there is a way to convert ur java files to .exe go to www.towerj.com and download the software that can convert ur java files to .exe.
So i have solved all ur problems.
So u want to run and .exe file in java well here it is-
import javax.swing.*;
import java.awt.event.*;
public class testinghyper1
{
JButton b1;
public testinghyper1()
{
JFrame f=new JFrame("This program needs JDK!");
b1=new JButton("click me!");
b1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
try{
Runtime.getRuntime().exec("explorer
http://www.google.com.my");
//to open notepad use
//........exec("notepad");
//to open calculator use
//.....exec("explorer C:\\WINDOWS\\system32\\calc.exe");
//and similarly use can invoke anyfile in the pc.just speacify the path.
}
catch(Exception g){}
}});
f.getContentPane().add(b1);
f.pack();
f.setVisible(true);
}
public static void main(String args[])
{
new testinghyper1();
}
}
okay!
Now u said u also need to connect to the web use the
import java.net.*; //package!
sorry bro! time's up i got to go don't hav much time!
lol!