English 中文(简体)
是否有可能写出一个在甲状腺上运行的便衣计划?
原标题:Is it possible to write a plain old java program that runs on android?
  • 时间:2012-01-13 17:02:50
  •  标签:
  • java
  • android

我看到一些辅导,显示你如何以活动和所有活动来进行真正的、roid的应用,但我真的想要这样做的是,使ava成为一种具有公共真空的静态主干(String params[])的 j。{系统.out.println(“Hello World”);},在一台和roid机上运行。 这是可能的吗?

最佳回答
问题回答

Actually, if you take the time to create a very simple Activity (which Eclipse will basically generate for you when you make a new Android application, then you will be able to create and call any class or method on that class that you so desire.

在活动类别中,将采用一种称为创造()的方法——你将修改这一方法,以立即检查你的类别,并采用一种理想的方法。

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Instantiate your class or simply call its main(String[] args) method here 
}

There, that wasn t so hard was it?

Good Luck!

Rodney





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签