我不会放所有源代码,因为它真的很大,但我会尽力解释我的问题。
我有一个小程序com.dmp.applet.DMPApplet
,它是主要的小程序类,这个应该是第一个加载的
com.dmp.applet.DMPApplet
:
package com.dmp.applet;
// Imports
public class DMPApplet extends Applet
{
@Override
public void init()
{
this.state = AppletState.OFF;
this.running = true;
CPSAPI.connector = (Cpsw32) Native.loadLibrary("cpsw32", Cpsw32.class);
}
@Override
public void start()
{
CR_CPS cr = CR_CPS.fromShort(CPSAPI.connector.CPS_OuvertureSession(CPSAPI.pNomRessource, CPSAPI.pNomAppli, CPSAPI.pStatusService, CPSAPI.pNumSession.getReference(), CPSAPI.pFU.getReference()));
System.out.println("OUVERTURE DE SESSION : " + cr.getMessage());
this.jso = JSObject.getWindow(this);
if(this.state == AppletState.OFF && this.running)
{
this.Attente_Connexion();
this.Demande_Code_PIN();
}
if(this.state == AppletState.LOGGED && this.running)
{
this.Connexion_VS();
this.Lancement_Gateway();
}
if(this.state == AppletState.READY && this.running)
{
this.Ecoute_Evenements_CPS();
this.Fermeture();
}
}
public void stop()
{
CR_CPS cr = CR_CPS.fromShort(CPSAPI.connector.CPS_FermetureSession(CPSAPI.pNumSession.getValue(), CPSAPI.pStatusService));
System.out.println("FERMETURE DE SESSION : " + cr.getMessage());
}
public void destroy()
{
// TODO
}
}
它的架构是小程序执行的基础,但是当我在 Eclipse (Juno) 下测试它时,但每次启动项目时,我都会得到:
java.lang.ClassNotFoundException: com.dmp.applet.DMPApplet.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:785)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
at sun.applet.AppletPanel.run(AppletPanel.java:368)
at java.lang.Thread.run(Thread.java:619)
如此痛苦,我不知道发生了什么,该项目在另一台PC(我的队友用来开发的那台)上完美运行,并且直到两天前才运行...我不知道...