关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。
想改进这个问题?将问题更新为 on-topic对于堆栈溢出。
8年前关闭。
Improve this question
请任何人帮助我解决此错误
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems:
schemes cannot be resolved to a variable
schemes cannot be resolved
schemes cannot be resolved
schemes cannot be resolved to a variable
at org.jvnet.substance.utils.SubstanceColorSchemeUtilities.getColorSchemes(SubstanceColorSchemeUtilities.java:615)
at org.jvnet.substance.api.SubstanceSkin.getColorSchemes(SubstanceSkin.java:635)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(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)
最佳答案
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems: schemes cannot be resolved to a variable schemes cannot be resolved schemes cannot be resolved schemes cannot be resolved to a variable
这表明基本上您甚至不应该尝试运行代码 - 它不会编译。如果您使用的是 Eclipse,那么当您尝试运行代码时应该会收到一个警告对话框,说明它没有完全编译——此时正确的做法几乎总是不运行它。如果您使用的是不同的 IDE,它可能不会弹出对话框,但您仍然应该能够在任何可用的错误 ListView 中看到错误。
内
getColorSchemes
方法,你试图引用一个名为 schemes
的变量。显然没有在任何地方宣布。如果没有看到代码,我们不能说更多,但它可能就像有一个名为 colorSchemes
的变量一样简单。而不是 schemes
,或类似的东西。
关于Java 运行时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20072067/