I am new to Android development. I am developing in Eclipse with
Android plugin. I am trying to execute the following J2SE code on
Android. It is being compiled without errors as I have imported the
JRE library in the android project. In the Configure Build Path option
I have imported JRE System Library and in Order and Export option I
have also exported this JRE System Library.

But when it runs in emulator it gives the exception and failed to run.
I think the jar files of JRE are not actually exported to Android
emulator platform. If so, can anybody tell me how to export the jar
files to Android emulator platform.


.....................................................................SOURCE
CODE.....................................................

package test.six;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class Driver extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        TextView tv = new TextView(this);

        javax.swing.JTextField jt = new javax.swing.JTextField(20);
        jt.setText(" ...Hello its a Text Field... ");
        tv.setText(tv.getText()+" ,,, "+jt.getText());
        setContentView(tv);

    }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to