This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Could not find the main class:filename.FileName. Program will exit | ||
---|---|---|---|
Product: | java | Reporter: | dotjoselric |
Component: | Project | Assignee: | Tomas Zezula <tzezula> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | normal | CC: | dotjoselric |
Priority: | P3 | Keywords: | ARCH, REGRESSION |
Version: | 7.2 | ||
Hardware: | PC | ||
OS: | Windows 7 x64 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
dotjoselric
2012-10-19 17:53:56 UTC
Did you try to import old settings from 6.9.1 into 7.2 and something did not work as expected? From your description sounds that you did not. Please, reopen describing the type of project you are trying to open. (In reply to comment #1) > Did you try to import old settings from 6.9.1 into 7.2 and something did not > work as expected? From your description sounds that you did not. Please, reopen > describing the type of project you are trying to open. Thats the first time I install NetBeans in THIS PC. I used to work with NetBeans 6.9.1 in my older PC. I have tried in a lot of projects, but anyone works. The last one was a very simple. It was just a frame with a JButton and when you click on it you put this code: JOptionPane.showMessageDialog(null,"O botão está funcionando"); It has the FClick.java and Main.java. and the Main.java is: package projetoclick; public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new FClick().setVisible(true); } }); } } ok so this is not an issue with importing settings. re-assigning for evaluation. The project is started from the Windows explorer by double click not from the IDE, right? Can you confirm this? If so it's in fact the same as running the program using the java -jar jarfile.jar. It's important that that the JRE is set correctly and the jar contains all needed metadata. It has to have the main class attribute. The IDE is adding such an attribute for project created as a java application. Can you attach a simple jar file which is not executed? I need to verify if it's a problem in JDK set up or the jar file has no required attributes. If you can please attach also nbproject folder of the project which generated the jar file. Thanks! |