本文目录一览:
- 1、javax.servlet.ServletException急急急~~~~急急急~~~~急急急~~~~急急急~~~~急急急~~~~
- 2、JAVA登陆界面,登陆按纽没有反映,不知道哪里有问题?请高手帮帮忙
- 3、java写了一个程序,调用common-io包中的FileUtils类的moveFileToDirectory方法
- 4、javax.swing中JFileChooser类的setFileFilter和addChoosableFileFilter这两个方法的区别是是什么
- 5、java中无法提取出文本框中的内容,由此引发了空指针引用的问题。
- 6、java错误问题?
javax.servlet.ServletException急急急~~~~急急急~~~~急急急~~~~急急急~~~~急急急~~~~
Invalid TLD resource path /WEB-INF/jpivot/jpivot-tags.tld,自定义标签文件的路径不正确,,tld是jsp标签配置的定义,里面规定了jsp自定义标签的的格式,属性,实现类等内容。
JAVA登陆界面,登陆按纽没有反映,不知道哪里有问题?请高手帮帮忙
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem:
Cannot invoke trim() on the array type char[]
at student.Info_Manage.actionPerformed(Info_Manage.java:76)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(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 problem:
Cannot invoke trim() on the array type char[]
at student.Info_Manage.actionPerformed(Info_Manage.java:76)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(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 problem:
Cannot invoke trim() on the array type char[]
at student.Info_Manage.actionPerformed(Info_Manage.java:76)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(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)
java写了一个程序,调用common-io包中的FileUtils类的moveFileToDirectory方法
由于系统或JRE平台对IO有缓冲,拷贝完成时,未IO已经关闭,所以导致删除失败。
最好是使用COPY、全部完成后,再delete
javax.swing中JFileChooser类的setFileFilter和addChoosableFileFilter这两个方法的区别是是什么
public void addChoosableFileFilter(FileFilter paramFileFilter)
{
if ((paramFileFilter != null) (!this.filters.contains(paramFileFilter))) {
FileFilter[] arrayOfFileFilter = getChoosableFileFilters();
this.filters.addElement(paramFileFilter);
firePropertyChange("ChoosableFileFilterChangedProperty", arrayOfFileFilter, getChoosableFileFilters());-javaxfire
}
setFileFilter(paramFileFilter);
}
看源码应该可以看出来,addChoosableFileFilter是在传进来的FileFilter不为空且不在当前当前filters中时,将这个FileFilter先加入到当前filters中
java中无法提取出文本框中的内容,由此引发了空指针引用的问题。
class Chuang6Frame extends JFrame implements ActionListener
{
JTextField fno;
JTextField fname;
JTextField snum;
JTextField jpri;
JTextField fpri;
JTextField profit;
Chuang6Frame(String title)
{
super(title);
this.setBounds(300, 30, 800, 600);
this.setLayout(null);
JButton g=new JButton("查询");
this.add(g);
g.setBounds(210, 450, 80, 50);
g.addActionListener(this);
JLabel gj1=new JLabel("服装编号");
JTextField fno=new JTextField(20);
加入的对象有问题 肯定是空的
上面定义了JTextField fno;
下面你又定义了一个fno对象 你加入的第二个fno
JTextField fno=new JTextField(20);
得到 的是用的第一个fno
构造方法里不要再定义了 要这样写
fno=new JTextField(20);
这样就不会空了 你全改了吧
这样应该不会有空指针的问题了
java错误问题?
资源未发现,可能你写的代码不完整,还有线程问题,你最好把代码也粘贴出来。