Help: Java Application Development

speedyguy

Cyborg Agent
Hi,

I am presently starting from scratch to create an application that would call a perl scrip and the perl script in turn would perform some informatica commands via unix shell script (not important if you did not understand this at this point).

So basically, I need to have a UI (to be run on windows 7 32-bit machine) which should have some options, buttons which should be able to call perl scripts and connect to backend database. I'm presently looking at Java.

So the lame question is, how do I kick-start a Java Application Development using eclipse which would have a GUI and can be made into an executable file. Also, if not java then where else can I look at. I'm open to options.

Enjoy~!
 

dashing.sujay

Moving
Staff member
Nothing easier than C# for desktop dev, but I can't comment if it can fulfill your purpose. I just find it too easy ;)
 

dead.night7

Journeyman
So basically, I need to have a UI, which should have some options, buttons which should be able to call perl scripts

Start with netbeans if you need to build a gui, downloading JDK7 along with netbeans 7.2 and start up with building a basic Swing App, try to look into some example code that netbeans provides
Or just
try to build a basic calculator in swing (Java), Or in any other language (This might give you a headstart)

and connect to backend database.

Start up with having create a simple application in JDBC with MySQL or MS. Access as your example database (Both db's have different set of steps to connect to), you will find plenty of example videos to teach you.
 
OP
speedyguy

speedyguy

Cyborg Agent
thanks for your replies. In the meanwhile, I started off with Eclipse IDE to create some simple Java swing GUI. So now I have a panel with label, textbox, button. Would anyone share on how we create an action listener for the button which would run a perl script in my local C: drive.

public class swing {
public static void main(String[] args)
{
JFrame frame = new JFrame("Tester Frame");
frame.setVisible(true);
frame.setSize(400,200);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel label1 = new JLabel("Tester Label");
JPanel panel1 = new JPanel();
frame.add(panel1);
panel1.add(label1);
JTextField text1 = new JTextField(30);
panel1.add(text1);
JButton button1 = new JButton("Button Test");
panel1.add(button1);


//code for the button action event

button1.addMouseListener(new java.awt.event.MouseAdapter(){

public void mouseClicked(java.awt.event.MouseEvent evt){
}
private void button1Clicked(MouseEvent evt) throws IOException
{
String[] Cmd = {"cmd.exe", "/c perl.exe -S check.pl"}
Process exec = Runtime.getRuntime().exec(Cmd);
BufferedReader in = new BufferedReader(
new InputStreamReader(exec.getInputStream()));
String line = null;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
}
});
}
}

PS: Is it fine to work in Eclipse, or Netbeans is where I switch to?

Enjoy~!
 
Top Bottom