我刚刚更新到Java的最新版本(Java 8 Update 101)
从那时起,每次我尝试运行任何Java程序时,它都会崩溃并出现以下错误:
错误消息
以下是错误的内容:
Exception Name: JavaNativeException
Description: java.lang.NullPointerException
User Info: (null)
0 CoreFoundation 0x00007fffb962952b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffcdd01cad objc_exception_throw + 48
2 CoreFoundation 0x00007fffb9629479 -[NSException raise] + 9
3 JavaNativeFoundation 0x000000010e7266d8 JNFCallObjectMethod + 230
4 liblwawt.dylib 0x00000001101fa09e -[AWTView attributedSubstringForProposedRange:actualRange:] + 78
5 AppKit 0x00007fffb7b70604 -[NSTextInputContext(NSInputContext_WithCompletion) attributedSubstringForProposedRange:completionHandler:] + 105
6 AppKit 0x00007fffb7b6c6ec __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.625 + 91
7 AppKit 0x00007fffb7b66e9a -[NSTextInputContext tryHandleTSMEvent_attributedSubstringForProposedRange_withContext:dispatchCondition:dispatchWork:continuation:] + 92
8 AppKit 0x00007fffb7b6c616 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.620 + 450
9 AppKit 0x00007fffb73cd760 -[NSTextInputContext handleTSMEvent:completionHandler:] + 2549
10 AppKit 0x00007fffb73cccfd _NSTSMEventHandler + 319
11 HIToolbox 0x00007fffb8b190d5 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1708
12 HIToolbox 0x00007fffb8b18346 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 428
13 HIToolbox 0x00007fffb8b1818f SendEventToEventTargetWithOptions + 43
14 HIToolbox 0x00007fffb8b6ef86 SendTSMEvent_WithCompletionHandler + 408
15 HIToolbox 0x00007fffb8d22378 __SendTextInputEvent_WithCompletionHandler_block_invoke + 584
16 HIToolbox 0x00007fffb8d20689 SendTextInputEvent_WithCompletionHandler + 1154
17 HIToolbox 0x00007fffb8d91829 -[IMKInputSession _postEvent:completionHandler:] + 176
18 HIToolbox 0x00007fffb8da1485 -[IMKInputSession _copyUniCharsForRange:intoBuffer:ofLength:completionHandler:] + 530
19 HIToolbox 0x00007fffb8da1c0e -[IMKInputSession _coreAttributesFromRange:whichAttributes:completionHandler:] + 281
20 HIToolbox 0x00007fffb8da3bb0 -[IMKInputSession attributedSubstringFromRange:completionHandler:] + 186
21 HIToolbox 0x00007fffb8d943ab __61-[IMKInputSession imkxpc_attributedSubstringFromRange:reply:]_block_invoke + 530
22 CoreFoundation 0x00007fffb95bf3ac __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
23 CoreFoundation 0x00007fffb95a0424 __CFRunLoopDoBlocks + 356
24 CoreFoundation 0x00007fffb959ff66 __CFRunLoopRun + 1878
25 CoreFoundation 0x00007fffb959f5b4 CFRunLoopRunSpecific + 420
26 HIToolbox 0x00007fffb8b40f6c RunCurrentEventLoopInMode + 240
27 HIToolbox 0x00007fffb8b40da1 ReceiveNextEventCommon + 432
28 HIToolbox 0x00007fffb8b40bd6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
29 AppKit 0x00007fffb72375f5 _DPSNextEvent + 1093
30 AppKit 0x00007fffb79478eb -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637
31 libosxapp.dylib 0x00000001102974e3 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
32 AppKit 0x00007fffb722bfbd -[NSApplication run] + 926
33 libosxapp.dylib 0x0000000110297346 +[NSApplicationAWT runAWTLoopWithApp:] + 156
34 liblwawt.dylib 0x00000001101ed17d -[AWTStarter starter:] + 873
35 Foundation 0x00007fffbafebf2a __NSThreadPerformPerform + 326
36 CoreFoundation 0x00007fffb95bf551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
37 CoreFoundation 0x00007fffb95a06bd __CFRunLoopDoSources0 + 557
38 CoreFoundation 0x00007fffb959fbb6 __CFRunLoopRun + 934
39 CoreFoundation 0x00007fffb959f5b4 CFRunLoopRunSpecific + 420
40 java 0x000000010426e3b0 CreateExecutionEnvironment + 871
41 java 0x0000000104268b5c JLI_Launch + 1952
42 java 0x000000010426e70d main + 101
43 java 0x00000001042683b4 start + 52
我听说过其他用户遇到类似问题,有些是近期,有些则是2014年,2010年,2006年等。
我尝试使用cmd卸载Java,以及编辑环境变量,虽然我只是复制并粘贴了我在互联网上找到的内容并且并不真正理解我在做什么:
卸载尝试/环境变量删除尝试
我找到了一个解决方案的说明,涉及删除看似有希望的环境变量,但我不知道如何为mac做这些(我能找到的就是我在终端粘贴的内容,如上图所示)< / p>
看似有希望的指示: youtube.com/watch?v=JF_o8WNt3hs&feature=youtu.be
我现在无法使用任何基于java的程序,包括netbeans,只需点击几下就不会崩溃。它们似乎都在随机点崩溃,但它们崩溃的点可能都与将数据写入驱动器有关。