Trans-life! :::: "All things change, whether from inside out or the outside in. That is what magic is. And we are magic too."
Hey ... maar dan heb je ook wat!
Trans-life! :::: "All things change, whether from inside out or the outside in. That is what magic is. And we are magic too."
Je moet het volgende als import geven
1
2
| import java.util.Random; import com.nttdocomo.ui.*; |
En je moet beginnen met een abstracte class. dus bijv.:
1
| public abstract class Naam extends IApplication |
Dan kun je Java file als DoJa gebruiken.
[ Voor 30% gewijzigd door Zerora op 03-11-2004 11:00 ]
Trans-life! :::: "All things change, whether from inside out or the outside in. That is what magic is. And we are magic too."
Ik zit alleen nog met het volgende.
Op het moment dat ik de applicatie wil runnen geeft ie het volgende aan:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| Starting project "Ischedule" InstantiationException for class ischedule.Ischedule Uncaught excpetion: java/lang/RuntimeException Method............: 45122c 'com/nttdocomo/dojaemu/Launcher.main (static)' Frame Pointer.....: ef0380 Current IP........: 475f7a = 475ec3 + offset 183 Previous Frame....: 0 Previous IP.......: 1 Exception handlers: 47fcd4 Frame size........: 6 (1 arguments, 5 local variables) Argument[0].......: ef04c0 Local[1]..........: ef4d0c Local[2]..........: 0 Local[3]..........: 0 Local[4]..........: ef9520 Local[5]..........: 475f77 Execution completed successfully 3116 bytecodes executed 0 thread switches 214 classes loaded (182 bytes) 1033 objects allocated (38416 bytes) 0 garbage collections 0 bytes collected 0 objects deferred in GC 0 (maximum) objects deferred at any one time 0 rescans of heap because of deferral overflow 0 pointer validations requiring heap scans Current memory usage 38416 bytes Heap size 262144 bytes |
Het builden is verder wel gelukt.
Kan iemand vertellen wat ik moet doen.
Trans-life! :::: "All things change, whether from inside out or the outside in. That is what magic is. And we are magic too."
Ik probeer een DoJA applicatie te runnen.eamelink schreef op 03 november 2004 @ 11:08:
Je krijgt dus blijkbaar een RuntimeException in je main() method. Daar gaat blijkbaar iets mis. Wat spook je daar allemaal uit?
Hoe kan je zo'n RuntimeException in de main() method oplossen?
Trans-life! :::: "All things change, whether from inside out or the outside in. That is what magic is. And we are magic too."
Verwijderd
Maar ik neem aan dat je dat wel wist. Maar wat is de broncode van je hoofdscherm. Zonder code is het een beetje zinloos om te speculeren.
Trans-life! :::: "All things change, whether from inside out or the outside in. That is what magic is. And we are magic too."
Verwijderd
1) TestApp.java
1
2
3
4
5
6
7
8
9
10
11
| package Demo;
import com.nttdocomo.ui.*;
public class TestApp extends IApplication {
public void start() {
Panel1 panel1 = new Panel1();
Display.setCurrent(panel1);
}
} |
2) Panel1.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| package Demo;
import com.nttdocomo.ui.*;
public class Panel1 extends Panel implements ComponentListener{
public Panel1() {
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setTitle("Test Applicatie");
this.setComponentListener(this);
label1.setText("Hello World!");
this.add(label1);
}
public void componentAction(Component source, int type, int param) {
// Nog in te vullen
}
Label label1 = new Label();
} |
Dit compileren geeft een applicatie met Hello World als tekst in het label.
[ Voor 3% gewijzigd door Verwijderd op 04-11-2004 20:54 ]