From: SourceForge.net <no...@so...> - 2008-04-09 01:18:42
|
Bugs item #1938268, was opened at 2008-04-08 18:18 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1938268&group_id=44253 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: while running a program I got this error. Initial Comment: got an error when I ran this code. //code starts here ********************** import java.util.Scanner; public class JunkFromClass { public static void main(String [] args) { String city = ""; int temp = 0; Scanner in = new Scanner(System.in); System.out.print("Enter City Name or type none to quite: "); city = in.nextLine(); city = in.nextLine(); while (!city.equalsIgnoreCase("none")) { temp = in.nextInt(); if (temp>=90) { System.out.print("It's Hot!"); } else if (temp>=80) { System.out.print("It's Warm"); } else if (temp >= 70) { System.out.print("It's Nice"); } else if (temp >= 60) { System.out.print("It's Chilly"); } else { System.out.print("It's Damn Cold"); } System.out.print("Enter City Name"); city = in.nextLine(); } } } //code ends here********************** java.lang.NullPointerException at edu.rice.cs.drjava.ui.MainFrame$ModelListener.interactionEnded(MainFrame.java:7453) at edu.rice.cs.drjava.model.GlobalEventNotifier.interactionEnded(GlobalEventNotifier.java:331) at edu.rice.cs.drjava.model.repl.InteractionsEventNotifier.interactionEnded(InteractionsEventNotifier.java:75) at edu.rice.cs.drjava.model.repl.DefaultInteractionsModel$3.run(DefaultInteractionsModel.java:136) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) System Properties: DrJava Version 20080112-0033 drjava.debug.port = 49714 java.runtime.name = Java(TM) SE Runtime Environment sun.boot.library.path = C:\Program Files\Java\jre1.6.0_05\bin java.vm.version = 10.0-b19 java.vm.vendor = Sun Microsystems Inc. java.vendor.url = http://java.sun.com/ path.separator = ; java.vm.name = Java HotSpot(TM) Client VM file.encoding.pkg = sun.io sun.java.launcher = SUN_STANDARD user.country = US sun.os.patch.level = java.vm.specification.name = Java Virtual Machine Specification user.dir = <anonymized user.dir> java.runtime.version = 1.6.0_05-b13 java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment java.endorsed.dirs = C:\Program Files\Java\jre1.6.0_05\lib\endorsed os.arch = x86 java.io.tmpdir = <anonymized user.home>\AppData\Local\Temp\ line.separator = "\u000d\u000a" java.vm.specification.vendor = Sun Microsystems Inc. user.variant = os.name = Windows Vista sun.jnu.encoding = Cp1252 java.library.path = C:\Program Files\Java\jre1.6.0_05\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\ java.specification.name = Java Platform API Specification java.class.version = 50.0 sun.management.compiler = HotSpot Client Compiler os.version = 6.0 user.home = <anonymized user.home> user.timezone = America/New_York java.awt.printerjob = sun.awt.windows.WPrinterJob file.encoding = Cp1252 java.specification.version = 1.6 java.class.path = <anonymized user.dir>\drjavajar.jar user.name = <anonymized user.name> java.vm.specification.version = 1.0 java.home = C:\Program Files\Java\jre1.6.0_05 sun.arch.data.model = 32 user.language = en java.specification.vendor = Sun Microsystems Inc. awt.toolkit = sun.awt.windows.WToolkit java.vm.info = mixed mode, sharing java.version = 1.6.0_05 java.ext.dirs = C:\Program Files\Java\jre1.6.0_05\lib\ext;C:\Windows\Sun\Java\lib\ext sun.boot.class.path = C:\Program Files\Java\jre1.6.0_05\lib\resources.jar;C:\Program Files\Java\jre1.6.0_05\lib\rt.jar;C:\Program Files\Java\jre1.6.0_05\lib\sunrsasign.jar;C:\Program Files\Java\jre1.6.0_05\lib\jsse.jar;C:\Program Files\Java\jre1.6.0_05\lib\jce.jar;C:\Program Files\Java\jre1.6.0_05\lib\charsets.jar;C:\Program Files\Java\jre1.6.0_05\classes java.vendor = Sun Microsystems Inc. file.separator = \ java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi sun.io.unicode.encoding = UnicodeLittle sun.cpu.endian = little java.rmi.server.hostname = 127.0.0.1 sun.desktop = windows sun.awt.exception.handler = edu.rice.cs.drjava.ui.DrJavaErrorHandler sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86 #DrJava configuration file #Tue Apr 08 21:18:06 EDT 2008 lineenum.enabled = true key.delete.next = shift DELETE key.delete.previous = shift BACK_SPACE interactions.exit.prompt = false save.before.compile = true recent.files = [C:\\java work\\junk\\JunkFromClass.java,C:\\java work\\old stuff\\FaceViewer.java,C:\\java work\\old stuff\\FaceComponent.java,C:\\java work\\Programming 1 class Java homework\\Grade\\GradeTester.java,C:\\java work\\Programming 1 class Java homework\\Grade\\Grade.java] window.height = 816 window.width = 1296 window.x = -8 window.y = -8 last.dir = C:\\java work\\junk\\JunkFromClass.java last.interactions.dir = C:\\java work\\junk dialog.jaroptions.state = 445 265 Used memory: about 17.09 megabytes Free memory: about 5.47 megabytes Total memory: about 22.59 megabytes Total memory can expand to: about 63.56 megabytes ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1938268&group_id=44253 |