Android doesn't support Jar files.......You cannot run jar files on android.
-Kumar Bibek http://techdroid.kbeanie.com On Sep 22, 3:53 pm, Lidia G <[email protected]> wrote: > I found how to use an android library, from the > eclipsehttp://developer.android.com/guide/developing/eclipse-adt.html#librar...but > this is not what i need, i need to comples a library into a jar file and to > hide the code that can be used from the library. > > And i can't create a JAR file using usually jar command from the JDK, > because, my classes contain some android specific code. > > How can i create an executable JAR file from android. > Please help me. > > --- On Wed, 9/22/10, Lidia <[email protected]> wrote: > > From: Lidia <[email protected]> > Subject: [android-developers] How to create an executable file for android > To: "Android Developers" <[email protected]> > Date: Wednesday, September 22, 2010, 7:21 AM > > Hello people, > > Can someone tell me how to create an executable jar file from eclipse > for android? > First of all, how the application should be before creating a jar > file? Should it be runnable? Do i need an Activity class in it? > > I created a simple Android application, which has an activity class: > //-------------------------------------------------------------------------------------------------- > public class MyClass extends Activity { > @Override > public void onCreate(Bundle savedInstanceState){ > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > }} > > //-------------------------------------------------------------------------------------- > > and some other classes. I don't need this activity class in my jar > file, i need only all other simple classes, > I used from the eclipse the option Export ->Java ->JAR file > As i see, this option creates a simple jar file, it packs the classes, > so their content is invisible, but at the same time, the JAR file > content can be changed. e.g i can assign values to static parameters. > > But i need an executable/unchangeable jar file. > If i use from eclipse the option Export ->Java ->Runnable JAR file - > the Launch Configuration: is empty, and i can't go on > > What should i do???? > > Please help me > Lidia > > -- > 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 > athttp://groups.google.com/group/android-developers?hl=en -- 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

