score:0

would it not work if you made your other plain java project into an android project and use it to monitor the output on the device?

score:1

luckily, i found the answer to my own question and i thought i'd share it here to help others in the same situation. it turned out to be very simple...

what i was already doing would have normally worked, which should have been a big clue to me since i have actually done this before, successfully. all you have to do is, under your android project's properties > java build path > projects, add the plain java project to your "required projects on the build path" and then under properties > java build path > order and export, check the checkbox of that same project in the "build class path order and exported entries" list and everything should just work.

from within eclipse, there's nothing else you need to do to get this setup to work. it's only when you're compiling from the command line that you need to build java jars and import them as libraries but i'm not doing that (yet).

finally, this wasn't working for me because i just happened to be compiling my plain java project under jdk 1.7 compliance, while my android project was compiled under jdk 1.6. this is verified by the output on the console pane, reporting "dx bad class file magic (cafebabe) or version." this error message goes away when both projects are compiled under the same compliance level and, not coincidentally, the android program runs properly.

thank you to everyone who tried to help and i hope this answer is helpful to someone out there!


Related Query

More Query from same tag