Java 运行时错误

标签 java compiler-errors runtime-error

关闭。这个问题不符合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/

相关文章:

C++ 自定义 vector 实现 - 指向不完整类型的指针的下标

c++ - bool operator()和继承

wcf - Visual Studio 2012 安装破坏了我的 2010 WCF 项目

java - 如何从字符串数组列表中获取特定字符?

java - Android 中如何调用标准的原生方法?

java - 无法让 ActiveMQ 出队

c++ - 运行非常简单的程序 (C++) 时出现运行时错误

java - 初学者问题: Looking for a site that has problems a beginning Java programmer can work on

c++ - 错误代码 C2451 无法运行基本程序

python - 运行时错误 : Attempting to capture an EagerTensor without building a function