Results 1 to 5 of 5

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: JAVA Help? Anyone who knows anything about Java Coding/Compiling

  1. #1
    Default JAVA Help? Anyone who knows anything about Java Coding/Compiling
    What am I doing wrong?

    First off, Im on a 2G on Firmware 2.1, and have all the major java packages installed from Cydia. (iPhone/Java, Jikes, etc)

    I followed this guide...

    Tutorial: install Java on the IPhone | Java 4 iPhone

    to get everything up and running, then this guide

    Tutorial: compile and run Java application on the IPhone | Java 4 iPhone

    To (attempt to) find the .java file, compile it with jikes, and run it through the mobile terminal.

    I followed the instructions on the site 100%, and I'm not an idiot, So idk why my jikes command (jikes TestApp.java -cp /usr/lib/rt.jar) does not compile the program.

    Maybe I'm missing some major detail or something, but I can't see it. Any help would be greatly appreciated.

    Here are some screenshots from the tutorial: (I can't even get these same error messages!)

    http://java4iphone.com/wp-content/up...06/step3_3.jpg
    http://java4iphone.com/wp-content/up...06/step3_4.jpg

    Someone tell me the obvious mistake I'm missing

    Unless its just something I don't know about, like the iPhone/Java package not being able to run correctly on the 2.1 firmware, then that would upset me. Help?!
    i LOVE apple.

  2. #2
    Thanks for your interest in Java for iPhone. What error do you get?

    I tried to do the following to run sample application using iPhone 3G with 2.1 firmware:

    I created a small application Java4iPhone.java:
    public class Java4iPhone {
    public static void main(String[] args) {
    System.out.println("Java 4 iPhone rulez");
    }
    }

    Uploaded it into /private/ver/tmp folder. Writing to this folder is avaliable for user.

    After that I entered
    > jikes Java4iPhone.java
    and
    > java Java4iPhone
    and got "Java 4 iPhone rulez".

    jikes Java4iPhone.java -cp /usr/lib/rt.jar also works.

    You can also use other folder, like /usr. But write access privileges are avaliable to root user only, so use
    su root
    to login as root user (default password is alpine).

    I'll create a new tutorial for 2.x firmwares with screenshots and etc, but things didn't change much since 1.1.4.

    Thanks.
    Java4iPhone admin

  3. #3
    So I am trying to compile and application, but it's having some trouble, so wondering if you had any ideas?

    I'm getting this message:

    *** Semantic Error: You need to modify your classpath, sourcepath, bootclasspath, and/or extdir setup. Jikes could not find package "processing.core"

    here's what I'm trying to compile:
    http://neufuture.com/upload/Testr.zip

    Also note to java4iphone: the English version of your site doesn't seem to function

    Edit: so basically I want to compile using the "processing" package as well. Is that possible?
    Last edited by neufuture; 12-09-2008 at 09:38 AM.

  4. #4
    Did you ever get this to work?

    I am on 2.2.1 and may try some java, but I am concerned with compatibility and whether or not it will work.

    update:

    I had to install jikes separate from the java package. Also, it had been a while since I had written any java. I had forgotten the class and the name have to match or an error occurs.

    I did get java to work on 2.2.1
    Last edited by uvbeenbit; 02-17-2009 at 09:06 PM. Reason: Automerged Doublepost

  5. #5
    Default Can I install .jar .jad files on my iphone through this process
    Thank you for the information regarding java compiler and java on iphone. I was interested to install .java or .jad games on my iphone 3 gs. Is it possible through this process. What additional steps should i do to install java 3rd party applications in .jar and .jad format on my iphone.

    Solutions are really appreciated.

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •