Por que meu Netbeans não cria um novo projeto?

0

Acabei de instalar o NetBeans 8.2 e tudo pareceu correr bem. Eu fiz quase 100% de default, exceto removendo um ou dois módulos que eu nunca precisaria, e alterando o espaço de trabalho padrão na primeira vez que ele rodou.

Agora não fará nada. Quando clico no comando File->New Project , nada acontece. Quando clico em vários outros comandos, simplesmente nada acontece.

O log do IDE mostra um rastreamento de pilha após eu tentar criar um projeto. Este é esse traço:

SEVERE [global]
java.lang.ClassNotFoundException: javax.activation.DataContentHandlerFactory
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
    at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:222)
Caused: java.lang.ClassNotFoundException: javax.activation.DataContentHandlerFactory starting from ModuleCL@6c9be2b3[org.openide.awt] with possible defining loaders null and declared parents [org.netbeans.MainImpl$BootClassLoader@7a1ebcd8, ModuleCL@28e83a83[org.netbeans.api.annotations.common]]
    at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:224)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
Caused: java.lang.NoClassDefFoundError: javax/activation/DataContentHandlerFactory
    at org.openide.awt.QuickSearch.setUpSearch(QuickSearch.java:369)
    at org.openide.awt.QuickSearch.<init>(QuickSearch.java:107)
    at org.openide.awt.QuickSearch.attach(QuickSearch.java:197)
    at org.openide.awt.QuickSearch.attach(QuickSearch.java:125)
    at org.openide.explorer.view.TreeView$ExplorerTree.setupSearch(TreeView.java:1936)
    at org.openide.explorer.view.TreeView$ExplorerTree.<init>(TreeView.java:1753)
    at org.openide.explorer.view.TreeView.initializeTree(TreeView.java:299)
    at org.openide.explorer.view.TreeView.<init>(TreeView.java:238)
    at org.openide.explorer.view.TreeView.<init>(TreeView.java:228)
    at org.openide.explorer.view.BeanTreeView.<init>(BeanTreeView.java:98)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$CategoriesBeanTreeView.<init>(TemplatesPanelGUI.java:679)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$CategoriesPanel.createComponent(TemplatesPanelGUI.java:729)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$ExplorerProviderPanel.initGUI(TemplatesPanelGUI.java:644)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$ExplorerProviderPanel.<init>(TemplatesPanelGUI.java:535)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$CategoriesPanel.<init>(TemplatesPanelGUI.java:719)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$CategoriesPanel.<init>(TemplatesPanelGUI.java:719)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI.initComponents(TemplatesPanelGUI.java:421)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI.<init>(TemplatesPanelGUI.java:156)
    at org.netbeans.modules.project.ui.ProjectTemplatePanel.getComponent(ProjectTemplatePanel.java:187)
    at org.netbeans.modules.project.ui.NewProjectWizard.createTemplateChooser(NewProjectWizard.java:104)
    at org.openide.loaders.TemplateWizard.templateChooser(TemplateWizard.java:320)
    at org.openide.loaders.TemplateWizardIterImpl.firstPanel(TemplateWizardIterImpl.java:87)
    at org.openide.loaders.TemplateWizardIterImpl.current(TemplateWizardIterImpl.java:144)
    at org.openide.loaders.TemplateWizardIteratorWrapper.current(TemplateWizardIteratorWrapper.java:92)
    at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:844)
    at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:822)
    at org.openide.loaders.TemplateWizard.updateState(TemplateWizard.java:761)
    at org.netbeans.modules.project.ui.NewProjectWizard.updateState(NewProjectWizard.java:84)
    at org.openide.WizardDescriptor._updateState(WizardDescriptor.java:800)
    at org.openide.WizardDescriptor.access$200(WizardDescriptor.java:92)
    at org.openide.WizardDescriptor$Listener.stateChanged(WizardDescriptor.java:2180)
    at org.openide.util.WeakListenerImpl$Change.stateChanged(WeakListenerImpl.java:356)
    at org.openide.loaders.TemplateWizardIterImpl.run(TemplateWizardIterImpl.java:275)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.project.ui.actions.NewProject$1
java.lang.ClassNotFoundException: javax.activation.DataContentHandlerFactory
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
    at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:222)
Caused: java.lang.ClassNotFoundException: javax.activation.DataContentHandlerFactory starting from ModuleCL@6c9be2b3[org.openide.awt] with possible defining loaders null and declared parents [org.netbeans.MainImpl$BootClassLoader@7a1ebcd8, ModuleCL@28e83a83[org.netbeans.api.annotations.common]]
    at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:224)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
Caused: java.lang.NoClassDefFoundError: javax/activation/DataContentHandlerFactory
    at org.openide.awt.QuickSearch.setUpSearch(QuickSearch.java:369)
    at org.openide.awt.QuickSearch.<init>(QuickSearch.java:107)
    at org.openide.awt.QuickSearch.attach(QuickSearch.java:197)
    at org.openide.awt.QuickSearch.attach(QuickSearch.java:125)
    at org.openide.explorer.view.TreeView$ExplorerTree.setupSearch(TreeView.java:1936)
    at org.openide.explorer.view.TreeView$ExplorerTree.<init>(TreeView.java:1753)
    at org.openide.explorer.view.TreeView.initializeTree(TreeView.java:299)
    at org.openide.explorer.view.TreeView.<init>(TreeView.java:238)
    at org.openide.explorer.view.TreeView.<init>(TreeView.java:228)
    at org.openide.explorer.view.BeanTreeView.<init>(BeanTreeView.java:98)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$CategoriesBeanTreeView.<init>(TemplatesPanelGUI.java:679)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$CategoriesPanel.createComponent(TemplatesPanelGUI.java:729)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$ExplorerProviderPanel.initGUI(TemplatesPanelGUI.java:644)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$ExplorerProviderPanel.<init>(TemplatesPanelGUI.java:535)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$CategoriesPanel.<init>(TemplatesPanelGUI.java:719)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$CategoriesPanel.<init>(TemplatesPanelGUI.java:719)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI.initComponents(TemplatesPanelGUI.java:421)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI.<init>(TemplatesPanelGUI.java:156)
    at org.netbeans.modules.project.ui.ProjectTemplatePanel.getComponent(ProjectTemplatePanel.java:187)
    at org.netbeans.modules.project.ui.NewProjectWizard.createTemplateChooser(NewProjectWizard.java:104)
    at org.openide.loaders.TemplateWizard.templateChooser(TemplateWizard.java:320)
    at org.openide.loaders.TemplateWizardIterImpl.firstPanel(TemplateWizardIterImpl.java:87)
    at org.openide.loaders.TemplateWizardIterImpl.current(TemplateWizardIterImpl.java:144)
    at org.openide.loaders.TemplateWizardIteratorWrapper.current(TemplateWizardIteratorWrapper.java:92)
    at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:844)
    at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:822)
    at org.openide.loaders.TemplateWizard.updateState(TemplateWizard.java:761)
    at org.netbeans.modules.project.ui.NewProjectWizard.updateState(NewProjectWizard.java:84)
    at org.openide.loaders.TemplateWizard$2.run(TemplateWizard.java:497)
    at org.openide.loaders.TemplateWizard$2.run(TemplateWizard.java:494)
    at org.netbeans.modules.openide.util.NbMutexEventProvider$Event$1AWTWorker.run(NbMutexEventProvider.java:156)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[catch] at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
INFO [org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogParser]: Unpaired license 00000008 without any module.
INFO [null]: Last record repeated again.
    
por ProfK 25.11.2017 / 05:17

2 respostas

1

Por favor, esclareça a versão do jdk. No meu caso eu uso a próxima solução: O NetBeans 8.2 não é compatível com o jdk 9. Estou temporariamente renomeando o diretório jdk-9 e mudo o jdkhome padrão na reinicialização. Ou altere o netbeans_jdkhome em etc \ netbeans.conf.

    
por 26.11.2017 / 09:02
0

Talvez isso ajude também.

O JDK 9 ainda não funciona com o NetBeans 8.2. Você precisa de pelo menos JDK 8 , JRE 8 .

Abra uma linha de comando e digite "javac -version" para ver a versão do JDK.

No netbeans, sob a aba "tools" escolha "java-platforms" e adicione o JDK 8 como padrão através de "add Platform" (pasta jdk). Ou tente reinstalar o netbeans e escolher o JDK 8 durante a instalação.

Algumas respostas aqui e < href="https://stackoverflow.com/questions/6950960/how-to-set-the-jdk-netbeans-runs-on"> aqui .

    
por 26.11.2017 / 15:28