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 269650

Summary: Problem with importing utilities
Product: ide Reporter: stevenjbark
Component: CodeAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description stevenjbark 2017-01-25 22:39:21 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_121
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.121-b13

Reproducibility: Happens every time

Running the Following Program as I am Learning Java:
Observation: The program does not work when I use import java.util.*;
The program does work fine when I use import java.util.Date;

I also checked using Notepad as a text editor and compiling with javac. The program works fine when I use import java.util.*; or import java.util.Date;

Problem appears to be related to NetBeans IDE 8.2

package java24hours;

import java.util.*; (NOT WORKING), import java.util.Date; (WORKING)
import java.text.*;

class Date2
{
    public static void main(String [] arguments)
    {
     Date date = new Date();
     DateFormat dateFormat = new SimpleDateFormat("yyy-MM-dd hh:mm:ss");
     String strDate = dateFormat.format(date);
     System.out.println(strDate);
    }
Comment 1 stevenjbark 2017-01-25 22:39:24 UTC
Created attachment 163467 [details]
IDE log