Olá, terminei uma aplicação que usei como BD o HSQLDB. Ele no netbeans funciona normalmente, mas quando construo um .jar, ele não executa. Já desinstalei o winrar por maior precaução.
Na minha pasta do projeto, na pasta dist/lib, está o JAR do HSQLDB. e um diretóio anterior (/dist) está o jar do projeto.
Será que preciso fazer algo pra conectar os dois jar ?
Estou com a mesma situação. Eu crio o JAR e tals, mas na hora de executá-lo não vai, e quando eu compilo o arquivo .java, pelo cmd (até pq pelo netbeans roda normalmente), ele diz que o probloema está na sintaxe do import, sendo que está tudo ok… Procuro respostas…
Consegui fazer ele rodar pelo menos. (estava zerando um vetor logo no inicio, deixei de zerar, e funcionou).
Só que agora estou com problemas nos botões. Eles não chamam (apenas pelo DOS, pelo netbeans funciona normal) telas que apresentam imagens. Imagens que eu coloco como icon em JLabels.
O erro é o seguinte: (se eu tiro as imagens, ele roda normalmente, mas é o logo da empresa)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at Cadastro.initComponents(Cadastro.java:84)
at Cadastro.<init>(Cadastro.java:10)
at Index.button_cadastrarActionPerformed(Index.java:143)
at Index.access$000(Index.java:3)
at Index$1.actionPerformed(Index.java:42)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(UnknownSource)
at java.security.AccessControlContext$1.doIntersectionPrivilege(UnknownSource)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(UnknownSource)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)