Asked By
pat dawson
40 points
N/A
Posted on - 05/31/2012
Hello there!
I’m working with an application for iPhone using Java application.
However, this error message occurred that says
More Information
Error: unexpected exception; java.lang.reflect.InvocationTargetException”
More Information
Error Unexpected exception: java.Iang.reflect.InvocationTargetException
Launch File Excepbon
<?xml version="1.0" encoding="utf8"?>
<!- JNLP File for the SocketClient Application ->
<jnlp
href="TwoFrarne.jnlp">
<information>
<title>Frames</title>
<vendor >Shivesh Pathak</vendor>
<offline-allowed/>
<information>
<resources>
<j2se version="1.6"/>
<jar href="TwoFrame.jar"/>
</resources>
<application-desc-main-class="TwoFrame">
</application-desc>
</jnlp>
Close
Do you know the cause of this error and how can I resolve this issue?
Java Application Error on iPhone
These are the step by step on the way to install Java on the IPhone, only for incase if you would like to put in it once more.
There are 2 steps:
Step 1: head to Installer and install Mobile Terminal and Cydia Installer.
-
Go to Settings -> General -> Auto-Lock and set it to Never. this may avoid some troubles throughout installation.
-
Run Installer. Repository for Terminal ought to be already there (BigBoss), as a result of it's in latest Community Sources.
-
Add repository for the Cydia Installer and refresh
-
Go to put in -> System
-
Find Term-vt100 – Mobile Terminal App. Iim using the version svn278 and then Install it.
-
Go to System once more and notice Cydia Installer – the long run of the IPhone. I used version 1.0. Install it.
-
Exit. Restart IPhone. 2 icons for Terminal and Cydia ought to seem.
Step 2: head to Cydia Installer and install Java.
Run Cydia Installer.
-
Go to put in – Java section. you may notice several programs there.
-
Select IPhone/Java. it'll install most of the required packages, which has vm, libraries, etc.
-
Click make sure and wait to a small degree bit.
-
Go to Java section once more and install jikes package (itwill be most likely the sole one left). Jikes may be a compiler.
-
Go to put in Packages tab. confirm Classpath, IPhone/Java, JamVM, Jikes are put in. many different packages are there too (Java SQLite, JocStap, etc).
-
Exit Cydia and restart IPhone. Congratulations!!! you are done putting in Java.
There are the steps on the way to produce Java application, compile and run.
It will assist you to resolve your downside.
Step 1: produce easy Java application, compile and run.
-
Create file Java4IPhone.java and place easy Java hello-world code there. I used the subsequent code:
-
Upload to IPhone. I used /tmp directory. I used IPhone Browser for uploading.
-
Run Terminal.
-
Use command java -full version or jamvm -full version to check if java is available.
-
Use command jikes to implore java compiler.
-
Go to /tmp directory, using command cd /tmp Compile. we want to specify class path to basic java packages. If we have a tendency to don't do this, jikes can turn out a slip-up (see screenshot). thus use the subsequent command: jikes Java4IPhone.java -cp /usr/lib/rt.jar
-
After compiling Java4IPhone.class file ought to seem within the same directory. Use command java Java4IPhone to run.
-
Take a glance at the screenshots.
Hopefully you will have one thing similar.