• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Web / Android

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello! I am really new to JAVA, and I wanted to know if I could use java classes meant originally for a web application, for an Android App.
Thank you in advance!
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe Android uses the MicroEdition (or whatever it is called). This doesn't have all the same classes/tools that the full blown Java has. So depending on what is in it, the answer is "maybe".
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As fred says, it depends. If the class is just one that's independent of the web environment, and has no other dependencies on environments that won;t exist on Android, then you might be able to.

Classes specifically requiring the web environment (anything in the servlets packages, for example) would not be.
 
Jacqueline Steremberg
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you know where I can find documentation on which classes to use than I can then reuse on the Android app?
Thank you very much!
 
fred rosenberger
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where did this class come from? Is it part of the standard JRE, or is it one that you/your company/someone you know wrote?

If you are looking at Oracle written classes, I think you want this - the Java ME API.

Otherwise, you're going to have to either a) ask the person who wrote it, b) examine the code, or c) try it and see.
 
Jacqueline Steremberg
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nono, the code is not written yet. I am going to code some classes for a web application and I want it them to be reusable in the future when i develop the Android App.
Thank you very much!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I believe Android uses the MicroEdition


Actually, it does not, so the Java ME API is not available. Android consists basically of the Java SE 5 class libraries, minus anything to do with AWT and Swing, plus some stuff from Java 6, plus a bunch of extra classes mostly to do with the mobile environment and GUI. The full javadocs can be found at http://developer.android.com/reference/packages.html. Note that what is available *exactly* depends on which Android API level you're targeting, as each new Android version adds additional classes and methods. On the upper left is an "API level" menu - if you select "15" (a reasonable level for a new app, corresponding to Android 4.0.3 and newer), then you'll see only those classes that are available on that level.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic