Java осень 2012 лекция 1

  • View
    136

  • Download
    0

Embed Size (px)

Transcript

Java 1.

: ++, #, Java, PHP, HTML, SQL, JavaScript, Python, Shell, Perl 9 000 000 14 : ++, Java, #, Shell, Python 10 ,

.

.

Java

Java 1995. Java .Net Microsoft Java

Java

JVM

JVM

+ - : : - +

Java? Java ++

, :, , , , , , ,

private, protected, public

Java. Java editions. Java Virtual Machine. (Hash, Map, Set, List, Array). Thread Object. Concurrency.Message System. Address. Abonent.Frontend. Game Mechanics.Resource System. Serialization. I/O. Stream.Reflection. Dependency injection. Annotation. Generics.JDBC. DataSet. DAO. Hibernate.

QA. Tests. .,

online Java ? , !

Java

Java Runtime Environment (JRE)Java Virtual Machine(JVM)Class Libraries Java Development Kit (JDK)JREJava compilerIDE Java

Java

InterpreterJVMJust-In-Time (JIT) compilerByte code verifierGarbage collector (GC)Javac *.java *.class*.class *.jar (zip )

Garbage collector (GC) Stack Heap Strong references

Weak referencesSoft references

Java editions Java SE (Standard Edition)JVM + API + runtime environment servicesJava SEJava EE (Enterprise Edition)Java ME (Micro Edition) ,

java C++ *.cpp *.h (class, interface, enum) , Object delete Reflection runtime

*.jar (zip ) java (packages)packageName.directoryName.ClassName : MySuperClassName : mySuperMethod() : myVariable

java [ options ] class [ args... ]java [ options ] -jar file.jar [ args... ] + Main class in manifest headerpublic static void main(String args[]){}options ( ):-classpathclasspath -Xmsn Heap (, -Xms256m) , default 2m-Xmxn Heap (, -Xmx1024m), default 64m -Dproperty=value - System.getProperty(property)

Tuning java Garbage collectorMemoryRuntime compiler-Xmx, -Xms Heap-Xss Stack-X JVM ( HotSpot)-XX not stable-XX:+UseConcMarkSweepGC

Java SE 6 Update 35 (JDK)http://www.oracle.com/technetwork/java/javase/downloads/ Eclipse IDE for Java Developershttp://www.eclipse.org/downloads/JDKEclipse

jetty-all-7.0.2.v20100331.jarservlet-api-2.5.jar http://tp.mail.ru/blog/201.htmlJetty: Project/Properties/Java Build Path/Libraries/Add external JarsMaster: http://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld

:Beginner: Hello World java

chibrikov@corp.mail.ru