チケット #14200

Native library `wcepeer' not found
登録: 2008-12-03 17:43 最終更新: 2018-06-07 18:19

報告者:
担当者:
チケットの種類:
状況:
オープン [担当者決定済み]
コンポーネント:
マイルストーン:
(未割り当て)
優先度:
5 - 中
重要度:
5 - 中
解決法:
受領
ファイル:
なし

詳細

Hello,

I am developing a quite simple application for a ATID pocket PC with Windows CE 5.00 and 128 Mb.

The applications consists of a simple frame with some basic components. When Mysaifu tries to paint the frame it causes a 'Exception in thread "Thread-1" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.wce.WCEToolkit' because the JVM does not find the wcepeer library'.

I can assure you that that library exists and is on the correct path (just take a look to the code I give you).

You can find the source code and all the details about the error here:

// -------------- PROGRAM OUTPUT ----------------------

\Program Files\Mysaifu JVM\jre\bin null wcepeer.dll exists. Exception in thread "Thread-1" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.wce.WCEToolkit

at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103) at java.awt.Window.<init>(Window.java:133) at java.awt.Frame.<init>(Frame.java:246) at java.awt.Frame.<init>(Frame.java:234) at vista.Vista.<init>(Unknown source) at vista.Vista.main(Unknown source) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:356) at java.lang.VMMainThread$1.run(VMMainThread.java) at java.lang.VMThread.run(VMThread.java:120)

Caused by: java.lang.ExceptionInInitializerError

at java.lang.VMClassLoader.loadClass(Native Method) at java.lang.ClassLoader.loadClass(ClassLoader.java:328) at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112) at java.lang.ClassLoader.loadClass(ClassLoader.java:293) at java.lang.VMClass.forName(Native Method) at java.lang.Class.forName(Class.java:233) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583) ...10 more

Caused by: java.lang.UnsatisfiedLinkError: Native library wcepeer' not found (as file wcepeer') in gnu.classpath.boot.library.path and java.library.path

at java.lang.Runtime.loadLibrary(Runtime.java:763) at java.lang.System.loadLibrary(System.java:662) at gnu.java.awt.peer.wce.WCEToolkit.<clinit>(WCEToolkit.java) at java.lang.VMClassLoader.loadClass(Native Method) ...16 more

JVM exit

//----------------- SOURCE -----------------------------

package vista;

import java.awt.Frame; import java.awt.Rectangle; import java.awt.Label; import java.awt.TextField; import java.awt.TextArea; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import java.awt.Button; import java.io.File;

public class Vista extends Frame {

private static final long serialVersionUID = 1L; private Label label = null; private TextField textField = null; private TextArea textArea = null; private Button button = null; /** * This method initializes textField * * @return java.awt.TextField */ private TextField getTextField() { if (textField == null) { textField = new TextField(); textField.setBounds(new Rectangle(28, 61, 174, 23)); textField.setText("Campo de texto"); } return textField; }

/** * This method initializes textArea * * @return java.awt.TextArea */ private TextArea getTextArea() { if (textArea == null) { textArea = new TextArea(); textArea.setBounds(new Rectangle(28, 89, 171, 41)); textArea.setText("Campo de texto"); } return textArea; }

/** * This method initializes button * * @return java.awt.Button */ private Button getButton() { if (button == null) { button = new Button(); button.setBounds(new Rectangle(228, 61, 53, 23)); button.setLabel("Cerrar"); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { System.exit(0); } }); } return button; }

/** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(System.getProperty("java.library.path")); System.out.println(System.getProperty("gnu.classpath.boot.library.path")); File file = new File(System.getProperty("java.library.path") + File.separatorChar + "wcepeer.dll"); if(file.exists()){ System.out.println("wcepeer.dll exists."); }else{ System.out.println("wcepeer.dll doesn't exists!!"); } new Vista(); }

/** * This is the default constructor */ public Vista() { super(); initialize(); setVisible(true); addWindowListener(new WindowListener() { @Override public void windowOpened(WindowEvent e) { // TODO Auto-generated method stub } @Override public void windowIconified(WindowEvent e) { // TODO Auto-generated method stub } @Override public void windowDeiconified(WindowEvent e) { // TODO Auto-generated method stub } @Override public void windowDeactivated(WindowEvent e) { // TODO Auto-generated method stub } @Override public void windowClosing(WindowEvent e) { // TODO Auto-generated method stub } @Override public void windowClosed(WindowEvent e) { // TODO Auto-generated method stub System.exit(0); } @Override public void windowActivated(WindowEvent e) { // TODO Auto-generated method stub } }); }

/** * This method initializes this * * @return void */ private void initialize() { label = new Label(); label.setBounds(new Rectangle(25, 36, 173, 23)); label.setText("Label de prueba"); this.setLayout(null); this.setSize(298, 296); this.setTitle("Frame");

this.add(label, null); this.add(getTextField(), null); this.add(getTextArea(), null); this.add(getButton(), null); }

} // @jve:decl-index=0:visual-constraint="10,1

//------------- ANT FILE ----------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <project name="Frame" basedir="." default="jar">

<property name="src.dir" value="src"/> <property name="lib.dir" value="lib"/> <property name="build.dir" value="build"/> <property name="launch.dir" value="launch"/> <property name="manifest.name" value="mainClass.txt"/> <property name="mainclass" value="vista.Vista"/> <property name="MainClassTxt" value="Main-Class: "/>
<target name="clean" description="Borrar los ficheros">
<delete dir="build" failonerror="false"/> <delete dir="${launch.dir}" failonerror="false"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="${build.dir}"/> <javac encoding="ISO-8859-1" srcdir="${src.dir}" destdir="${build.dir}"/>
</target>
<target name="jar" description="Crear jar" depends="clean, compile"> <mkdir dir="${launch.dir}"/>
<manifest file="${manifest.name}">

<attribute name="Main-Class" value="${mainclass}"/> <attribute name="Class-Path" value="${manifest.classpath}"/> </manifest>

<jar destfile="${launch.dir}/${ant.project.name}.jar" basedir="${build.dir}" manifest="${manifest.name}"/> </target>

</project>

Please, do not hesitate to ask me if you need help.

Thank you, Miguel.

チケットの履歴 (10 件中 3 件表示)

2008-12-03 17:43 更新者: miguel
  • 新しいチケット "Native library wcepeer' not found " が作成されました
2009-03-23 23:55 更新者: evgen28
コメント

I'm also have this problem and didn't find anywhere how to solve...

2009-08-04 21:03 更新者: fpavo
コメント

Same problem here, with 0.4.5 version. AWT and swing libraries are not working, I'm blocked!!!!

Any workaround?

2009-09-11 12:43 更新者: petitk
コメント

I think this problem is about the file 「wcepeer.dll」 try to System.loadLibrary("wcepeer"); it's output is : java.lang.UnsatisfiedLinkError: Native library wcepeer' not found (as file wcepeer') in gnu.classpath.boot.library.path and java.library.path but try the another file in the same dir : System.loadLibrary("wcesound"); without throw Exception

My environment is mysaifu 0.4.5 + WinCE 5.0/6.0 this problem's discussion only see after 0.4.5 release cound I get the file 「wcepeer.dll」 in any early version ?

2009-09-22 22:26 更新者: freebeans
  • 解決法なし から 受領 に更新されました
コメント

Mysaifu JVM uses some Windows Mobile specific APIs. (SHLoadImageFile() etc.) I think this is a cause of the problem. Windows CE device cannot load the DLL. I don't know how to port Windows Mobile specific DLL to Windows CE device.

2010-02-13 09:32 更新者: jlmoya
コメント
(このコメントは削除されました)
2010-02-13 09:33 更新者: jlmoya
コメント

The same is happening with version 0.4.7 and am using WinCE 5.0. Is there a workaround? Can't create any window/form so this is a show stopper. Any suggestions?

2013-03-20 15:40 更新者: jerrychang
コメント

the Mysaifu JVM has been installed on my PDA with Windows CE 5.00 ,but my java applications can not run on my PDA at all ? this same problem arises.Some one give a suggestion?

2018-06-07 18:18 更新者: hanafi_othman
コメント

Hello,

It's been 10 years since this was posted.

Today I'm having the same problem. Have anyone got a solution for this?

2018-06-07 18:19 更新者: hanafi_othman
コメント

Répondre à hanafi_othman

Hello, It's been 10 years since this was posted. Today I'm having the same problem. Have anyone got a solution for this?

I'm using the latest version of Mysaifu (0.4.8)

添付ファイルリスト

添付ファイルはありません

編集

このチケットにコメントを追加するには、ログインが必要です » ログインする