I have a java gui that was written for me a few years ago to provide a user interface for a command line application. After updating my jre to 1.7.0_17-b02, the application will no longer start. I opened the src in eclipse and ran it in the debugger and I get a list of exceptions. I get the same exceptions at runtime if I run it from the command line with java -jar.
log4j:WARN No appenders could be found for logger (com.intensivek.winmolconn.WinMolconn).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.intensivek.myapp.dialogs.OptionsDialog.initCom ponents(OptionsDialog.java:62)
at com.intensivek.myapp.dialogs.OptionsDialog.<init>( OptionsDialog.java:41)
at com.intensivek.myapp.appmain.<init>(appMain.java:2 63)
at com.intensivek.myapp.appmain$1.run(appMain.java:22 2)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Looking at the src that is referenced here, this stuff is pretty bland,
(OptionsDialog.java:62) is:
border.setTitleFont(border.getTitleFont().deriveFo nt(Font.BOLD));
(OptionsDialog.java:41) is:
initComponents();
It seems as if the issue is with the function, private void initComponents() {}, so I have included that function below.
private void initComponents() { setTitle(myApp.TITLE + " - Options"); getContentPane().setLayout(new MigLayout("fill")); oPanel = new JPanel(new MigLayout("fillx")); TitledBorder border = new TitledBorder("Option"); border.setTitleFont(border.getTitleFont().deriveFont(Font.BOLD)); oPanel.setBorder(border); oAutosaveCheckbox = new JCheckBox("Autosave GUI Configuration On Exit"); oAutosaveCheckbox.setSelected(OptionsManager.getInstance().isAutosave()); oPanel.add(oAutosaveCheckbox, "spanx, wrap"); oFilenameLabel = new JLabel("Exe PATH:"); oFilenameTextfield = new JTextField(OptionsManager.getInstance().getExecutablePath()); oFilenameButton = new JButton("Open"); oFilenameButton.addActionListener(this); oPanel.add(oFilenameLabel); oPanel.add(oFilenameTextfield, "growx, pushx"); oPanel.add(oFilenameButton); add(oPanel, "spanx, growx, wrap"); okButton = new JButton("Ok"); okButton.addActionListener(this); add(okButton); cancelButton = new JButton("Cancel"); cancelButton.addActionListener(this); add(cancelButton,"gap push"); }
I hope at this point that the rest of the exceptions are a cascade from something going wrong early in the application setup. I need to get this figured out. Are there any know issues with the most recent upgrade that may affect the execution of the code above?
These are the includes from the src file with the above function,
import java.awt.Dimension; import java.awt.Font; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JDialog; import javax.swing.JFileChooser; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.border.TitledBorder; import net.miginfocom.swing.MigLayout; import com.intensivek.myapp.appMain; import com.intensivek.myapp.utils.OptionsManager;
I am a c++/c/fortran programmer, so I am out of my depth here. I can post more of the code if that would be useful.
I looked at the sub forums to see if there was an appropriate one for this question, but nothing stood out to me. Please move this post if it was misplaced.
LMHmedchem