Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Aphorismen
Applications
Business Economics & Admin.
My Computers
Cooking
Devices
Folders
Food
Hardware
Infos
Software Development
Sports
Operation Instructions
Todos
Test
Help
Glossary
Community portal
adaptions
Sidebar anpassen
Wiki RB4
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
JavaLanguage
(section)
Page
Discussion
English
Read
Edit
View history
Toolbox
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=General Informations= * Java is a '''imperative''' language. Programs consist of assignments. All assignments have to be inside a class. * Java is strongly typed. ==History== Invented mostly by James Gosling, former known as oak. Ein '''Java Specification Request (JSR)''' ist eine Anforderung einer neuen Java-Spezifikation oder einer wichtigen Ănderung einer existierenden Java-Spezifikation, die im Rahmen des Java Community Process (JCP) an das von Oracle betriebene Process Management Office (PMO) gestellt wird. Ăber dieses Verfahren werden neue Java-Standards definiert und Erweiterungen der Programmiersprache Java oder der Java-Laufzeitumgebung gemeinschaftlich entwickelt. ==Java Platform== Mit dem Java Development Kit (JDK) lassen sich Java Standard Edition (SE) Applikationen entwickeln. Beim Java SE Runtime Environment (JRE) ist nur die JVM zusammen mit den nötigen Bibliotheken gebĂŒndelt. Auch wenn Entwicklungsumgebungen wie Eclipse einen eigenen Java-Compiler mitbringen, ist das JRE doch das Mindeste dessen, was zur AusfĂŒhrung nötig ist. Die Java Platform, Enterprise Edition (Java EE) ist ein Aufsatz fĂŒr die Java SE und integriert Pakete, die zur Entwicklung von Enterprise-Applikationen nötig sind. Dazu zĂ€hlen Technologien wie die Enterprise JavaBeans (EJBs), Servlets, JSP, Java-Mail-API, JTS und weitere. ===JRE=== Aufruf von Programmen: java [-jar <jarfile>|<Classname>] By default, the first non-option argument is the name of the class to be invoked. A fully-qualified class name should be used. If the -jar option is specified, the first non-option argument is the name of a JAR archive containing class and resource files for the application, with the startup class indicated by the Main-Class manifest header. ====Command Line Parameters==== {| |- | -D<SystemProperty> | set a system property e.g. -Djava.util.logging.config.file=/Uwes/eclipse/workspace/Ballaballa/bin/ballaballa_logging.properties |- | -Xdebug | enables debugging |- | -Xrunjdwp:<sub-options> | loads the implementation of JDWP in the target VM. |- | -cp <CLASSPATH> | overrides all classpath entries, except the extension classes, that is obviously the jre libs. If the -jar option is used, -cp is ignored. Since java 6 it's possible tho specify multiple jar files with the wildcard *, but it must be just just with the * not with *.jar. |} ===JDK=== JDK includes JRE and development tools. ===Versions=== Ab 1.5 fĂ€llt 1. weg, allerdings selbst bei Sun manchmal dann doch nicht. {| border="1" !Version !Datum !Einige Neuerungen/Besonderheiten |- valign="top" |1.0 |Urversion 1995 |Die 1.0.x-Versionen lösen diverse Sicherheitsprobleme. |- valign="top" |1.1 |Februar 1997 |Neuerungen bei der Ereignisbehandlung, Umgang mit Unicode-Dateien (Reader/Writer statt nur Streams), DatenbankunterstĂŒtzung via JDBC sowie innere Klassen und eine standardisierte UnterstĂŒtzung fĂŒr Nicht-Java-Code (nativen Code) |- valign="top" |1.2 |November 1998 |HeiĂt nun nicht mehr JDK, sondern Java 2 Software Development Kit (SDK). [[Swing]] ist die neue Bibliothek fĂŒr grafische OberflĂ€chen und eine Collection-API fĂŒr Datenstrukturen und Algorithmen. |- valign="top" |1.3 |Mai 2000 |Namensdienste mit JNDI, verteilte Programmierung mit RMI/IIOP, Sound-UnterstĂŒtzung |- valign="top" |1.4 |Februar 2002 |Schnittstelle fĂŒr XML-Parser, [[JavaAPI#Logging|Logging]], neues IO-System (NIO), regulĂ€re AusdrĂŒcke, Assertions |- valign="top" |5 |September 2004 |Generische Typen, [[#Enum|typsichere Enums]], [[JavaLanguage#Methods|Variable Number of Arguments]], [[JavaLanguage#Control_Flow|Extended for]], [[JavaLanguage#Autoboxing|Autoboxing]], [[JavaLanguage#Annotations|Annotations]] |- valign="top" |6 |Ende 2006 |Web-Services, Skript-UnterstĂŒtzung, Compiler-API, Java-Objekte an XML-Dokumenten binden, System Tray |- valign="top" |7 |possibly begin 2008 | |} KompatibilitĂ€tsprobleme hat es fast nie gegeben. ===Executables=== '''java.exe''' is the JVM runtime or JIT that lets you execute your class files. Usually it comes with the JRE or JDK. ====Windows==== The java.exe first on the path is used, which is normally the one in \Windows\System32 and which is a dummy that looks up entries in the registry ([HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\). There are also java.exe's in the JRE and JDK directory. ==Difference between Java and C++== *no pointer and pointer arithmetic *no unsigned type specifier *no confusion between assignment and equality test *no manual memory allocation *no difference between definition and declaration (only declaration) *no goto *in Java you can call another ctor in a ctor *no initialisation in ctor initialization list *erweiterte Array Declaration und Laufzeitabfrage der LĂ€nge *no multiple inheritance but interfaces *Aufruf des Basisctors durch super() und Basismethoden durch super.<MethodenName>() *no templates *alle Referenzvariablen mĂŒssen mit new angelegt werden *'new Rectangle(100, 50).area()' is possible *alle Klassen haben als Basisklasse 'object' *garbage collection *methods can only be defined in the class body (no global functions); they are called methods rather than member functions. *es gibt nichts auĂerhalb des Kontextes einer Klasse *alle Elemente einer Klasse mĂŒssen in einer Quelldatei definiert werden *kein PrĂ€prozessor => kein include, keine Header *kein Ăberladen von Operatoren (Ausnahme ist + fĂŒr Strings) *class declarations can be used in finy places e.g. as anonymous classes *alle Methoden von java Klassen sind virtual (ausser final,private,static) *different meaning of protected *multithreading is part of the Java language (synchronized) *different exception handling *variables declared in a for header go out of scope outside the for block *no line continuation with \ *no use of booleans as ints *no comma operator except in the initialization and increment section of a for loop *+ operator for strings *instanceof operator *>>> operator *& and | operators act a little bit different *labeled breaks (multi-level break) *There are no structs, pointer or unions *no enumerations *no bit fields *no variable length parameter list *weitaus eingeschrĂ€nktere automatische casts *kein Zuweisung in expressions wie z.B. Method(x=getX(),a,b,c)
Summary:
Please note that all contributions to Wiki RB4 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Uwe Heuer Wiki New:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width