日期:2014-05-20  浏览次数:20911 次

RMS疑问
package   com.mypack;

import   javax.microedition.rms.RecordStore;
import   javax.microedition.rms.RecordStoreException;
import   javax.microedition.rms.RecordStoreFullException;
import   javax.microedition.rms.RecordStoreNotFoundException;
import   javax.microedition.rms.RecordStoreNotOpenException;

public   class   CheckRMS   {
public   static   int   check(String   RMSName)   {
int   i   =   0;
try   {
RecordStore   rs   =   RecordStore.openRecordStore(RMSName,   true);
i   =   rs.getNumRecords();
rs.closeRecordStore();
}   catch   (RecordStoreFullException   e)   {
//   TODO   Auto-generated   catch   block
e.printStackTrace();
}   catch   (RecordStoreNotFoundException   e)   {
//   TODO   Auto-generated   catch   block
e.printStackTrace();
}   catch   (RecordStoreNotOpenException   e)   {
//   TODO   Auto-generated   catch   block
e.printStackTrace();
}   catch   (RecordStoreException   e)   {
//   TODO   Auto-generated   catch   block
e.printStackTrace();
}
return   i;
}

/**
  *   @param   args
  */
public   static   void   main(String[]   args)   {
//   TODO   Auto-generated   method   stub
System.out.println(CheckRMS.check( "Test "));

}

}


Exception   in   thread   "main "   java.lang.UnsatisfiedLinkError:   getSlowingFactor
at   javax.microedition.rms.RecordStore.getSlowingFactor(Native   Method)
at   javax.microedition.rms.RecordStore. <clinit> (RecordStore.java:2414)
at   com.mypack.CheckRMS.check(CheckRMS.java:13)
at   com.mypack.CheckRMS.main(CheckRMS.java:37)

请问这是什么错误
谢谢

------解决方案--------------------
LZ你在做J2ME之前应该看看一些基础的东西啊,J2ME程序的入口不是main....