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.

Bug 41847

Summary: StringIndexOutOfBoundsException when creating new J2SE project with main class in default package
Product: projects Reporter: David Konecny <dkonecny>
Component: Generic InfrastructureAssignee: Petr Hrebejk <phrebejk>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41537    

Description David Konecny 2004-04-08 13:21:57 UTC
Pasted from nbusers:

java.lang.StringIndexOutOfBoundsException: String
index out of range: -1
	at java.lang.String.substring(String.java:1444)
	at
org.netbeans.modules.java.j2seproject.J2SEProjectGenerator.createMainClass(J
2SEProjectGenerator.java:130)
	at
org.netbeans.modules.java.j2seproject.J2SEProjectGenerator.createProject(J2S
EProjectGenerator.java:121)
	at
org.netbeans.modules.java.j2seproject.ui.wizards.NewJ2SEProjectWizardIterato
r.instantiate(NewJ2SEProjectWizardIterator.java:82)
	at
org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:528
)
	at
org.openide.loaders.TemplateWizard.instantiateImpl(TemplateWizard.java:444)
	at
org.openide.loaders.TemplateWizard.instantiate(TemplateWizard.java:330)
Comment 1 David Konecny 2004-04-08 13:27:09 UTC
Also settings "main.class" does not provide any error message as it
should. It just logs to console: 

     [exec] INFORMATIONAL *********** Exception occurred ************
at 2:25 PM
 on Apr 8, 2004
     [exec] java.io.IOException: The specified name is not valid for
use in a Ja
va source file: class
Comment 2 Jesse Glick 2004-05-01 02:48:16 UTC
I think the SIIOBE is already fixed.
Comment 3 Petr Hrebejk 2004-05-24 09:30:47 UTC
Yes already fixed.
Comment 4 Marian Mirilovic 2005-12-14 16:47:15 UTC
verified