This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!

David Chan

Greenhorn
+ Follow
since Apr 19, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Chan

Rick,
Thanks a lot!
David
15 years ago
Do JBoss have any tools which can generate deployment descriptor (like the one weblogic have)?
Thx.
David Chan
15 years ago
Dear all,
Anyone know that can inethttps connection at MIDP for Palm OS can talk to https at web server?
Thanks
David Chan
16 years ago
You can go to see the following URL:
http://www.sun.com/developers/evangcentral/totallytech/j2me.html


A configuration is a specification that defines a minimum Java Platform functionality for a "family of devices." A configuration is intended to cover a broad range of devices. It defines the minimum number of Java libraries, VM capabilities and a security specification that governs the behavior of Java applications running on a given device or a family of devices.
A profile is a collection of Java APIs that supplement a configuration to provide capabilities for a specific device group or market type. Examples of such groups are cell phones, two-way pagers and PDAs.
Connected Limited Device Configuration (CLDC)
One of the earliest configurations for J2ME was the Connected Limited Device Configuration (CLDC). The CLDC targets devices that have:
Total memory of 160 to 512KB
Limited power
Limited and intermittent connectivity
Constrained user interfaces
Mobile Information Device Profile (MIDP)
Mobile Information Device Profile (MIDP), currently in version 1.0, targets devices that implement CLDC; it provides:
Display toolkit APIs and input methods
HTTP-based networking using the Generic Connection Framework found in CLDC
Persistent data storage APIs
The remainder of the article will deal primarily with writing applications using MIDP APIs.


Thus, CLDC is a minimum Java Platform and MIDP is a set of API.
Cheer,
David Chan
16 years ago
I think the advantage of Midlet or J2ME is device independ. Same Midlet program can run on PALM and various moblie phone. The user interface will change automatic to fit the running device.
David Chan
16 years ago
First of all, there is not relational database in PALM, it only have flat-file database system.
If you use PALM SDK, you can create a binary or ascii database.
If you use RMS in J2ME, you can create binary database only.
Oracle have a Oracle lite for handheld, PALM, PDA, but don't think it is a relational database. It is just a remote database management console for your Oracle database at PC or Unix.
Cheer,
David Chan
16 years ago
Dear all,
I am writing a test Midlet, but don't know what wrong with it. Please help me!
I am using jdk1.3.1 and J2ME Wireless Toolkit 1.0.3 and run on Windows XP Home. The following is my program.
DemoMidlet.java
---------------
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class DemoMidlet extends MIDlet implements CommandListener{
private Form welcomeForm;
private Alert alert;
private Display display;

private Command okCmd = new Command("Ok", Command.SCREEN, 5);
private Command cancelCmd = new Command("Cancel", Command.CANCEL, 10);

public DemoMidlet() {
display = Display.getDisplay(this);
}
public void startApp() {
System.err.println("start startApp");

welcomeForm = new Form("Welcome");
welcomeForm.addCommand(okCmd);
welcomeForm.addCommand(cancelCmd);
welcomeForm.setCommandListener(this);
display.setCurrent(welcomeForm);
System.err.println("end startApp");


}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable d) {

if (d == welcomeForm) {

System.err.println("It is running ... ");
}

}

}
MANIFEST.MF
-----------
Manifest-Version: 1.0
MIDlet-Name: Demo
MIDlet-1: Demo, ,DemoMidlet
MIDlet-Version: 1.0
MIDlet-Vendor: Samuel
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
Demo.jad
----------
MIDlet-Version:1.0
MIDlet-Vendor:Samuel
MIDlet-Jar-URL emo.jar
MicroEdition-Configuration:CLDC-1.0
MicroEdition-Profile:MIDP-1.0
MIDlet-1 emo, ,DemoMidlet
MIDlet-Name emo
MIDlet-Jar-Size:290

Compile.bat
-----------
javac -bootclasspath %J2ME_HOME%\lib\midpapi.zip -sourcepath D:\FYP\Test -classpath D:\FYP\Test -target 1.1 *.java
%J2ME_HOME%\bin\preverify.exe -classpath %J2ME_HOME%\lib\midpapi.zip;. -d D:\FYP\Test D:\FYP\Test
%JAVA_HOME%\bin\jar cmf MANIFEST.MF Demo.jar *.class
Run.bat
-------
set CLASSPATH=%J2ME_HOME%\lib\midpapi.zip;%J2ME_HOME%\wtklib\kvem.jar;%J2ME_HOME%\wtklib\kenv.zip;%J2ME_HOME%\wtklib\lime.jar
%J2ME_HOME%\bin\emulator -Xdescriptor :\FYP\Test\Demo.jad
When I run it with run.bat, the following error occurs:
Error verifying method DemoMidlet commandAction(Ljavax/microedition/lcdui/Comman
d;Ljavax/microedition/lcdui/Displayable V
Approximate bytecode offset 5: Inconsistent or missing stackmap at targetExecuti
on completed successfully
64061 bytecodes executed
8 thread switches
311 classes in the system (including system classes)
630 dynamic objects allocated (27784 bytes)
ALERT: Error verifying class DemoMidlet
2 garbage collections (14720 bytes collected)
Total heap size 500000 bytes (currently 482840 bytes free)
Please help me! I really don't know how to fix it.
Thanks
David Chan
16 years ago
Dear all,
I am new to J2ME. I have wrote a Midlet and try to send message to a servlet, but not successful. I want to know can I debug a Midlet? Can I use System.out.println() in Midlet?
Or I need to write debug message to recordset? Can I use forte for java to debug it? Or need to display error message in alert?
Thanks a lot
16 years ago
Dear all,
I am a part-time degree student and I am new to java and j2me. I am going to develop a J2ME application on Palm for my FYP. I have read some documents using observable and observer to implement MVC. I want to know how can I implement MVC concept in J2ME? What classes I can use to implement it? Anyone have ideas? Please help!
Thanks in advance.
16 years ago
Hi Theodore,
Some more question. Is it there havn't any exam oriented book for this exam(Test 406)? I cann't find any exam oriented book in amazon. Is questions in the exam difficult? Straight foward? or tricky?
Thanks,
David Chan
16 years ago
Hi! Theodore Casser!
I am also interested in IBM Websphere Certification. Actually, I am new to Websphere and Java. I just have passed SCJP about a month ago. I think I will start with IBM Certified Specialist - WebSphere Application Server, Std. Ed, V3.5 first. Can you kindly advise me how to start it? Is there any good website, resource, mock exam and books available?
Thanks in advance,
David Chan.
17 years ago
Hi John,
I am new to J2ME. I am interested in your question also, as I am going to use Palm to do some wireless application for my FYP. Can you kindly tell me the answer of your question? Especially, question 1 and 3. ^^
David Chan.
17 years ago
Hi,
I am new to J2ME. I want to build a Wireless CRM system in PDA using J2ME as my final year project. I hope that I can use J2ME to write client program recieve and send message to server and store data to Palm DB.
Did J2ME can do these kind of system? Is J2ME is a proper choose?
Regards,
David Chan.
17 years ago
I can not remember the distribution exactly. I remember that you have to read source in a lot of question. Thread about 6-5Q, Awt 4Q, io 4-5Q....
And following is some Q that I remember:
1) - a class implements Runnable with 2 private integer variable
- then a run method the 2 variable is updated with or without synchronized block

2) Wrapper class Integer, Double and Float, use equals and == to compare.
3) Constructor of RandomAccessFile, remember only "r" and "rw" mode.
4) a button added to a panel and this panel added to NORTH of Frame, then another button added to SOUTH of a Frame directly, ask you about the behave of the 2 button when the frame resize.
5) Deadlock situation occur when 2 thread acquire lock at 2 diff. object at different order.
Hope that this can help!

David Chan
17 years ago
Dear all,
I am just passed SCJP in this morning! Feeling great now! Ha! ha! I got average 7x% at Marcus green test.
Thanks,
David Chan
17 years ago