User:Hillgentleman/java
Appearance
A straight path to your first programme in java in Windows, and then on your mobile phone, for absolute beginners.
running Java in windows
[edit]- Download JDK (java development kid): http://java.sun.com/javase/downloads/index.jsp
(see also https://jdk.dev.java.net/ )
- (optional) learn about fundamentals / en:topic:java
- (optional) Learn about classes and objects
- create the following .java file (taken from wikibooks[1] titled Test.java.
public class Test {
public static void main(String[] args) {
int x = 4;
int y = 4;
int z = 6;
x++;
y *= 2;
z += x;
if (x <= y) {
System.out.println("x is less than or equal to y.");
}
if (z <= y) {
System.out.println("z is less than y.");
}
if (x != z) {
System.out.println("x is not equal to z");
}
}
}
- compile your Test.java with (= open the containing folder, right-click it and open it with) javac.exe, which is probably in the directory C:/Program Files/java/jdk1.6.0_12/bin/javac.exe . The file Test.class will be created.
- run your Test.class (=open the containing folder, right-click it and open it with) java.exe, which is probably in the directory C:/Program Files/java/jdk1.6.0_12/bin/javac.exe . (or, if you like, open a command line, change into the directory of "Test.class" and type "java Test".)
- Learn more about compilation and execuation
Further
[edit]- http://en.wikibooks.org/wiki/Java_Programming/Understanding_a_Java_Program#Detailed Program Structure and Overview
- http://www.alnaja7.org/Programmer/393/ITCS-393.htm
- http://curmudgeon99.googlepages.com/
- http://www.jarticles.com/package/package_eng.html - step by step guide to packaging
Mobile phone
[edit]- Main reference: table of contents, MIDP specifications, Java Language specification, third edition
- install J2ME Wireless kit[1] for MIDP
- follow the instructions on /docs/UserGuide-html/developing.html to create your first "Tiny" MIDlet application!
- Learn about how J2ME input-output works (e.g. [2], JOptionPane [3] in the javax.swing [4] package and BufferReader Classes in the java.io package) ; learn about wikipedia:record Management System (RMS) [ or may be javax.microedition.lcdui.* ? ]
see also
[edit]- need MIDlet-information; learn more about MIDlet-Suite (e.g.[5]), ([http://today.java.net/pub/a/today/2005/02/09/j2me1.html?page=2#understanding)
- Learn about MIDP at [6]
- http://fl0g.wordpress.com/2008/07/03/java-midlet-writing-your-own-mobile-phone-programs/
- http://www.koeniglich.de/sdk2unix/symbian_sdk_on_unix.html
- wikibooks:Programming:J2ME, wikibooks:J2ME_Programming/JVMs_in_MIDP
- http://www.wirelessdevnet.com/channels/pda/training/symbian2/symbian6java1.html
- http://www.allaboutsymbian.com/archive/t-8621.html some step by step guidea
- http://today.java.net/pub/a/today/2005/02/09/j2me1.html J2ME tutorial
- http://www.kevinboone.com/j2me.html J2ME FAQ
- http://www.developer.com/java/j2me/print.php/10934_1561591_2 J2ME high level api
Glossary
[edit]see also wikibooks:Java Programming/Keywords taken from wikibooks/wikiversity/...
- Method - operation on a particular object
- object - an instance of a class.
- package
- types wikibooks:Java Programming/Types
- primitive types