Estou com um problema com um projeto do Netbeans.
Um amigo meu fez esses codigos pra mim. Porem quando eu clico em construir ele gera o Jar.
init:
deps-jar:
compile:
Copy libraries to C:\Users\HOME\Documents\Leonardo\Launcher Aion\dist\lib.
To run this application from the command line without Ant, try:
java -jar "C:\Users\HOME\Documents\Leonardo\Launcher Aion\dist\Launcher_Aion.jar"
jar:
CONSTRUÍDO COM SUCESSO (tempo total: 0 segundos)
eu executo ele da esse problema
Could not find the Main class br.com.none.gui.Main. Program Will exit
codigo fonte é esse
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Main.java
*
* Created on 09/01/2010, 18:53:05
*/
package br.com.none.gui;
import br.com.none.util.Config;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import org.jdesktop.jdic.browser.BrowserEngineManager;
import org.jdesktop.jdic.browser.WebBrowser;
/**
*
* @author Caio
*/
public class Main extends javax.swing.JFrame {
/** Creates new form Main */
public Main() throws Exception {
setUndecorated(true);
Config.getInstance();
initComponents();
setWebPage();
setLocationRelativeTo(null);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jButton1 = new javax.swing.JButton();
jTabbedPane1 = new javax.swing.JTabbedPane();
jLabel1 = new javax.swing.JLabel();
jButton2 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setIconImage(new ImageIcon("images/AionClient.png").getImage());
jButton1.setText("Jogar");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jLabel1.setIcon(new javax.swing.ImageIcon("C:\Users\HOME\Documents\Leonardo\Launcher Aion\images\aion-the-tower-of-eternity_54425.jpg")); // NOI18N
jTabbedPane1.addTab("AION FOCUS", jLabel1);
jButton2.setText("Sair");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 716, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 503, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))
.addContainerGap())
);
pack();
}// </editor-fold>
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try {
startGame();
} catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
public void setWebPage() throws MalformedURLException {
//WebBrowser.setDebug(true);
BrowserEngineManager bem = BrowserEngineManager.instance();
bem.setActiveEngine(BrowserEngineManager.IE);
WebBrowser wb = new WebBrowser();
wb.setURL(new URL(Config.WEB_URL));
jTabbedPane1.add(wb, Config.TAB_WEB);
}
public void startGame() throws Exception {
Process p;
p = Runtime.getRuntime().exec("cmd /c cd " + Config.NEW_PATH);
p = Runtime.getRuntime().exec("cmd /c start bin32\aion.bin -ip:127.0.0.1 -ng");
System.exit(0);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
try {
new Main().setVisible(true);
} catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JTabbedPane jTabbedPane1;
// End of variables declaration
}
Ja pesquisei varios topicos porem nenhum resolve o meu problema.
Quando eu executo pelo Netbeans. ele aparece Running.. perfeito.
Obrigado