Project: JDT
Bug 347302 [preferences] NumberFormatException: For input string: "container" when creating new Java project
Reported: 2011-05-26 08:32:51 | Status: verified fixed

Build Identifier: I20110524-2200 I'm getting 4 exceptions during the File->New Java Project and only after pressing the first Next button. These are seen only in Error Log (view). They are all titles the same: `Error while decoding JRE entry` Eclipse SDK Version: 4.1.0 Build id: I20110524-2200 eclipse.buildId=I20110524-2200 java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86_64 here are the exceptions in the order of occurrence: ============= java.lang.NumberFormatException: For input string: "container" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage.decodeJRELibraryClasspathEntries(NewJavaProjectPreferencePage.java:145) at org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage.getDefaultJRELibrary(NewJavaProjectPreferencePage.java:102) at org.eclipse.jdt.ui.PreferenceConstants.getDefaultJRELibrary(PreferenceConstants.java:4004) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageOne.getDefaultClasspathEntries(NewJavaProjectWizardPageOne.java:1289) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.initializeBuildPath(NewJavaProjectWizardPageTwo.java:304) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.updateProject(NewJavaProjectWizardPageTwo.java:252) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.access$2(NewJavaProjectWizardPageTwo.java:200) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo$1UpdateRunnable.run(NewJavaProjectWizardPageTwo.java:161) at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) ---------------- java.lang.NumberFormatException: For input string: "org.eclipse.jdt.launching.JRE_CONTAINER" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage.decodeJRELibraryClasspathEntries(NewJavaProjectPreferencePage.java:145) at org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage.getDefaultJRELibrary(NewJavaProjectPreferencePage.java:102) at org.eclipse.jdt.ui.PreferenceConstants.getDefaultJRELibrary(PreferenceConstants.java:4004) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageOne.getDefaultClasspathEntries(NewJavaProjectWizardPageOne.java:1289) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.initializeBuildPath(NewJavaProjectWizardPageTwo.java:304) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.updateProject(NewJavaProjectWizardPageTwo.java:252) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.access$2(NewJavaProjectWizardPageTwo.java:200) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo$1UpdateRunnable.run(NewJavaProjectWizardPageTwo.java:161) at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) ---------------------------- java.lang.NumberFormatException: For input string: "#" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage.decodeJRELibraryClasspathEntries(NewJavaProjectPreferencePage.java:145) at org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage.getDefaultJRELibrary(NewJavaProjectPreferencePage.java:102) at org.eclipse.jdt.ui.PreferenceConstants.getDefaultJRELibrary(PreferenceConstants.java:4004) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageOne.getDefaultClasspathEntries(NewJavaProjectWizardPageOne.java:1289) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.initializeBuildPath(NewJavaProjectWizardPageTwo.java:304) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.updateProject(NewJavaProjectWizardPageTwo.java:252) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.access$2(NewJavaProjectWizardPageTwo.java:200) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo$1UpdateRunnable.run(NewJavaProjectWizardPageTwo.java:161) at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) ------------------- and the last one: java.util.NoSuchElementException at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) at org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage.decodeJRELibraryClasspathEntries(NewJavaProjectPreferencePage.java:145) at org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage.getDefaultJRELibrary(NewJavaProjectPreferencePage.java:102) at org.eclipse.jdt.ui.PreferenceConstants.getDefaultJRELibrary(PreferenceConstants.java:4004) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageOne.getDefaultClasspathEntries(NewJavaProjectWizardPageOne.java:1289) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.initializeBuildPath(NewJavaProjectWizardPageTwo.java:304) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.updateProject(NewJavaProjectWizardPageTwo.java:252) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo.access$2(NewJavaProjectWizardPageTwo.java:200) at org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo$1UpdateRunnable.run(NewJavaProjectWizardPageTwo.java:161) at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) ================== Let me know what else (info) you need so I can provide, thanks! Reproducible: Always Steps to Reproduce: 1. Window->Show View->Error Log 2. File->New->Java Project 3. press Next once there should now be 4 errors titles the same: Error while decoding JRE entry

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/NewJavaProjectPreferencePage.java