Hi Mark, Don't feel bad about the suggestion. I am a C++ programmer, so yes learning Java makes sense. So far I'm unimpressed with Java in that the language seems highly restrictive, especially in the generics and non existant in the preprocessor area. Yes, I'm aware that Java has other ways to do some of the same things, but often with less than ideal equivalents. Personally if I could code in C++ for Android, I'd be happy and I'm sure a Java programmer would feel the same moving to C ++. After some research it appeared that while you can code in C++, you can't do UI work and there's cost to crossing the C++/Java divide.
Hence I started to learn Java as well as Android, Eclipse, and while I was at it, might as well throw in some Linux learning. I'm doing my best to dovetail the learning so they can help reinforce each other. I don't see much on the Java compiler model. I see some stuff about .java creates .class files, there a JVM etc, but no real world application layouts yet. I'm sure I'll find more as I learn, but that is really what this post is about - Learning the build model for combining application code and user written libraries. Should be simple. No? On Mar 2, 9:24 am, Mark Murphy <[email protected]> wrote: > Mitch wrote: > > 1. Create a JAR file and use it in my activity. The JAR file must be > > a standard Java JAR (whatever that means). I see there are options to > > choose in the wizard for the JRE and no idea what a good choice is. > > > 2. Try to put the code into a particular folder and reference it in > > each Android Activity project. This will cause duplication of the > > code inside each activity? > > > 3. Create a service with the code and ask it to do the calculations > > and/or UI calls. Not sure if I can call UI inside a service. I think > > not after some reading. > > > I'd still like other options if anyone is reading this... > > To be honest, I think the best option is: > > 4. Spend some time learning Java outside of Android first. > > You seem to be fighting Java and Eclipse as much as, if not more so, > than Android. Android is just strange enough that newcomers to Java > often run into problems. > > Learn how to create standard Java console apps and JARs using Eclipse > (or dump Eclipse and use other tools). Then, head back into Android to > see how to utilize those techniques there. > > This is not particular to you -- I make this same recommendation to > anyone new to Java. IIRC, you said your background was C++, not Java, > which is why I make the recommendation here. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ > Version 1.3 Available! -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

