您的位置:首页 > 编程语言 > Java开发

java.lang.ExceptionInInitializerError

2012-02-24 16:34 531 查看
 
 问题描述 :编译Swiing客户端java代码的时候一直报错,错误日志,

java.lang.ExceptionInInitializerError

 

* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class LGTopoPanel implements IGroupSubnetTopo
{
static final String[] _lang_select = { "Pointer Tool", "路径选择工具" };
static final String[] _lang_pan = { "Hand Tool", "抓手工具" };
static final String[] _lang_zoomIn = { "Zoom In", "放大视图" };
static final String[] _lang_zoomOut = { "Zoom Out", "缩小视图" };
static final String[] _lang_zoomBak = { "Zoom Back", "撤销缩放" };
static final String[] _lang_zoomReset = { "Reset Zoom", "初始化视图" };
static final String[] _lang_fitCont = { "View all NEs", "观看所有节点" };
static final String[] _lang_zoomView = { "Zoom out a Region", "视图区间放大" };

JPanel m_panel = new JPanel(new BorderLayout());
JPanel networkArea = new JPanel(new BorderLayout());
JPanel treeArea = new JPanel(new BorderLayout());
JSplitPane rightSplitPane =
new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treeArea, networkArea);

private LGTopoWindow _parentWin;
private IlpNetwork networkComponent;
private IlogTree treeComponent;

public static final URL configurationNet =
LGTopoPanel.class.getResource("topo.css");
public static final String[] configurationTree =
new String[] { LGTopoPanel.class.getResource("tree.css").toString()};


 

 

public static final String[] configurationTree =new String[] { LGTopoPanel.class.getResource("tree.css").toString()};

 

但是当我把static注释掉后,编译通过,没有任何问题。然后我又重新uncheckout,程序运行正常。

 

比较诡异的问题发生了,把static设置一下就可以重新让程序运行。

 

这个是不是static 的东西一直还在内存当中呢?还是什么情况发生了?

 

class.getResource 这个方法是获得资源的?

 

 

遗留问题?

 

慢慢看吧。

 

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息