简体   繁体   English

我如何在Android中使用java.applet.Applet?

[英]How I can use java.applet.Applet in Android?

When I try to use java.applet.Applet, I get a runtime error: 当我尝试使用java.applet.Applet时,我收到运行时错误:

java.lang.NoClassDefFoundError: java.applet.Applet

I have tried to put that library manually, but I get the same error. 我试图手动放置该库,但我得到了同样的错误。 I have done the same with other libraries and it worked, but not with this one. 我已经对其他库做了同样的工作,但是没有这个。

When I try to use java.applet.Applet, I get a runtime error 当我尝试使用java.applet.Applet时,我收到运行时错误

That is because that class does not exist in Android. 那是因为Android中不存在该类。

I have tried to put that library manually 我试图手动放置该库

java.applet.Applet is a class. java.applet.Applet是一个类。 It is not a library. 它不是一个图书馆。

How I can use java.applet.Applet in Android? 我如何在Android中使用java.applet.Applet?

You don't. 你没有。 Most likely, you rewrite the code to use the Android UI framework, the same as if you had a Swing or SWT Java desktop application, or a Java servlet. 最有可能的是,您重写代码以使用Android UI框架,就像使用Swing或SWT Java桌面应用程序或Java servlet一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM