作者cckh ()
站内java
标题[问题] Error Message
时间Sat Jan 5 11:43:54 2008
Exception in thread “main” java.lang.NoClassDefFoundError:
com/trend/iwss/jscan/runtime/CallContext at
gui.loglic.Login.main<Unknown Source>
我先贴一下Login.java的程式码 如下
package gui.loglic;
import javax.swing.*;
import java.io.*;
import java.util.Scanner;
public class Login{
static final long serialVersionUID=0;
public static void main(String args[]) {
try{
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
} catch (Exception e) {}
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
File file=new File("login.txt");
if (file.exists()){
Scanner scanner=null;
try{
scanner=new Scanner(file);
String userName=scanner.nextLine();
String password=scanner.nextLine();
scanner.close();
if (PasswordGenerator.getPassword(userName).equals(password)){
new LicenseFrame();
return;
}
}
catch (Exception ex){}
}
new gui.loglic.LoginFrame();
}
}
简单的说 如果你有login.txt的话就直接进版权页
没有的话 就会进帐号密码登入
程式很简单 也因为太简单 让我不知道error message出现的原因
出现这个error是再没有给login.txt的情况下
所以应该是在第一个catch
但是 UIManager这样用有错吗=.=a
或是有其他的问题呢
更麻烦的是
这个error message在有些电脑上会出现 但是有些电脑就很顺的run下去
请板上的高手帮帮忙看一下 谢谢.....
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.229.12.90
1F:推 scoutJJ:Error Message 至少po出来一下 让大家看看 问题可能出在哪 01/05 12:01
2F:→ cckh:就是我最开始po的exception那边 谢谢 01/05 12:36
3F:推 superlubu:很简单啊,就是 classpath 有问题,有些电脑能找到 01/05 12:39
4F:→ superlubu:com.trend.iwss.jscan.runtime.CallContext 这个 class 01/05 12:39
5F:→ superlubu:有出 error 的电脑却找不到, 把 classpath 查一查吧 01/05 12:40
6F:→ cckh:有其他的可能吗?? 麻烦大家了... 01/05 13:10
7F:推 superlubu:进度汇报: 目前估计是 antivirus 问题,有待原 PO 确认 01/05 13:21
8F:→ cckh:still under validation by users....... 01/14 09:41