I'm new to using anything other than Eclipse for compiling Java projects. I am trying to use command line to compile a java file that uses Android but I have been unsuccessful.
I've been trying variations of the following (where my root directory is my project directory):
javac -classpath C:\Program_Files\Java\jdk1.7.0_04\bin;
C:\Program_Files\Android\android-sdk\platforms\android-15\android.jar
src\package1\package2\projectName.Java
It hasn't been working. I get a lot of errors saying:
package android.content does not exist
package android.database does not exist
package android.net does not exist
package android.os does not exist
package android.util does not exist
Am I doing something drastically wrong here? How can I get it to recognize those android packages? Could someone point me in the right direction here? I've read a bunch of documentation on javac, command-line and classpaths, but I can't seem to pinpoint the main problem here. Thank you.
NEW
I'm not sure if this information will make a difference... but when I run my program in eclipse, it uses the Android 2.2 with the directory C:\Program_Files\Android\android-sdk\platforms\android-8\android.jar instead of C:\Program_Files\Android\android-sdk\platforms\android-15\android.jar. Does this change anything?
When I try to go to that folder on my computer, though... it does not exist. The android-15 folder is what exists. I tried changing my classpath to the directory with android-8, but unfortunately it did not change anything. Any ideas?