Hello community, I just create a mini application which joins two tables of two different databases using a common column and creates and excel with the results.
I create a tiny main with awt, with a button, when the button is clicked, it generates the file with the results. This works fine with Eclipse but when I export the project to a Executable JAR, and I execute it, the GUI seems to work fine, not the logic, does nothing. Help please. import java.awt.*; import javax.swing.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.util.Date; public class Inventari { /** * @param args */ public static void main(String[] args) { //WindowUtilities.setNativeLookAndFeel(); JFrame f = new JFrame("This is a test"); f.setSize(400, 150); Container content = f.getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); JLabel TF_Text = new JLabel ("Click to create the File!"); content.add(TF_Text); JButton BTN_generateInventary = new JButton("Inventari"); BTN_generateInventary.addActionListener(new buttonActions (TF_Text)); content.add(BTN_generateInventary); f.setVisible(true); } } class buttonActions implements ActionListener { private String _info = ""; private JLabel _TF_Text; public buttonActions(JLabel TF_Text) { _TF_Text = TF_Text; _TF_Text.setText("Creant..."); } public void actionPerformed(ActionEvent e) { String filePath = System.getProperty("user.home") + "/Desktop/"; Date d = new Date(); String fileName = "INVENTARI_WHAREHOUSE ("+ d.getDay() + "-" + d.getMonth() + "-" + d.getYear() + ").xls"; DataLoader dl = new DataLoader(filePath,fileName,true); dl.executeProcedure(dl.WHAREHOUSE_TOTAL_VALUE); _TF_Text.setText("Created!"); } } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---