starting java from cmd froze on click event
I'm starting java from command prompt windows 7 64bit. jre7
First Jframe widow is ok, than I click on button and than secound window opens with Jtable which is populated from oracle db. This work ok.
But than on second window I click button which should open third window (Jframe) with some textboxes to insert new data, but that doesn't happend rather when I click that button everything freezes and button looks (visualy) like it is pressed but isn't released.
In eclipse everything runs fine. I can't figure out reason why is problem when starting from command prompt
Please help it is urgent because it is for job interview
Re: starting java from cmd froze on click event
With no code we can only guess, but I suspect you are doing stuff on the button click event on the EDT (the "Swing Thread") that should be in its own thread, and whatever it is is hanging.
Re: starting java from cmd froze on click event
is this a problem than , this is event handler of frozen button
Code:
btnInsert.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Component component = (Component) arg0.getSource();
tableWindow window = (tableWindow) SwingUtilities.getRoot(component);
switch(window.windowType)
{
case "Orders":
insertOrder();
break;
case "Buyers":
insertBuyer();
break;
case "Cars":
insertCar();
break;
case "Staff":
insertStaff();
break;
default:
break;
}
}
});
Re: starting java from cmd froze on click event
Please use [code] tags [/code] when posting code.
No idea on that code as whatever is causing the problem is likely in one (or all) of those methods.
I would recommend sticking some debug code around liberally to see where it gets to.
Re: starting java from cmd froze on click event
Quote:
Originally Posted by
Tolls
Please use [code] tags [/code] when posting code.
No idea on that code as whatever is causing the problem is likely in one (or all) of those methods.
I would recommend sticking some debug code around liberally to see where it gets to.
here is the message. what is it about?
Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.valida tion)
Re: starting java from cmd froze on click event
What message?
Where did that come from?
Re: starting java from cmd froze on click event
Quote:
Originally Posted by
Tolls
What message?
Where did that come from?
Workspace Log in eclipse (Warning category)
but i started program from command prompt java -jar . But seems eclipse tracks java everywhere
Re: starting java from cmd froze on click event
I doubt that is anything to do with your execution of that code from the command line.
Re: starting java from cmd froze on click event
I think it does couse time of warining in logs are exactly when program freezes and only than and everytime same message
Re: starting java from cmd froze on click event
Re: starting java from cmd froze on click event
Unless you have eclipse code in your application or you are (possibly) using eclipse's JRE then there is no way Eclipse will know that you are executing code from the command line.
So, going back to my post #4, stick a load of debug code in there to find out what's going on.