java介绍外文翻译

合集下载

介绍java英语作文

介绍java英语作文

介绍java英语作文English:Java is a general-purpose, high-level programming language that is designed to have as few implementation dependencies as possible. It is a class-based, object-oriented language that is similar to C++ but has a simpler syntax and automatic memory management. Java is a portable language, meaning that code written in Java can be run on any platform that has a Java Virtual Machine (JVM) installed.Java is a popular language for developing a wide range of applications, including web applications, desktop applications, and mobile applications. It is also used for developing enterprise software, such as databases, servers, and middleware. Java is a versatile language that can be used for a variety of purposes, making it a good choice for developers of all levels.中文。

Java是一种通用的高级编程语言,旨在尽可能减少实现依赖性。

用英语介绍java作文

用英语介绍java作文

用英语介绍java作文英文回答:Java is a high-level, object-oriented programming language used to develop a wide range of software applications. It is known for its platform independence, which allows programs written in Java to run on any operating system or hardware platform that supports the Java Virtual Machine (JVM).Java was developed by Sun Microsystems in 1995 and is now owned by Oracle Corporation. It is one of the most popular programming languages in use today, and is used by millions of developers worldwide.Java is known for its robustness, security, and ease of development. It is also very versatile, and can be used to develop a wide range of applications, including:Enterprise applications.Web applications.Mobile applications.Desktop applications.Embedded systems.Java is a strongly typed language, which means that the data type of each variable is known at compile time. This helps to prevent errors and makes Java code more reliable.Java is also an object-oriented language, which means that it uses objects to represent real-world entities. This makes Java code more modular and easier to maintain.Java is a very powerful language, and it can be used to develop a wide range of software applications. It is a great choice for developers who are looking for a language that is robust, secure, and easy to develop.中文回答:Java是一种高级面向对象的编程语言,可以用来开发广泛的软件应用。

JAVA外文资料翻译

JAVA外文资料翻译
本文由hunter_yiyi贡献
doc文ห้องสมุดไป่ตู้可能在WAP端浏览体验不佳。建议您优先选择TXT,或下载源文件到本机查看。
外文文献原文及翻译 作 者:辛明 生物医学工程学院影像工程专业 生物医学工程学院信息技术系 指导老师:杨谊
Parsing Java Abstraction of the Difference Between Classes and Interfaces In Java language, abstract scale-up and with support class abstraction definition of two mechanisms. Because of these two kinds of mechanism of existence, just gives Java powerful object-oriented skills. Abstract scale-up and with between class abstraction definition for support has great similarities, even interchangeable, so many developers into line nonabstract class definition for abstract scale-up and it is becoming more casual with choice. In fact, both between still has the very big difference, for their choice even reflected in problem domain essence of understanding, to design the intentions of the understand correctly and reasonable. This paper will for the difference analysis, trying to give a developer with a choice between them are based. Understand class abstraction Abstract class and interface in Java language is used for abstract classes (in this article nonabstract class not from abstract scale-up translation, it represents an abstract body, and abstract scale-up for Java language used to define class abstraction in one way, please readers distinguish) defined, then what are the abstract classes, use abstract classes for us any good? In object-oriented concept, we know all objects is through class to describe, but in turn not such. Not all classes are used to describe object, if a class does not contain enough information to portray a concrete object, this class is abstract classes. Abstract classes are often used to characterization of problem field in our analysis, design that the abstract concepts, is to the series will look different, but essentially the same exact conception of abstraction. For example: if we carry out a graphical editing software development, will find problem domain exists round, triangle so some specific concept, they are different, but they all belong to shape such a concept, shape this concept in problem domain is not exist, it is an abstract concept. Precisely because the abstract concepts in problem field no corresponding specific concept, so to characterization abstract concepts nonabstract class cannot be instantiated. In an object-oriented field, mainly used for class abstraction types hidden. We can construct a fixed a group of behavior of abstract description, but this group of behavior but can have any a possible concrete implementation. This abstract describe is abstract classes, and this an arbitrary a possible concrete realization is behaved for all possible derived class. Modules can be operating an abstract body. Due to the module dependent on a fixed abstraction body, so it can are not allowed to modify, Meanwhile, through the abstract derived from the body, also can expand the behavior of this module function. Familiar with OCP readers must know, object-oriented design to be able to achieve a core principles OCP (Open - Closed flying), class abstraction is one of the key. From the perspectives of grammar definition abstract class and interface

java外文翻译

java外文翻译

Cluster Computing3(2000)83–9483Delta Execution:A preemptive Java thread migration mechanism∗Matchy J.M.Ma,Cho-Li Wang and Francis uDepartment of Computer Science and Information Systems,The University of Hong Kong,Pokfulam Road,Hong Kong Delta Execution is a preemptive and transparent thread migration mechanism for supporting load distribution and balancing in a cluster of workstations.The design of Delta Execution allows the execution system to migrate threads of a Java application to different nodes of a cluster so as to achieve parallel execution.The approach is to break down and group the execution context of a migrating thread into sets of consecutive machine-dependent and machine-independent execution sub-contexts.Each set of machine-independent sub-contexts,also known as a delta set,is then migrated to a remote node in a regulated manner for continuing the execution.Since Delta Execution is implemented at the virtual machine level,all the migration-related activities are conducted transparently with respect to the applications.No new migration-related instructions need to be added to the programs and existing applications can immediately benefit from the parallel execution capability of Delta Execution without any code modification.Furthermore,because the Delta Execution approach identifies and migrates only the machine-independent part of a thread’s execution context,the implementation is therefore reasonably manageable and the resulting software is portable.1.IntroductionTraditional UNIX-like systems such as Sprite[7]and MOSIX[2]support dynamic load balancing in a cluster by implementing process migration at the kernel level.Be-cause the kernel has the best knowledge of all the activ-ities and resources that are distributed within the cluster, it can perform resource management effectively.However, as UNIX was not designed with the notion of process mi-gration from ground up,extending it to support migration usually requires a substantial amount of software effort and the portability of the system could be compromised as a result[3].Delta Execution aims at providing a high-level and portable implementation of migratable Java threads that is not entangled with any low-level and system-dependent is-sues.The implementation is carried out at the middle-ware level by extending the Java Virtual Machine.Because of this high-level approach,the Delta Execution mechanism is also applicable to other language environments that are based on virtual machines for supporting preemptive thread migration.The Delta Execution mechanism identifies and separates the machine-independent sub-contexts from the machine-dependent sub-contexts in the execution context of a run-ning thread.Machine-independent sub-context is the state information that can be expressed in terms of execution state of the virtual machine,such as data stored in the virtual machine’s registers.Mahine-dependent sub-context is the state information that are part of the internal state of the ex-ecuting program that implements the virtual machine,such as the hardware program counter that points to the current machine instruction when the virtual machine is executing ∗This research was supported by the Hong Kong RGC Grants HKU 7032/98E and HKU7025/97E.a native method.When a thread migrates to a remote node, only the machine-independent sub-contexts are migrated in a regulated manner.The manipulation of any machine-dependent sub-contexts is avoided by keeping them intact at the home node where execution involving these sub-contexts will continue to be performed.Active execution of the migrated thread is observed as a sequence of execu-tions on the machine-dependent and machine-independent sub-contexts that switches back and forth between the home and the remote node.Because the migrated thread only in-crementally advances its execution by a delta amount every time the execution control switches between the two nodes, thus we give this mechanism the name Delta Execution.The Delta Execution mechanism is implemented as part of the JESSICA(Java-Enabled Single-System-Image Com-puting Architecture)middle-ware[9,10]for cluster com-puting.JESSICA is a distributed Java Virtual Machine that abstracts away the distributed nature of the cluster hard-ware and provides multi-threaded Java applications with an illusion of a single multi-processor machine.In summary,the main features of Delta Execution in-clude:•Transparent migration.The Delta Execution mecha-nism is implemented entirely at the virtual machine level which is transparent to a migrating thread;together with a redirection mechanism for forwarding location-dependent operations and a distributed shared-memory subsystem that supports location-independent memory access,migration transparency can be guaranteed.•Bytecode-level migration granularity.A thread can be stopped at any time and be migrated once the execution of the current bytecode instruction isfinished.The sys-tem can swiftly respond to any change in system load across the cluster for load balancing.©Baltzer Science Publishers BV84M.J.M.Ma et al./Delta Execution:A preemptive Java thread migration mechanism•Portable and manageable implementation .Unlike tra-ditional systems that implement migration at the kernel level,Delta Execution is implemented on top of the ker-nel without having to deal with any low-level details of the operating system or the hardware.This approach provides better portability and the software effort re-quired is more manageable.•Compatibility with existing Java applications .Because the migration mechanism does not require adding any new migration-related instructions to a Java program,the implementation offers maximum compatibility to the vast number of existing Java applications.•A language-neutral solution .The design of Delta Exe-cution and its accompanying redirection mechanism for handling migration transparency is not only applicable to the Java programming language alone.It is a generic solution that can also be applied to other programming languages which execute by means of virtual machines for supporting transparent thread migration.The rest of the paper is organized as follows.Section 2presents the system architecture of JESSICA.Section 3dis-cusses the Delta Execution mechanism in detail.Section 4evaluates the performance of an experimental prototype.Section 5discusses related work and finally Section 6con-cludes the paper.2.JESSICA system architectureJESSICA comprises a group of daemons running in all the nodes in a cluster of computers.They execute as user-level processes on top of the UNIX operating system,and it is the collaboration and coordination among these JESSICA daemons that a single-system-image illusion is offered to Java applications,as depicted in figure 1.The single-system-image illusion is established through the provision of a global thread space .The global thread space is a logical thread space that spans all the nodes in the cluster,where the machine boundaries are hidden and threads can freely migrate from one node to another byfol-Figure 1.Global Thread Space creates an SSI illusion over a cluster ofcomputers.lowing the Delta Execution mechanism.The distributed-shared memory (DSM)subsystem enables memory objects to be globally-accessible by threads independent of their current physical locations.Together with a master-slave redirection mechanism that forwards I/O and other location-dependent operations back to the home node for execution,thread migration within the global thread space is entirely transparent to applications.As a result,this free move-ment of threads provides an opportunity for optimizing the utilization of shared resources within the cluster.In JESSICA,we classify cluster nodes as either console or worker as follows:•Console node .Java applications can be started in any node in the JESSICA cluster.The node in which a Java application is initiated will become the home of that application and is known as the console node.•Worker node .When an application is instantiated in the console node,other nodes in the JESSICA cluster will play the role of supporting the console to execute the application.The worker nodes are there in stand-by mode and would serve any requests forwarded from the console.2.1.JESSICA daemonEach JESSICA daemon is composed of the following four components that provide bytecode execution,memory management,thread creation,scheduling and synchroniza-tion to Java applications the same way as a standard Java Virtual Machine (JVM).•Bytecode Execution Engine (BEE).It is responsible for binding an active thread and executing its method code.Parallel execution of a multi-threaded application is re-alized by having multiple BEEs running on multiple ma-chines to execute multiple threads simultaneously.•Distributed Object Manager (DOM).It is responsible for managing the memory resources in its local node and to cooperate with DOMs running on other nodes to create a global object space.The physical locations of objects are transparent to the threads living within the global object space.•Thread Manager (TM).It is responsible for creating,scheduling and destroying threads running on the local node.During the course of migration,it coordinates with TMs running on other nodes to marshal,ship,and demarshal the execution contexts of migrating threads.•Migration Manager (MM).It is responsible for collect-ing load information of the local node and exchanging that information with MMs running on other nodes in order to enforce a migration policy.2.2.A master-slave model for migrating threadsWhen a thread running in the console node migrates,it does not actually pack its entire execution context andM.J.M.Ma et al./Delta Execution:A preemptive Java thread migration mechanism85Figure2.Interactions between the master and the slave threads that hide migration from the rest of the system.move to the destination worker node.Instead,it is split into two cooperating entities,one running in the console node called the master,and the other running in the worker node called the slave.The slave thread is in fact created anew at the worker node and acts as the migrated thread image to continue the execution of the original thread.The execution context is divided into sets of machine-dependent and machine-independent sub-contexts as identified by the Delta Execution mechanism.All the machine-dependent sub-contexts are processed locally by the master thread while the remaining machine-independent sub-contexts are migrated to the slave thread for execution.As a result,this master-slave design provides an opportunity for the imple-mentation to isolate and process machine-dependent con-texts from machine-independent contexts in a manageable way.The master thread remaining at the console represents the original thread and is now responsible for performing any location-dependent operation such as I/O for the slave. With this design we are able to create the global thread space that maintains the same semantics and relationships between all the objects in the execution environment as the case when there is no migration,as shown infigure2.All the interactions between the slave and other threads have to go through the master.The redirections make the master appear to other threads as the only thread they are inter-acting with.On the slave side,all the location-dependent operations are redirected transparently back to the console to be performed by the master.As a result,the execution environment observed by a running thread in JESSICA is the same as that in a standard JVM,regardless of whether the thread has been migrated or not.3.Delta executionThe primary task for performing thread migration is to capture the execution context of a migrating thread com-pletely at the console node so that the context can be cor-rectly reproduced at the destination worker node.Execu-tion context represents the current state of a running thread. The execution state reconstructed at the worker node will be used to resume execution of the migrated thread at ex-actly the same place where the thread was frozen at the console.3.1.Method invocation sequence and Java method frameObserve that the life of an active Java thread be-gins with the calling of ng.Thread.start() method,or the equivalent if this thread is a sub-class of ng.Thread.The bytecode instructions of this method will be executed by the bytecode execution engine, which may further call other methods,and so on.Finally, the thread terminates when this start()(or the equiva-lent)method returns.In other words,the execution context of a running thread can be represented by a sequence of method calls and their respective execution context local to each method.Here a structure called Java method frame(JMF)is de-fined to help represent the method invocation sequence of an active thread.The purpose of JMF is to capture the ex-ecution context of a Java method under execution.A JMF contains:•a program counter(PC)pointing to the bytecode that is currently under execution;•NPC,the location of next bytecode instruction to be executed;86M.J.M.Ma et al./Delta Execution:A preemptive Java thread migrationmechanismFigure3.Factorial.java.•a stack pointer(SP)pointing to the top of the Java method stack;•the set of local variables of this method;•the Java method stack;•other miscellaneous information such as that for Java exception handling.Notice that information containing in a JMF is platform-independent.With the JMF defined,we will be able to describe the execution context of a running thread.When the bytecode execution enginefirst activates a thread by invoking its ng.Thread.start()method(or the equiva-lent),it pushes the corresponding JMF,labeled as f0,onto the thread runtime stack before executing code that im-plements the method.The inserted f0is responsible to store state information that comprises the execution con-text of the start()method during execution.Consider at some point the start()method tries to invoke an-other method,m1,by using one of the invokeMethod1 instructions,the thread will instantiate a new JMF,f1,for storing the execution context of the invoking method m1 and pushes it onto the thread runtime stack.When m1re-turns,its method execution context will also be discarded. This is done by popping f1from the runtime stack.The popping action will also cause the execution context of the start()method,i.e.f0,to be restored automatically. Since at this moment the NPC of f0is pointing to the instruction immediately following the previous m1call,the thread can then continue its execution from the point of re-turn of the m1call.Notice that because of this arrangement, the JMF sitting on the top of the runtime stack will always correspond to the execution context of the current method.3.2.A simple thread migration exampleThe Factorial.java example shown infigure3il-lustrates how thread migration is carried out and how exe-cution states are captured and transferred based on the JMF structure.The compiled bytecode instructions are shown in figure4.The numbers following the line numbers infig-ure4represent the corresponding locations of the bytecode instructions to be stored in the program counter(PC).1The bytecode execution engine can invoke a Java method by executing one of the invokevirtual,invokespecial, invokeinterface,or invokestatic bytecodeinstructions.Figure4.Disassembled bytecode of the class Factorial.Consider the console node triggering a migration when the Factorial program has already recursed three times and the running thread is frozen at PC=8of method f()(figure4,line18).After the current instruction at PC=8,i.e.,iload0,has been completed,the execution context of the main thread can be represented pictorially as infigure5.Suppose at this moment this main thread migrates,the abovefive JMFs which constitute the entire execution con-text of main,are packed and shipped to a worker node.Af-ter the execution context arrives at the destination worker node,they are unpacked and reconstructed,and eventually bound to the execution context of a newly created slave thread.When the slave thread resumes its execution,it continues from the tail-JMF,and updates the value of PC to9,i.e.,iconst1(figure4,line19),according to the content of the NPC.The result is an integer constant1being pushed onto the tail-JMF’s method stack.From this point onwards,the slave thread continues its execution correctly from the point where the master was previously stopped. When the recursive method f()at this level(n=7)re-turns,the JMF is popped and the context of the previous JMF(n=8)is restored.The method stack now should contain two integer elements:8,and5040,i.e.,the value of n and the evaluated value of f(7),respectively.From this point onwards,the execution context of the slave thread further unwinds itself and the JMFs of the method f()are popped from the thread runtime stack one after another as the recursive calls return.Eventually when all the JMFs are exhausted the slave thread will have completed its ex-ecution,and the result is the return value of f(10)stored at the top of the method stack.M.J.M.Ma et al./Delta Execution:A preemptive Java thread migration mechanism87Figure 5.Execution context of thread main after a number ofiterations.Figure 6.Bar.java and Foo.java.Figure 7.Disassembled bytecode of the class Bar .3.3.How machine-dependent sub-context comes about Although the JMF structure appeared to be comprehen-sive enough to capture the execution context of a run-ning thread,it turns out that such solution is only good for some cases.If a thread invokes methods directly through the bytecode execution engine using one of the invokeMethod instructions,then the scheme of using a sequence of JMFs as described previously can sufficiently capture and represent the execution context of this run-ning thread.On the other hand,if this thread invokes a native method 2,or if the bytecode execution engine ex-ecutes an instruction such that the instruction will invoke another method as a side-effect,this will generate machine-dependent sub-context that a sequence of JMFs alone can-not capture.An example of machine-dependent state in-formation so generated is the hardware return address of the native method.This can be illustrated by the following Bar and Foo classes as shown in figure 6.Their cor-responding disassembled bytecode are shown in figures 7and 8,respectively.An illustrating exampleThis example demonstrates how machine-dependent state information is introduced into a thread’s execution context when the bytecode execution engine executes a bytecode instruction that in turn invokes another method.2A native method is a method implemented by the native machine code of the underlying hardware.88M.J.M.Ma et al./Delta Execution:A preemptive Java thread migrationmechanismFigure 8.Disassembled bytecode of the class Foo.Figure 9.Simplified implementation for the new bytecode instruction inC/C++.The Bar class contains a class initialization method which will be executed once when it is loaded by the bytecode ex-ecution engine the first time.When class Foo tries to create a new instance of object Bar using the new bytecode in-struction,the bytecode execution engine will load the Bar class and invoke its initialization method just before allocat-ing a new Bar object.Machine-dependent state informa-tion is introduced into the execution context at this point.If the thread migrates before the initialization method returns,such machine-dependent sub-context cannot be captured by a JMF sequence.In this example,the static block in the class Bar defines the class initialization method (figure 6,line 03)and is internally denoted as method <clinit>by the virtual machine implementation (figure 7,line 12).According to this example,the initialization method will initialize the class variable count to 100when class Bar is first loaded (figure 6,line 03).When the execution of class Foo begins,the main thread of the bytecode execution engine enters the main()method of class Foo (figure 6,line 08)and executes its first bytecode instruction,i.e.,new ,at PC =0(figure 8,line 06).Within the bytecode execution engine,the im-plementation looks up and loads class Bar into the sys-tem (figure 8,line 06)and invokes the class initialization method.The bytecode execution engine then allocates a free memory block and returns it as a new Bar object.The C/C++code segment in figure 9shows a possible way to implement the new bytecode instruction for the bytecode execution engine,which summarizes the aboveactions.Figure 10.Execution context of thread main after entering the class ini-tialization method <clinit>.When the main thread invokes the class initialization method <clinit>by calling the vmExecuteJava-Method()3function from the instruction new()implementation at line 10of figure 9,it pushes a new JMF onto the thread runtime stack so as to represent the exe-cution context of clinit .If at this moment the console decides to migrate the thread when the bytecode execution engine is executing the first instruction of clinit ,i.e.,bipush (figure 7,line 13),the main thread will be frozen once the bipush instruction has been completed.At this stage the execution context of the thread can be represented by the JMF sequence as illustrated in figure 10.After the JMF sequence of the migrating main thread is transmitted to a destination worker node,its slave thread will resume its execution according to the reconstructed method execution context of <clinit>,where the value of PC at this point equals to 2.This will cause the in-teger value 100,as obtained from the top of the method stack,to be stored to the class variable count before re-turning from the initialization method (figure 7,line 14).When the clinit method returns,the corresponding JMF will be popped from the thread runtime stack and the ex-ecution context of Foo.main()will also be restored.Without special arrangement the bytecode execution engine will continue the execution from the execution context of Foo.main()and execute the next instruction at PC =3,i.e.,invokestatic (figure 8,line 07).But this will lead to an incorrect result as the slave thread will have “forgot-ten”to allocate memory for the new Bar object,since the instructions from lines 13–19of figure 9are skipped.Note that if there is no migration,the control flow of the main thread after returning from <clinit>should continue from line 13of the instruction new()code,as shown in figure 9.In this case,the thread will obtain a memory block from the memory manager and push the memory handle onto the method stack (figure 9,lines 13–19)before returning to the method execution context of Foo.main()at PC =3.In other words,there are certain machine-dependent state information that failed to be cap-tured between the two JMFs when the execution context is migrated,as shown in figure 11.3vmExecuteJavaMethod()is an internal function of the JESSICA implementation which allows invocation of Java methods from within the implementation itself,the same function may takes other names and forms in other Java Virtual Machine implementations.M.J.M.Ma et al./Delta Execution:A preemptive Java thread migration mechanism89Figure 11.Revised execution context of thread main after entering the class initialization method <clinit>.Figure 12.Revised thread execution context representation,where shadedblocks are the machine-dependent sub-contexts not captured by JMFs.The missing information,including the machine-dependent return address at line 13of the instruction new()code in figure 9,are in fact stored in the UNIX process stack of the daemon process running at the console.They are the machine-dependent sub-contexts of a thread execu-tion context which by all means are implementation-and hardware-dependent.3.4.Partitioning execution context into delta sets andmachine-dependent blocksConcluding from the two examples discussed above,we can categorize JMFs into two types:•B Frame is the JMF that is pushed onto the thread runtime stack as a result when a method is invoked using either invokevirtual ,invokespecial ,invokeinterface ,or invokestatic bytecode instruction .For example,the JMF being pushed as method f()recursively invokes itself at line 21of fig-ure 4is a B frame.•C Frame is the JMF that is pushed onto the thread run-time stack when the implementation code of a bytecode instruction,or a native method,invokes a method us-ing the vmExecuteJavaMethod()C/C++function .For example,the JMF being pushed at line 10of the instruction new()code in figure 9is a C frame.As illustrated by the shaded block in figure 11,it is the machine-dependent sub-context introduced by the imple-mentation code before pushing a C frame onto the threadruntime stack that cannot be captured directly.We will label such machine-dependent sub-context as a D block .Consequently,for any thread execution context,the correct representation should be expressed as a sequence of inter-leaving B frames and C frames,with a D block inserted before each C frame.Note that every sequence must begin with a C frame,since any thread execution must be initiated by the virtual machine implementation itself.Our approach is to partition a thread execution context into chunks of JMFs that are separated by D blocks,each chunk is known as a delta set ,∆E .A delta set beginswith a C frame and is followed by zero or more B frames.As shown in figure 12,∆E 1is the first delta set insertedinto the execution context when a thread first enters its start()method.∆E 2and ∆E 3are the subsequent delta sets appended to the tail of the execution context as the thread invokes methods from native code by means of the vmExecuteJavaMethod()function.Now,instead of shipping the whole execution context to the destination allat once as done in the traditional way of thread migration,we ship them in an incremental manner,one delta set at a time.When the console node performs a migration operation,the thread manager marshals and ships the tail delta set inthe execution context of the migrating thread.The slavethread at the destination worker node,once it is instan-tiated,will bind to this delta set and continue executionuntil the JMFs in this set is exhausted.The execution con-trol will then switch back to the master thread,to let it finish the machine-dependent D block there.Immediately after the machine-dependent execution is completed,con-trol flow will switch back to the slave with the next delta set migrated to continue execution at the worker node.With this arrangement of Delta Execution ,we are able to isolate those machine-dependent parts of a thread’s exe-cution context that are not migratable and to have them executed locally at the console,while those machine-independent parts are migrated across machines in the form of delta sets and are executed remotely at the worker nodes.The cooperating console and worker nodes need only in-crementally advance the execution of a migrating thread bya delta amount each time.4.Performance evaluation To study the effectiveness of the Delta Execution mech-anism,we have implemented the mechanism in a JESSICA prototype that runs on a cluster of 12SUN Ultra-1work-stations interconnected by a Fore ASX1000ATM switch.90M.J.M.Ma et al./Delta Execution:A preemptive Java thread migration mechanismThe implementation is based on the KAFFE virtual ma-chine[11]and the TreadMarks package[1]for Distributed Shared-Memory(DSM)support.4.1.Applications performanceWe have implemented the following three multi-threaded Java applications to measure the impact on performance due to thread migration.•πcalculation.This application approximatesπby eval-uating an integral.The area under the correspond-ing graph is divided into multiple regions and multiple threads are deployed tofind the sub-areas.The value πis obtained by summing up all the sub-areas once all the threads havefinished.This application shows the raw parallel performance of Delta Execution since there is no interaction between the worker threads until all the computations are done;the extra overhead due to migration is minimal.•Recursive ray-tracing.We have implemented a multi-threaded recursive ray-tracer in Java where the worker threads render the pixels of a projected2D image by shooting rays into a given3D scene.The threads obtain the next line of pixels to compute from a globally shared job queue,which provides a load-balancing effect at the application level.All worker threads are tightly syn-chronized between themselves when they access the job queue in order to maintain its consistency.This appli-cation demonstrates how distributed thread synchroniza-tion affects the performance of the worker threads that are distributed across the cluster.•Red–Black Successive Over-Relaxation(R/B-SOR)on a grid.The R/B-SOR program creates multiple threads to compute matrix elements in parallel.A huge1024×1024matrix is divided into two sub-matrices,the Red and the Black matrix,which in turn are divided into roughly equal-size bands of rows,with each band as-signed to a different thread.The threads repeatedly re-trieve values from one matrix,compute the average,and write the result back to the other matrix.Since the huge matrix is allocated from the globally shared DSM space, the execution imposes a significant amount of loading on the DSM subsystem.Hence,this is a good candidate for studying how the DSM overhead contributes to the overall execution time as a result of migration.Each of the applications was tested on the12-node clus-ter using1,2,4,8and12processors with1,2,4,8and 12worker threads,respectively,running.The results are presented infigures13–15.According tofigure13,it can be seen that almost ideal speedup and efficiency are achieved in theπapproxima-tion application,since there is no communication or coor-dination between worker threads until all the computations are completed.The recursive ray-tracing experiment shows that the efficiency is less than optimal and drops moderately as more processors are used.The efficiency decreases from 69%when using two processors to47%when using twelve processors.This is because,as indicated infigure14,the distributed synchronization overhead contributes a signifi-cant amount to the total execution time.As shown infig-ure15,the R/B-SOR application can gain moderate speedup when running with four or more processors.When running with two processors,the speed gained by overlapping the computation is offset by the extra overhead incurred due to remote memory access.The efficiency stays at around 53%and improves slightly when the number of processors is progressively increased from two to twelve.This could be due to the fact that the amount of data shared,i.e.,the sizes of the Red and the Black matrices,remain the same when executed by any number of processors,and therefore the DSM overheads constitute roughly the same percentage of the execution time.4.2.Analysis of migration latencyFigure16illustrates in detail the interactions between the console and the worker node when a thread is migrated from the former to the latter.The migration latency is the time between the moment the migrating thread is frozen by the console and the moment it is restarted later as a slave thread at the worker node.Let T0be the time taken to notify the destination node and to have the destination node prepare itself for the migration.The value of T0is relatively constant.Let T1be the time taken to marshal a delta set at the console node,to send the marshaled data across the network,and eventually to de-marshal received data at the destination node.The value of T1is therefore proportional to the size of the transferring delta set.The migration latencies,i.e.,T0+T1,for different sizes of the delta sets are measured.According to the data collected,when the size of delta set is zero,the migration latency is about24.55mil-liseconds(T0).T0is the time taken to execute the ng.Object.clone()method in the slave as well as that for sending the four handshake messages be-tween the master and the slave,as shown infigure16. The purpose of the clone()method is to create an im-age of the migrating thread at the destination node which will then become the slave thread.A further breakdown of this T0value reveals that the time required to invoke the clone()method is about17milliseconds and that for a handshake message to be sent between the master and the slave is about2milliseconds.Now consider the case when a thread is migrated just before it starts executing thefirst instruction;the delta set contains only one JMF and the corresponding method stack is empty.If there is no local variable defined in the method,the size of this minimal JMF is208bytes.Consequently,the minimum migration latency of the Delta Execution mechanism is measured to be about28.12milliseconds.It can be seen that the minimum migration latency is dominated by the time for invoking the clone()method, which accounts for over60%of the migration time.It is。

JAVA外文文献+翻译

JAVA外文文献+翻译

Java and the InternetIf Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re coming from a traditional programming perspective. Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web.1.Client-side programmingThe Web’s initial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl is acommon choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data must be sent, as well as the load on both the server and the Internet. (On top of this, starting a CGI program tends to be slow.) The initial designers of the Web did not foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed. For example, any sort of dynamic graphing is nearly impossible to perform with consistency because a GIF file must be created and moved from the server to the client for each version of the graph. And you’ve no doubt had direct experience with something as simple as validating the data on an input form. You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; you must then back up a page and try again. Not only is this slow, it’s inelegant.The solution is client-side programming. Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page. Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience at your Web site.The problem with discussions of client-side programming is that they aren’t very different from discussions of programming in general. The parameters are almost the same, but the platform is different: a Web browser is like a limited operating system. In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming. The rest of this section provides an overview of the issues and approaches in client-side programming.2.Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in. This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself into the appropriate spot in the browser. It tells the browser “from now on you can perform this new activity.” (You ne ed to download the plug-in only once.) Some fast and powerful behavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t something you’d want to do as part of the process of building a particular site. The value of the plug-in for client-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer. Thus, plug-ins provide a “back door” that allows the creation of new client-side programming languages (although not all languages are implemented as plug-ins).3.Scripting languagesPlug-ins resulted in an explosion of scripting languages. With a scripting language you embed the source code for your client-side program directly into the HTML page, and the plug-in that interprets that language is automatically activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The trade-off is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly sophisticated things with scripting languages so this is not too much of a hardship.This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in client-side programming. Your problems might very well fit completely withinthat 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming.The most commonly discussed browser scripting languages are JavaScript (which has nothing to do with Java; it’s named that way just to grab some of Java’s marketing momentum), VBScript (which looks like Visual Basic), and Tcl/Tk, which comes from the popular cross-platform GUI-building language. There are others out there, and no doubt more in development.JavaScript is probably the most commonly supported. It comes built into both Netscape Navigator and the Microsoft Internet Explorer (IE). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript. However, if you’re already fluent in Visual Basic or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing with the Web issues already.)4.JavaIf a scripting language can solve 80 percent of the client-side programming problems, what about the other 20 percent—the “really hard stuff?” The most popular solution today is Java. Not only is it a powerful programming language built to be secure, cross-platform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, network programming, and distributed computing. Java allows client-side programming via the applet.An applet is a mini-program that will run only under a Web browser. The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded). When the applet is activated it executes a program. This is part of its beauty—it provides you with a way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner. The user gets the latest version of the client software without fail and without difficult reinstallation. Because of theway Java is designed, the programmer needs to create only a single program, and that program automatically works with all computers that have browsers with built-in Java interpreters. (This safely includes the vast majority of machines.) Since Java is a full-fledged programming language, you can do as much work as possible on the client before and after making requests of the server. F or example, you won’t need to send a request form across the Internet to discover that you’ve gotten a date or some other parameter wrong, and your client computer can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you. Not only do you get the immediate win of speed and responsiveness, but the general network traffic and load on servers can be reduced, preventing the entire Internet from slowing down.One advantage a Java applet has ove r a scripted program is that it’s in compiled form, so the source code isn’t available to the client. On the other hand, a Java applet can be decompiled without too much trouble, but hiding your code is often not an important issue. Two other factors can be important. As you will see later in this book, a compiled Java applet can comprise many modules and take multiple server “hits” (accesses) to download. (In Java 1.1 and higher this is minimized by Java archives, called JAR files, that allow all the required modules to be packaged together and compressed for a single download.) A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits). This could be important to the responsiveness of your Web site. Another factor is the all-important learning curve. Regardless of what you’ve heard, Java is not a trivial language to learn. If you’re a Visual Basic programmer, moving to VBScript will be your fastest solution, and since it will probably solve most typical client/server problems you might be hard pressed to justify learning Java. If you’re experienced with a scripting language you will certainly benefit from looking at JavaScript or VBScript before committing to Java, since they might fit your needs handily and you’ll be more productive sooner.to run its applets withi5.ActiveXTo some degree, the competitor to Java is Microsoft’s ActiveX, although it takes a completely different approach. ActiveX was originally a Windows-only solution, although it is now being developed via an independent consortium to become cross-platform. Effectively, ActiveX says “if your program connects to its environment just so, it can be dropped into a Web page and run under a browser that supports ActiveX.” (I E directly supports ActiveX and Netscape does so using a plug-in.) Thus, ActiveX does not constrain you to a particular language. If, for example, you’re already an experienced Windows programmer using a language such as C++, Visual Basic, or Borland’s Del phi, you can create ActiveX components with almost no changes to your programming knowledge. ActiveX also provides a path for the use of legacy code in your Web pages.6.SecurityAutomatically downloading and running programs across the Internet can sound like a virus-builder’s dream. ActiveX especially brings up the thorny issue of security in client-side programming. If you click on a Web site, you might automatically download any number of things along with the HTML page: GIF files, script code, compiled Java code, and ActiveX components. Some of these are benign; GIF files can’t do any harm, and scripting languages are generally limited in what they can do. Java was also designed to run its applets within a “sandbox” of safety, which prevents it from wri ting to disk or accessing memory outside the sandbox.ActiveX is at the opposite end of the spectrum. Programming with ActiveX is like programming Windows—you can do anything you want. So if you click on a page that downloads an ActiveX component, that component might cause damage to the files on your disk. Of course, programs that you load onto your computer that are not restricted to running inside a Web browser can do the same thing. Viruses downloaded from Bulletin-Board Systems (BBSs) have long been a problem, but the speed of the Internet amplifies the difficulty.The solution seems to be “digital signatures,” whereby code is verified to show who the author is. This is based on the idea that a virus works because its creator can be anonymous, so if you remove the anonymity individuals will be forced to be responsible for their actions. This seems like a good plan because it allows programs to be much more functional, and I suspect it will eliminate malicious mischief. If, however, a program has an unintentional destructive bug it will still cause problems.The Java approach is to prevent these problems from occurring, via the sandbox. The Java interpreter that lives on your local Web browser examines the applet for any untoward instructions as the applet is being loaded. In particular, the applet cannot write files to disk or erase files (one of the mainstays of viruses). Applets are generally considered to be safe, and since this is essential for reliable client/server systems, any bugs in the Java language that allow viruses are rapidly repaired. (It’s worth noting that the browser software actually enforces these security restrictions, and some browsers allow you to select different security levels to provide varying degrees of access to your system.) You might be skeptical of this rather draconian restriction against writing files to your local disk. For example, you may want to build a local database or save data for later use offline. The initial vision seemed to be that eventually everyone would get online to do anything important, but that was soon seen to be impractical (although low-cost “Internet appliances” might someday satisfy the needs of a significant segment of users). The solution is the “signed applet” that uses public-key encryption to verify that an applet does indeed come from where it claims it does. A signed applet can still trash your disk, but the theory is that since you can now hold the applet creator accountable they won’t do vicious things. Java provides a framework for digital signatures so that you will eventually be able to allow an applet to step outside the sandbox if necessary. Digital signatures have missed an important issue, which is the speed that people move around on the Internet. If you download a buggy program and it does something untoward, how long will it be before you discover the damage? It could be days or even weeks. By then, how will you track down the program that’s done it? And what good will it do you at that point?7.Internet vs. intranetThe Web is the most general solution to the client/server problem, so it makes sense that you can use the same technology to solve a subset of the problem, in particular the classic client/server problem within a company. With traditional client/server approaches you have the problem of multiple types of client computers, as well as the difficulty of installing new client software, both of which are handily solved with Web browsers and client-side programming. When Web technology is used for an information network that is restricted to a particular company, it is referred to as an intranet. Intranets provide much greater security than the Internet, since you can physically control access to the servers within your company. In terms of training, it seems that once people und erstand the general concept of a browser it’s much easier for them to deal with differences in the way pages and applets look, so the learning curve for new kinds of systems seems to be reduced.The security problem brings us to one of the divisions that seems to be automatically forming in the world of client-side programming. If your program is running on the Internet, you don’t know what platform it will be working under, and you want to be extra careful that you don’t disseminate buggy code. You need something cross-platform and secure, like a scripting language or Java.If you’re running on an intranet, you might have a different set of constraints. It’s not uncommon that your machines could all be Intel/Windows platforms. On an intranet, you’re respon sible for the quality of your own code and can repair bugs when they’re discovered. In addition, you might already have a body of legacy code that you’ve been using in a more traditional client/server approach, whereby you must physically install client programs every time you do an upgrade. The time wasted in installing upgrades is the most compelling reason to move to browsers, because upgrades are invisible and automatic. If you are involved in such an intranet, the most sensible approach to take is the shortest path that allows you to use your existing code base, rather than trying to recode your programs in a new language.When faced with this bewildering array of solutions to the client-side programming problem, the best plan of attack is a cost-benefit analysis. Consider the constraints of your problem and what would be the shortest path to your solution. Since client-side programming is still programming, it’s always a good idea to take the fastest development approach for your particular situation. This is an aggressive stance to prepare for inevitable encounters with the problems of program development.8.Server-side programmingThis whole discussion has ignored the issue of server-side programming. What happens when you make a request of a server? Most of the time the request is simply “send me this file.” Your browser then interprets the file in some appropriate fashion: as an HTML page, a graphic image, a Java applet, a script program, etc. A more complicated request to a server generally involves a database transaction. A common scenario involves a request for a complex database search, which the server then formats into an HTML page and sends to you as the result. (Of course, if the client has more intelligence via Java or a scripting language, the raw data can be sent and formatted at the client end, which will be faster and less load on the server.) Or you might want to register your name in a database when you join a group or place an order, which will involve changes to that database. These database requests must be processed via some code on the server side, which is generally referred to as server-side programming. Traditionally, server-side programming has been performed using Perl and CGI scripts, but more sophisticated systems have been appearing. These include Java-based Web servers that allow you to perform all your server-side programming in Java by writing what are called servlets. Servlets and their offspring, JSPs, are two of the most compelling reasons that companies who develop Web sites are moving to Java, especially because they eliminate the problems of dealing with differently abled browsers.9. separate arena: applicationsMuch of the brouhaha over Java has been over applets. Java is actually a general-purpose programming language that can solve any type of problem—at least in theory. And as pointed out previously, there might be more effective ways to solve most client/server problems. When you move out of the applet arena (and simultaneously release the restrictions, such as the one against writing to disk) you enter the world of general-purpose applications that run standalone, without a Web browser, just like any ordinary program does. Here, Java’s strength is not only in its portability, but also its programmability. As you’l l see throughout this book, Java has many features that allow you to create robust programs in a shorter period than with previous programming languages. Be aware that this is a mixed blessing. You pay for the improvements through slower execution speed (although there is significant work going on in this area—JDK 1.3, in particular, introduces the so-called “hotspot” performance improvements). Like any language, Java has built-in limitations that might make it inappropriate to solve certain types of programming problems. Java is a rapidly evolving language, however, and as each new release comes out it becomes more and more attractive for solving larger sets of problems.Java和因特网既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不是很明显。

计算机java外文翻译外文文献英文文献

计算机java外文翻译外文文献英文文献

英文原文:Title: Business Applications of Java. Author: Erbschloe, Michael, Business Applications of Java -- Research Starters Business, 2008DataBase: Research Starters - BusinessBusiness Applications of JavaThis article examines the growing use of Java technology in business applications. The history of Java is briefly reviewed along with the impact of open standards on the growth of the World Wide Web. Key components and concepts of the Java programming language are explained including the Java Virtual Machine. Examples of how Java is being used bye-commerce leaders is provided along with an explanation of how Java is used to develop data warehousing, data mining, and industrial automation applications. The concept of metadata modeling and the use of Extendable Markup Language (XML) are also explained.Keywords Application Programming Interfaces (API's); Enterprise JavaBeans (EJB); Extendable Markup Language (XML); HyperText Markup Language (HTML); HyperText Transfer Protocol (HTTP); Java Authentication and Authorization Service (JAAS); Java Cryptography Architecture (JCA); Java Cryptography Extension (JCE); Java Programming Language; Java Virtual Machine (JVM); Java2 Platform, Enterprise Edition (J2EE); Metadata Business Information Systems > Business Applications of JavaOverviewOpen standards have driven the e-business revolution. Networking protocol standards, such as Transmission Control Protocol/Internet Protocol (TCP/IP), HyperText Transfer Protocol (HTTP), and the HyperText Markup Language (HTML) Web standards have enabled universal communication via the Internet and the World Wide Web. As e-business continues to develop, various computing technologies help to drive its evolution.The Java programming language and platform have emerged as major technologies for performing e-business functions. Java programming standards have enabled portability of applications and the reuse of application components across computing platforms. Sun Microsystems' Java Community Process continues to be a strong base for the growth of the Java infrastructure and language standards. This growth of open standards creates new opportunities for designers and developers of applications and services (Smith, 2001).Creation of Java TechnologyJava technology was created as a computer programming tool in a small, secret effort called "the Green Project" at Sun Microsystems in 1991. The Green Team, fully staffed at 13 people and led by James Gosling, locked themselves away in an anonymous office on Sand Hill Road in Menlo Park, cut off from all regular communications with Sun, and worked around the clock for18 months. Their initial conclusion was that at least one significant trend would be the convergence of digitally controlled consumer devices and computers. A device-independent programming language code-named "Oak" was the result.To demonstrate how this new language could power the future of digital devices, the Green Team developed an interactive, handheld home-entertainment device controller targeted at the digital cable television industry. But the idea was too far ahead of its time, and the digital cable television industry wasn't ready for the leap forward that Java technology offered them. As it turns out, the Internet was ready for Java technology, and just in time for its initial public introduction in 1995, the team was able to announce that the Netscape Navigator Internet browser would incorporate Java technology ("Learn about Java," 2007).Applications of JavaJava uses many familiar programming concepts and constructs and allows portability by providing a common interface through an external Java Virtual Machine (JVM). A virtual machine is a self-contained operating environment, created by a software layer that behaves as if it were a separate computer. Benefits of creating virtual machines include better exploitation of powerful computing resources and isolation of applications to prevent cross-corruption and improve security (Matlis, 2006).The JVM allows computing devices with limited processors or memory to handle more advanced applications by calling up software instructions inside the JVM to perform most of the work. This also reduces the size and complexity of Java applications because many of the core functions and processing instructions were built into the JVM. As a result, software developersno longer need to re-create the same application for every operating system. Java also provides security by instructing the application to interact with the virtual machine, which served as a barrier between applications and the core system, effectively protecting systems from malicious code.Among other things, Java is tailor-made for the growing Internet because it makes it easy to develop new, dynamic applications that could make the most of the Internet's power and capabilities. Java is now an open standard, meaning that no single entity controls its development and the tools for writing programs in the language are available to everyone. The power of open standards like Java is the ability to break down barriers and speed up progress.Today, you can find Java technology in networks and devices that range from the Internet and scientific supercomputers to laptops and cell phones, from Wall Street market simulators to home game players and credit cards. There are over 3 million Java developers and now there are several versions of the code. Most large corporations have in-house Java developers. In addition, the majority of key software vendors use Java in their commercial applications (Lazaridis, 2003).ApplicationsJava on the World Wide WebJava has found a place on some of the most popular websites in the world and the uses of Java continues to grow. Java applications not only provide unique user interfaces, they also help to power the backend of websites. Two e-commerce giants that everybody is probably familiar with (eBay and Amazon) have been Java pioneers on the World Wide Web.eBayFounded in 1995, eBay enables e-commerce on a local, national and international basis with an array of Web sites-including the eBay marketplaces, PayPal, Skype, and -that bring together millions of buyers and sellers every day. You can find it on eBay, even if you didn't know it existed. On a typical day, more than 100 million items are listed on eBay in tens of thousands of categories. Recent listings have included a tunnel boring machine from the Chunnel project, a cup of water that once belonged to Elvis, and the Volkswagen that Pope Benedict XVI owned before he moved up to the Popemobile. More than one hundred million items are available at any given time, from the massive to the miniature, the magical to the mundane, on eBay; the world's largest online marketplace.eBay uses Java almost everywhere. To address some security issues, eBay chose Sun Microsystems' Java System Identity Manager as the platform for revamping its identity management system. The task at hand was to provide identity management for more than 12,000 eBay employees and contractors.Now more than a thousand eBay software developers work daily with Java applications. Java's inherent portability allows eBay to move to new hardware to take advantage of new technology, packaging, or pricing, without having to rewrite Java code ("eBay drives explosive growth," 2007).Amazon (a large seller of books, CDs, and other products) has created a Web Service application that enables users to browse their product catalog and place orders. uses a Java application that searches the Amazon catalog for books whose subject matches a user-selected topic. The application displays ten books that match the chosen topic, and shows the author name, book title, list price, Amazon discount price, and the cover icon. The user may optionally view one review per displayed title and make a buying decision (Stearns & Garishakurthi, 2003).Java in Data Warehousing & MiningAlthough many companies currently benefit from data warehousing to support corporate decision making, new business intelligence approaches continue to emerge that can be powered by Java technology. Applications such as data warehousing, data mining, Enterprise Information Portals (EIP's), and Knowledge Management Systems (which can all comprise a businessintelligence application) are able to provide insight into customer retention, purchasing patterns, and even future buying behavior.These applications can not only tell what has happened but why and what may happen given certain business conditions; allowing for "what if" scenarios to be explored. As a result of this information growth, people at all levels inside the enterprise, as well as suppliers, customers, and others in the value chain, are clamoring for subsets of the vast stores of information such as billing, shipping, and inventory information, to help them make business decisions. While collecting and storing vast amounts of data is one thing, utilizing and deploying that data throughout the organization is another.The technical challenges inherent in integrating disparate data formats, platforms, and applications are significant. However, emerging standards such as the Application Programming Interfaces (API's) that comprise the Java platform, as well as Extendable Markup Language (XML) technologies can facilitate the interchange of data and the development of next generation data warehousing and business intelligence applications. While Java technology has been used extensively for client side access and to presentation layer challenges, it is rapidly emerging as a significant tool for developing scaleable server side programs. The Java2 Platform, Enterprise Edition (J2EE) provides the object, transaction, and security support for building such systems.Metadata IssuesOne of the key issues that business intelligence developers must solve is that of incompatible metadata formats. Metadata can be defined as information about data or simply "data about data." In practice, metadata is what most tools, databases, applications, and other information processes use to define, relate, and manipulate data objects within their own environments. It defines the structure and meaning of data objects managed by an application so that the application knows how to process requests or jobs involving those data objects. Developers can use this schema to create views for users. Also, users can browse the schema to better understand the structure and function of the database tables before launching a query.To address the metadata issue, a group of companies (including Unisys, Oracle, IBM, SAS Institute, Hyperion, Inline Software and Sun) have joined to develop the Java Metadata Interface (JMI) API. The JMI API permits the access and manipulation of metadata in Java with standard metadata services. JMI is based on the Meta Object Facility (MOF) specification from the Object Management Group (OMG). The MOF provides a model and a set of interfaces for the creation, storage, access, and interchange of metadata and metamodels (higher-level abstractions of metadata). Metamodel and metadata interchange is done via XML and uses the XML Metadata Interchange (XMI) specification, also from the OMG. JMI leverages Java technology to create an end-to-end data warehousing and business intelligence solutions framework.Enterprise JavaBeansA key tool provided by J2EE is Enterprise JavaBeans (EJB), an architecture for the development of component-based distributed business applications. Applications written using the EJB architecture are scalable, transactional, secure, and multi-user aware. These applications may be written once and then deployed on any server platform that supports J2EE. The EJB architecture makes it easy for developers to write components, since they do not need to understand or deal with complex, system-level details such as thread management, resource pooling, and transaction and security management. This allows for role-based development where component assemblers, platform providers and application assemblers can focus on their area of responsibility further simplifying application development.EJB's in the Travel IndustryA case study from the travel industry helps to illustrate how such applications could function. A travel company amasses a great deal of information about its operations in various applications distributed throughout multiple departments. Flight, hotel, and automobile reservation information is located in a database being accessed by travel agents worldwide. Another application contains information that must be updated with credit and billing historyfrom a financial services company. Data is periodically extracted from the travel reservation system databases to spreadsheets for use in future sales and marketing analysis.Utilizing J2EE, the company could consolidate application development within an EJB container, which can run on a variety of hardware and software platforms allowing existing databases and applications to coexist with newly developed ones. EJBs can be developed to model various data sets important to the travel reservation business including information about customer, hotel, car rental agency, and other attributes.Data Storage & AccessData stored in existing applications can be accessed with specialized connectors. Integration and interoperability of these data sources is further enabled by the metadata repository that contains metamodels of the data contained in the sources, which then can be accessed and interchanged uniformly via the JMI API. These metamodels capture the essential structure and semantics of business components, allowing them to be accessed and queried via the JMI API or to be interchanged via XML. Through all of these processes, the J2EE infrastructure ensures the security and integrity of the data through transaction management and propagation and the underlying security architecture.To consolidate historical information for analysis of sales and marketing trends, a data warehouse is often the best solution. In this example, data can be extracted from the operational systems with a variety of Extract, Transform and Load tools (ETL). The metamodels allow EJBsdesigned for filtering, transformation, and consolidation of data to operate uniformly on datafrom diverse data sources as the bean is able to query the metamodel to identify and extract the pertinent fields. Queries and reports can be run against the data warehouse that contains information from numerous sources in a consistent, enterprise-wide fashion through the use of the JMI API (Mosher & Oh, 2007).Java in Industrial SettingsMany people know Java only as a tool on the World Wide Web that enables sites to perform some of their fancier functions such as interactivity and animation. However, the actual uses for Java are much more widespread. Since Java is an object-oriented language like C++, the time needed for application development is minimal. Java also encourages good software engineering practices with clear separation of interfaces and implementations as well as easy exception handling.In addition, Java's automatic memory management and lack of pointers remove some leading causes of programming errors. Most importantly, application developers do not need to create different versions of the software for different platforms. The advantages available through Java have even found their way into hardware. The emerging new Java devices are streamlined systems that exploit network servers for much of their processing power, storage, content, and administration.Benefits of JavaThe benefits of Java translate across many industries, and some are specific to the control and automation environment. For example, many plant-floor applications use relatively simple equipment; upgrading to PCs would be expensive and undesirable. Java's ability to run on any platform enables the organization to make use of the existing equipment while enhancing the application.IntegrationWith few exceptions, applications running on the factory floor were never intended to exchange information with systems in the executive office, but managers have recently discovered the need for that type of information. Before Java, that often meant bringing together data from systems written on different platforms in different languages at different times. Integration was usually done on a piecemeal basis, resulting in a system that, once it worked, was unique to the two applications it was tying together. Additional integration required developing a brand new system from scratch, raising the cost of integration.Java makes system integration relatively easy. Foxboro Controls Inc., for example, used Java to make its dynamic-performance-monitor software package Internet-ready. This software provides senior executives with strategic information about a plant's operation. The dynamic performance monitor takes data from instruments throughout the plant and performs variousmathematical and statistical calculations on them, resulting in information (usually financial) that a manager can more readily absorb and use.ScalabilityAnother benefit of Java in the industrial environment is its scalability. In a plant, embedded applications such as automated data collection and machine diagnostics provide critical data regarding production-line readiness or operation efficiency. These data form a critical ingredient for applications that examine the health of a production line or run. Users of these devices can take advantage of the benefits of Java without changing or upgrading hardware. For example, operations and maintenance personnel could carry a handheld, wireless, embedded-Java device anywhere in the plant to monitor production status or problems.Even when internal compatibility is not an issue, companies often face difficulties when suppliers with whom they share information have incompatible systems. This becomes more of a problem as supply-chain management takes on a more critical role which requires manufacturers to interact more with offshore suppliers and clients. The greatest efficiency comes when all systems can communicate with each other and share information seamlessly. Since Java is so ubiquitous, it often solves these problems (Paula, 1997).Dynamic Web Page DevelopmentJava has been used by both large and small organizations for a wide variety of applications beyond consumer oriented websites. Sandia, a multiprogram laboratory of the U.S. Department of Energy's National Nuclear Security Administration, has developed a unique Java application. The lab was tasked with developing an enterprise-wide inventory tracking and equipment maintenance system that provides dynamic Web pages. The developers selected Java Studio Enterprise 7 for the project because of its Application Framework technology and Web Graphical User Interface (GUI) components, which allow the system to be indexed by an expandable catalog. The flexibility, scalability, and portability of Java helped to reduce development timeand costs (Garcia, 2004)IssueJava Security for E-Business ApplicationsTo support the expansion of their computing boundaries, businesses have deployed Web application servers (WAS). A WAS differs from a traditional Web server because it provides a more flexible foundation for dynamic transactions and objects, partly through the exploitation of Java technology. Traditional Web servers remain constrained to servicing standard HTTP requests, returning the contents of static HTML pages and images or the output from executed Common Gateway Interface (CGI ) scripts.An administrator can configure a WAS with policies based on security specifications for Java servlets and manage authentication and authorization with Java Authentication andAuthorization Service (JAAS) modules. An authentication and authorization service can bewritten in Java code or interface to an existing authentication or authorization infrastructure. Fora cryptography-based security infrastructure, the security server may exploit the Java Cryptography Architecture (JCA) and Java Cryptography Extension (JCE). To present the user with a usable interaction with the WAS environment, the Web server can readily employ a formof "single sign-on" to avoid redundant authentication requests. A single sign-on preserves user authentication across multiple HTTP requests so that the user is not prompted many times for authentication data (i.e., user ID and password).Based on the security policies, JAAS can be employed to handle the authentication process with the identity of the Java client. After successful authentication, the WAS securitycollaborator consults with the security server. The WAS environment authentication requirements can be fairly complex. In a given deployment environment, all applications or solutions may not originate from the same vendor. In addition, these applications may be running on different operating systems. Although Java is often the language of choice for portability between platforms, it needs to marry its security features with those of the containing environment.Authentication & AuthorizationAuthentication and authorization are key elements in any secure information handling system. Since the inception of Java technology, much of the authentication and authorization issues have been with respect to downloadable code running in Web browsers. In many ways, this had been the correct set of issues to address, since the client's system needs to be protected from mobile code obtained from arbitrary sites on the Internet. As Java technology moved from a client-centric Web technology to a server-side scripting and integration technology, it required additional authentication and authorization technologies.The kind of proof required for authentication may depend on the security requirements of a particular computing resource or specific enterprise security policies. To provide such flexibility, the JAAS authentication framework is based on the concept of configurable authenticators. This architecture allows system administrators to configure, or plug in, the appropriate authenticatorsto meet the security requirements of the deployed application. The JAAS architecture also allows applications to remain independent from underlying authentication mechanisms. So, as new authenticators become available or as current authentication services are updated, system administrators can easily replace authenticators without having to modify or recompile existing applications.At the end of a successful authentication, a request is associated with a user in the WAS user registry. After a successful authentication, the WAS consults security policies to determine if the user has the required permissions to complete the requested action on the servlet. This policy canbe enforced using the WAS configuration (declarative security) or by the servlet itself (programmatic security), or a combination of both.The WAS environment pulls together many different technologies to service the enterprise. Because of the heterogeneous nature of the client and server entities, Java technology is a good choice for both administrators and developers. However, to service the diverse security needs of these entities and their tasks, many Java security technologies must be used, not only at a primary level between client and server entities, but also at a secondary level, from served objects. By using a synergistic mix of the various Java security technologies, administrators and developers can make not only their Web application servers secure, but their WAS environments secure as well (Koved, 2001).ConclusionOpen standards have driven the e-business revolution. As e-business continues to develop, various computing technologies help to drive its evolution. The Java programming language and platform have emerged as major technologies for performing e-business functions. Java programming standards have enabled portability of applications and the reuse of application components. Java uses many familiar concepts and constructs and allows portability by providing a common interface through an external Java Virtual Machine (JVM). Today, you can find Java technology in networks and devices that range from the Internet and scientific supercomputers to laptops and cell phones, from Wall Street market simulators to home game players and credit cards.Java has found a place on some of the most popular websites in the world. Java applications not only provide unique user interfaces, they also help to power the backend of websites. While Java technology has been used extensively for client side access and in the presentation layer, it is also emerging as a significant tool for developing scaleable server side programs.Since Java is an object-oriented language like C++, the time needed for application development is minimal. Java also encourages good software engineering practices with clear separation of interfaces and implementations as well as easy exception handling. Java's automatic memory management and lack of pointers remove some leading causes of programming errors. The advantages available through Java have also found their way into hardware. The emerging new Java devices are streamlined systems that exploit network servers for much of their processing power, storage, content, and administration.中文翻译:标题:Java的商业应用。

java基础功能介绍外文翻译

java基础功能介绍外文翻译

外文原文Java FundamentalsThe rise of the Internet and the World Wide Web have fundamentally reshaped computing.Only a few short years ago, the cyber landscape was dominated by stand-alone PCs. Today,nearly all PCs are connected to the Internet. The Internet, itself,was transformed—originally offering a convenient way to share files and information, today it is a vast, distributed computing universe. These changes have been as rapid as they have been profound, and in their wake, they gave rise to a new way to program:Java. Java is the preeminent language of the Internet, but it is more than that. Java has revolutionized programming,changing the way that we think about both the form and the function of a program. To be a professional programmer today implies the ability to program in Java—it has become that important. In the course of this book, you will learn the skills needed to master it. The purpose of this module is to introduce you to Java, including its history, its design philosophy, and several of its most important features. By far, the hardest thing about learning a programming language is the fact that no element exists in isolation. Instead, the components of the language work in conjunction with each other. This interrelatedness is especially pronounced in Java. In fact,it is difficult to discuss one aspect of Java without involving others. To help overcome this problem,this module provides a brief overview of several Java features, including the general form of a Java program, some basic control structures, and operators. It does not go into too many details but, rather, concentrates on the general concepts common to any Java program.1.1 The Origins of JavaComputer language innovation is driven forward by two factors: improvements in the art of programming and changes in the computing environment.Java is no exception. Building upon the rich legacy inherited from C and C++,Java adds refinements and features that reflect the current state of the art in programming.Responding to the rise of the online environment,Java offers features that streamline programming for a highly distributed architecture.Java was conceived by James Gosling, Patrick Naughton,Chris Warth,Ed Frank, and Mike Sheridan at Sun Microsystems in 1991. This language was initially called “Oak”but was renamed“Java”in 1995. Somewhat surprisingly, the original impetus for Java was not the Internet! Instead, the primary motivation was the need for a platform-independent language that could be used to create software to be embedded in various consumerelectronic devices, such as toasters, microwave ovens, and remote controls. As you can probably guess, many different types of CPUs are used as controllers. The trouble was that most computer languages are designed to be compiled for a specific target. For example, consider C++.Although it is possible to compile a C++ program for just about any type of CPU, to do so requires a full C++compiler targeted for that CPU. The problem, however,is that compilers are expensive and time-consuming to create. In an attempt to find a better solution, Gosling Java Fundamentals and others worked on a portable, cross-platform language that could produce code that would run on a variety of CPUs under differing environments.This effort ultimately led to the creation of Java.About the time that the details of Java were being worked out, a second, and ultimately more important, factor emerged that would play a crucial role in the future of Java. This second force was, of course, the World Wide Web. Had the Web not taken shape at about the same time that Java was being implemented, Java might have remained a useful but obscure language for programming consumer electronics. However,with the emergence of the Web, Java was propelled to the forefront of computer language design, because the Web, too, demanded portable programs.Most programmers learn early in their careers that portable programs are as elusive as they are desirable. While the quest for a way to create efficient, portable (platform-independent)programs is nearly as old as the discipline of programming itself, it had taken a back seat to other, more pressing problems.However,with the advent of the Internet and the Web, the old problem of portability returned with a vengeance. After all, the Internet consists of a diverse, distributed universe populated with many types of computers, operating systems, and CPUs.What was once an irritating but a low-priority problem had become a high-profile necessity.By 1993 it became obvious to members of the Java design team that the problems of portability frequently encountered when creating code for embedded controllers are also found when attempting to create code for the Internet. This realization caused the focus of Java to switch from consumer electronics to Internet programming.So, while it was the desire for an architecture-neutral programming language that provided the initial spark, it was the Internet that ultimately led to Java’s large-scale success.How Java Relates to C and C++Java is directly related to both C and C++. Java inherits its syntax from C. Its object model is adapted from C++.Java’s relationship with C and C++ is important for several reasons. First, many programmers are familiar with the C/C++ syntax. This makes it easy fora C/C++programmer to learn Java and,conversely,for a Java programmer to learn C/C++.Second, Java’s designers did not “reinvent the wheel.”Instead, they further refined an already highly successful programming paradigm.The modern age of programming began with C. It moved to C++, and now to Java. By inheriting and building upon that rich heritage, Java provides a powerful, logically consistent programming environment that takes the best of the past and adds new features required by the online environment. Perhaps most important, because of their similarities, C, C++, and Java define a common,conceptual framework for the professional programmer.Programmers do not face major rifts when switching from one language to another.One of the central design philosophies of both C and C++ is that the programmer is in charge!Java also inherits this philosophy.Except for those constraints imposed by the Internet environment, Java gives you, the programmer, full control. If you program well, your programs reflect it. If you program poorly, your programs reflect that,too. Put differently, Java is not a language with training wheels.It is a language for professional programmers.Java has one other attribute in common with C and C++: it was designed,tested, and refined by real, working programmers. It is a language grounded in the needs and experiences of the people who devised it. There is no better way to produce a top-flight professional programming language.Because of the similarities between Java and C++, especially their support for objectoriented programming, it is tempting to think of Java as simply the “Internet version of C++.”However, to do so would be a mistake. Java has significant practical and philosophical differences. Although Java was influenced by C++, it is not an enhanced version of C++. For example,it is neither upwardly nor downwardly compatible with C++.Of course, the similarities with C++ are significant, and if you are a C++ programmer, you will feel right at home with Java. Another point: Java was not designed to replace C++. Java was designed to solve a certain set of problems.C++ was designed to solve a different set of problems. Both will coexist for many years to come.How Java Relates to C#Recently a new language called C# has come on the scene. Created by Microsoft to support its .NET Framework, C# is closely reated to Java. In fact, many of C#’s features were directly adapted from Java. Both Java and C# share the same general C++-style syntax, support distributed programming,and utilize the same object model.There are, of course, differences between Java and C#, but the overall “look and feel”of these languages is very similar. This means that if you already know C#, then learning Java will be especially easy. Conversely, if C# is in your future, then your knowledge of Java will come in handy. Giventhe similarity between Java and C#, one might naturally ask, “Will C# replace Java?”The answer is No. Java and C# are optimized for two different types of computing environments. Just as C++ and Java will co-exist for a long time to come, so will C#and Java.1.2 Java’s Contribution to the InternetThe Internet helped catapult Java to the forefront of programming, and Java, in turn, has had a profound effect on the Internet. The reason for this is quite simple: Java expands the universe of objects that can move about freely in cyberspace. In a network, there are two very broad categories of objects that are transmitted between the server and your personal computer:passive information and dynamic,active programs.For example,when you read your e-mail, you are viewing passive data. Even when you download a program, the program’s code is still only passive data until you execute it. However,a second type of object can be transmitted to your computer: a dynamic,self-executing program. Such a program is an active agent on the client computer,yet it is initiated by the server.For example, a program might be provided by the server to properly display the data that it is sending.As desirable as dynamic, networked programs are, they also present serious problems in the areas of security and portability. Prior to Java, cyberspace was effectively closed to half of the entities that now live there. As you will see, Java addresses those concerns and, in doing so, has defined a new form of program: the applet.Java Applets and ApplicationsJava can be used to create two types of programs:applications and applets. An application is a program that runs on your computer,under the operating system of that computer. An application created by Java is more or less like one created using any other type of computer language, such as Visual Basic or C++. When used to create applications, Java is not much different from any other computer language.Rather, it is Java’s ability to create applets that makes it important. An applet is an application designed to be transmitted over the Internet and executed by a Java-compatible Web browser. Although any computer language can be used to create an application, only Java can be used to create an applet. The reason is that Java solves two of the thorniest problems associated with applets: security and portability.Before continuing,let’s define what these two terms mean relative to the Internet.SecurityAs you are almost certainly aware, every time you download a “normal”program,you are risking a viral infection. Prior to Java, most users did not download executable programs frequently, and those that did, scanned them for viruses prior to execution. Even so, most users still worried about the possibility of infecting their systems with a virus or allowing a malicious program to run wild in their systems. (A malicious program might gather privateinformation, such as credit card numbers, bank account balances, and passwords by searching the contents of your computer’s local file system.) Java answers these concerns by providing a firewall between a networked application and your computer.When using a Java-compatible web browser, it is possible to safely download Java applets without fear of viral infection. The way that Java achieves this is by confining a Java program to the Java execution environment and not allowing it access to other parts of the computer. (You will see how this is accomplished, shortly.) Frankly, the ability to download applets with confidence that no harm will be done to the client computer is the single most important aspect of Java.PortabilityAs discussed earlier,many types of computers and operating systems are connected to the Internet. For programs to be dynamically downloaded to all of the various types of platforms, some means of generating portable executable code is needed.As you will soon see, the same mechanism that helps ensure security also helps create portability. Indeed, Java’s solution to these two problems is both elegant and efficient.外文翻译JAVA的基础互联网和万维网的崛起已经从根本上重塑了计算。

Java技术介绍-毕业论文外文翻译

Java技术介绍-毕业论文外文翻译

Java Technical DescriptionJava as a Programming Platform.Java is certainly a good programming language. There is no doubt that it is one of the better languages available to serious programmers. We think it could potentially have been a great programming language, but it is probably too late for that. Once a language is out in the field, the ugly reality of compatibility with existing code sets in."Java was never just a language. There are lots of programming languages out there, and few of them make much of a splash. Java is a whole platform, with a huge library, containing lots of reusable code, and an execution environment that provides services such as security, portability across operating systems, and automatic garbage collection.As a programmer, you will want a language with a pleasant syntax and comprehensible semantics (i.e., not C++). Java fits the bill, as do dozens of other fine languages. Some languages give you portability, garbage collection, and the like, but they don't have much of a library, forcing you to roll your own if you want fancy graphics or networking or database access. Well, Java has everything—a good language, a high-quality execution environment, and a vast library. That combination is what makes Java an irresistible proposition to so many programmers.Features of Java.1.SimpleWe wanted to build a system that could be programmed easily without a lot of esoteric training and which leveraged today's standard practice. So even though we found that C++ was unsuitable, we designed Java as closely to C++ as possible in order to make the system more comprehensible. Java omits many rarely used, poorly understood, confusing features of C++ that, in our experience, bring more grief than benefit.The syntax for Java is, indeed, a cleaned-up version of the syntax for C++. There is no need for header files, pointer arithmetic (or even a pointer syntax), structures, unions, operator overloading, virtual base classes, and so on. (See the C++ notes interspersed throughout the text for more on the differences between Java and C++.) The designers did not, however, attempt to fix all of the clumsy features of C++. For example, the syntax of the switch statement is unchanged in Java. If you know C++, you will find the transition to the Java syntax easy.If you are used to a visual programming environment (such as Visual Basic), you will not find Java simple. There is much strange syntax (though it does not take long to get the hang of it). More important, you must do a lot more programming in Java. The beauty of Visual Basic is that its visual design environment almost automatically provides a lot of the infrastructure for an application. The equivalent functionality must be programmed manually, usually with a fair bit of code, in Java. There are, however, third-party development environments that provide "drag-and-drop"-style program development.Another aspect of being simple is being small. One of the goals of Java is to enable the construction of software that can run stand-alone in small machines. The size of the basic interpreter and class support is about 40K bytes; adding the basic standard libraries and thread support (essentially a self-contained microkernel) adds an additional 175K.2. Object OrientedSimply stated, object-oriented design is a technique for programming that focuses on the data (= objects) and on the interfaces to that object. To make an analogy with carpentry, an "object-oriented" carpenter would be mostly concerned with the chair he was building, and secondarily with the tools used to make it; a "non-object-oriented" carpenter would think primarily of his tools. The object-oriented facilities of Java are essentially those of C++.Object orientation has proven its worth in the last 30 years, and it is inconceivable that a modern programming language would not use it. Indeed, the object-oriented features of Java are comparable to those of C++. The major differencebetween Java and C++ lies in multiple inheritance, which Java has replaced with the simpler concept of interfaces, and in the Java metaclass model. The reflection mechanism and object serialization feature make it much easier to implement persistent objects and GUI builders that can integrate off-the-shelf components.3. DistributedJava has an extensive library of routines for coping with TCP/IP protocols like HTTP and FTP. Java applications can open and access objects across the Net via URLs with the same ease as when accessing a local file system. We have found the networking capabilities of Java to be both strong and easy to use. Anyone who has tried to do Internet programming using another language will revel in how simple Java makes onerous tasks like opening a socket connection. (We cover networking in Volume 2 of this book.) The remote method invocation mechanism enables communication between distributedobjects (also covered in Volume 2).There is now a separate architecture, the Java 2 Enterprise Edition (J2EE), that supports very large scale distributed applications.4. RobustJava is intended for writing programs that must be reliable in a variety of ways. Java puts a lot of emphasis on early checking for possible problems, later dynamic (run-time) checking, and eliminating situations that are error-prone.… The single biggest difference between Java and C/C++ is that Java has a pointer model that eliminates the possibility of overwriting memory and corrupting data.This feature is also very useful. The Java compiler detects many problems that, in other languages, would show up only at run time. As for the second point, anyone who has spent hours chasing memory corruption caused by a pointer bug will be very happy with this feature of Java.If you are coming from a language like Visual Basic that doesn't explicitly use pointers, you are probably wondering why this is so important. C programmers are not so lucky. They need pointers to access strings, arrays, objects, and even files. In Visual Basic, you do not use pointers for any of these entities, nor do you need to worry about memory allocation for them. On the other hand, many data structures aredifficult to implement in a pointerless language. Java gives you the best of both worlds. You do not need pointers for everyday constructs like strings and arrays. You have the power of pointers if you need it, for example, for linked lists. And you always have complete safety, because you can never access a bad pointer, make memory allocation errors, or have to protect against memory leaking away.5. SecureJava is intended to be used in networked/distributed environments. Toward that end, a lot of emphasis has been placed on security. Java enables the construction of virus-free, tamper-free systems.In the first edition of Core Java we said: "Well, one should 'never say never again,'" and we turned out to be right. Not long after the first version of the Java Development Kit was shipped, a group of security experts at Princeton University found subtle bugs in the security features of Java 1.0. Sun Microsystems has encouraged research into Java security, making publicly available the specification and implementation of the virtual machine and the security libraries. They have fixed all known security bugs quickly. In any case, Java makes it extremely difficult to outwit its security mechanisms. The bugs found so far have been very technical and few in number. From the beginning, Java was designed to make certain kinds of attacks impossible, among them:∙Overrunning the runtime stack—a common attack of worms and viruses Corrupting memory outside its own process space Reading or writing files without permission.∙A number of security features have been added to Java over time. Since version1.1, Java has the notion of digitally signed classesWith a signed class, you can be sure who wrote it. Any time you trust the author of the class, the class can be allowed more privileges on your machine.6. Architecture NeutralThe compiler generates an architecture-neutral object file format—the compiled code is executable on many processors, given the presence of the Java runtime system.The Java compiler does this by generating bytecode instructions which have nothing to do with a particular computerarchitecture. Rather, they are designed to be both easy to interpret on any machine and easily translated into native machine code on the fly.This is not a new idea. More than 20 years ago, both Niklaus Wirth's original implementation of Pascal and the UCSD Pascal system used the same technique. Of course, interpreting bytecodes is necessarily slower than running machine instructions at full speed, so it isn't clear that this is even a good idea. However, virtual machines have the option of translating the most frequently executed bytecode sequences into machine code, a process called just-in-time compilation. This strategy has proven so effective that even Microsoft's .NET platform relies on a virtual machine.The virtual machine has other advantages. It increases security because the virtual machine can check the behavior of instruction sequences. Some programs even produce bytecodes on the fly, dynamically enhancing the capabilities of a running program.7. PortableUnlike C and C++, there are no "implementation-dependent" aspects of the specification. The sizes of the primitive data types are specified, as is the behavior of arithmetic on them.For example, an int in Java is always a 32-bit integer. In C/C++, int can mean a 16-bit integer, a 32-bit integer, or any other size that the compiler vendor likes. The only restriction is that the int type must have at least as many bytes as a short int and cannot have more bytes than a long int. Having a fixed size for number types eliminates a major porting headache. Binary data is stored and transmitted in a fixed format, eliminating confusion about byte ordering. Strings are saved in a standard Unicode format.The libraries that are a part of the system define portable interfaces. For example, there is an abstract Window class and implementations of it for UNIX, Windows, and the Macintosh.As anyone who has ever tried knows, it is an effort of heroic proportions to write a program that looks good on Windows, the Macintosh, and 10 flavors of UNIX. Java1.0 made the heroic effort, delivering a simple toolkit that mapped common user interface elements to a number of platforms.Unfortunately, the result was a library that, with a lot of work, could give barely acceptable results on different systems. (And there were often different bugs on the different platform graphics implementations.) But it was a start. There are many applications in which portability is more important than user interface slickness, and these applications did benefit from early versions of Java. By now, the user interface toolkit has been completely rewritten so that it no longer relies on the host user interface. The result is far more consistent and, we think, more attractive than in earlier versions of Java.8. InterpretedThe Java interpreter can execute Java bytecodes directly on any machine to which the interpreter has been ported. Since linking is a more incremental and lightweight process, the development process can be much more rapid and exploratory.Incremental linking has advantages, but its benefit for the development process is clearly overstated. In any case, we have found Java development tools to be quite slow. If you are used to the speed of the classic Microsoft Visual C++ environment, you will likely be disappointed with the performance of Java development environments. (The current version of Visual Studio isn't as zippy as the classic environments, however. No matter what languageyou program in, you should definitely ask your boss for a faster computer to run the latest development environments. )9. High PerformanceWhile the performance of interpreted bytecodes is usually more than adequate, there are situations where higher performance is required. The bytecodes can be translated on the fly (at run time) into machine code for the particular CPU the application is running on.If you use an interpreter to execute the bytecodes, "high performance" is not the term that we would use. However, on many platforms, there is also another form ofcompilation, the just-in-time (JIT) compilers. These work by compiling the bytecodes into native code once, caching the results, and then calling them again if needed. This approach speeds up commonly used code tremendously because one has to do the interpretation only once. Although still slightly slower than a true native code compiler, a just-in-time compiler can give you a 10- or even 20-fold speedup for some programs and will almost always be significantly faster than an interpreter. This technology is being improved continuously and may eventually yield results that cannot be matched by traditional compilation systems. For example, a just-in-time compiler can monitor which code is executed frequently and optimize just that code for speed.10. MultithreadedThe enefits of multithreading are better interactive responsiveness and real-time behavior.if you have ever tried to do multithreading in another language, you will be pleasantly surprised at how easy it is in Java. Threads in Java also can take advantage of multiprocessor systems if the base operating system does so. On the downside, thread implementations on the major platforms differ widely, and Java makes no effort to be platform independent in this regard. Only the code for calling multithreading remains the same across machines; Java offloads the implementation of multithreading to the underlying operating system or a thread library. Nonetheless, the ease of multithreading is one of the main reasons why Java is such an appealing language for server-side development.11. DynamicIn a number of ways, Java is a more dynamic language than C or C++. It was designed to adapt to an evolving environment. Libraries can freely add new methods and instance variables without any effect on their clients. In Java, finding out run time type information is straightforward.This is an important feature in those situations in which code needs to be added to a running program. A prime example is code that is downloaded from the Internet to run in a browser. In Java 1.0, finding out runtime type information was anything but straightforward, but current versions of Java give the programmer full insight intoboth the structure and behavior of its objects. This is extremely useful for systems that need to analyze objects at run time, such as Java GUI builders, smart debuggers, pluggable components, and object databases.Java技术介绍Java是一种程序设计平台Java是一种优秀的程序设计语言。

Java编程语言基础(外文文献翻译)(可编辑)

Java编程语言基础(外文文献翻译)(可编辑)

JavaTM Programming Language BasicsLike applications, applets are created from classes. However, applets do not have a main method as an entry point, but instead, have several methods to control specific aspects of applet execution.This lesson converts an application from Lesson 2 to an applet and describes the structure and elements of an applet.1、Application to Applet2、Run the Applet3、Applet Structure and Elements4、Packages5、More Information1、Application to AppletThe following code is the applet equivalent to the LessonTwoB application from Lesson 2. The figure below shows how the running applet looks. The structure and elements of the applet code are discussed after the section on how to run the applet just below.import et;import hics;import r;public class SimpleApplet extends AppletString text "I'm a simple applet";public void inittext "I'm a simple applet";setBackground Color.cyan ;public void startSytln "starting..." ;public void stopSytln "stopping..." ;public void destroySytln "preparing to unload..." ;public void paint Graphics gSytln "Paint" ;g.setColor Color.blue ;g.drawRect 0, 0,getSize .width -1,getSize .height -1 ;g.setColor Color.red ;g.drawString text, 15, 25 ;The SimpleApplet class is declared public so the program that runs the applet a browser or appletviewer , which is not local to the program can access it.2、Run the AppletTo see the applet in action, you need an 6>HTML file with the Applet tag as follows:APPLET CODE SimpleApplet.class WIDTH 200 HEIGHT 100The easiest way to run the applet is with appletviewer shown below where simpleApplet.html is a file that contains the above HTML code:appletviewer simpleApplet.htmlNote: To run an applet written with JavaTM 2 APIs in a browser, the browser must be enabled for the Java 2 Platform. If your browser is not enabled for the Java 2 Platform, you have to use appletviewer to run the applet or install Java Plug-in. Java Plug-in lets you run applets on web pages under the 1.2 version of the Java VM instead of the web browser's default Java VM.3、Applet Structure and ElementsThe Java API Applet class provides what you need to design the appearance and manage the behavior of an applet. This class provides a graphical user interface GUI component called a Panel and a number of methods. To create an applet, you extend or subclass the Applet class and implement the appearance and behavior you want.The applet's appearance is created by drawing onto the Panel or by attaching other GUI components such as push buttons, scrollbars, or text areas to the Panel. The applet's behavior is defined by implementing the methods.3.1 Extending a ClassMost classes of any complexity extend other classes. To extend another class means to write a new class that can use the fields and methods defined in the class being extended. The class being extended is the parent class, and the class doing the extending is the child class. Another way to say this is the child class inherits the fields and methods of its parent or chain of parents. Child classes either call or override inherited methods. This is called single inheritance.The SimpleApplet class extends Applet class, which extends the Panel class, which extends the Container class. The Container class extends Object, which is the parent of all Java API classes. The Applet class provides the init, start, stop, destroy, and paint methods you saw in the example applet. The SimpleApplet class overrides these methods to do what the SimpleApplet class needs them to do. The Applet class provides no functionality for these methods.However, the Applet class does provide functionality for the setBackground method,which is called in the init method. The call to setBackground is an example of calling a method inherited from a parent class in contrast to overriding a method inherited from a parent class.You might wonder why the Java language provides methods without implementations. It is to provide conventions for everyone to use for consistency across Java APIs. If everyone wrote their own method to start an applet, for example, but gave it a different name such as begin or go, the applet code would not be interoperable with other programs and browsers, or portable acrossmultiple platforms. For example, Netscape and Internet Explorer know how to look for the init and start methods.3.2 BehaviorAn applet is controlled by the software that runs it. Usually, the underlying software is a browser, but it can also be appletviewer as you saw in the example. The underlying software controls the applet by calling the methods the applet inherits from the Applet class.The init Method: The init method is called when the applet is first created and loaded by the underlying software. This method performs one-time operations the applet needs for its operation such as creating the user interface or setting the font. In the example, the init method initializes the text string and sets the background color.The start Method: The start method is called when the applet is visited such as when the end user goes to a web page with an applet on it. The example prints a string to the console to tell you the applet is starting. In a more complex applet, the start method would do things required at the start of the applet such as begin animation or play sounds.After the start method executes, the event thread calls the paint method to draw to the applet's Panel. A thread is a single sequential flow of control within the applet, and every applet can run in multiple threads. Applet drawing methods are always called from a dedicated drawing and event-handling thread.The stop and destroy Methods: The stop method stops the applet when the applet is no longer on the screen such as when the end user goes to another web page. The example prints a string to the console to tell you the applet is stopping. In a more complex applet, this method should do things like stop animation or sounds.The destroy method is called when the browser exits. Your applet should implement this method to do final cleanup such as stop live threads.3.3 AppearanceThe Panel provided in the Applet class inherits a paint method from its parent Container class. To draw something onto the Applet's Panel, you implement the paint method to do the drawing. The Graphics object passed to the paint method defines a graphics context for drawing on the Panel. The Graphics object has methods for graphical operations such as setting drawing colors, and drawing graphics, images, and text.The paint method for the SimpleApplet draws the I'm a simple applet string in red inside a blue rectangle.public void paint Graphics gSytln "Paint" ;//Set drawing color to blueg.setColor Color.blue ;//Specify the x, y, width and height for a rectangleg.drawRect 0, 0,getSize .width -1,getSize .height -1 ;//Set drawing color to redg.setColor Color.red ;//Draw the text string at the 15, 25 x-y locationg.drawString text, 15, 25 ;4、PackagesThe applet code also has three import statements at the top. Applications of any size and all applets use import statements to access ready-made Java API classes in packages. This is true whether the Java API classes come in the Java platform download, from a third-party, or are classes you write yourself and store in a directory separate from the program. At compile time, a program uses import statements to locate and reference compiled Java API classes stored in packages elsewhere on the local or networked system. A compiled class in one package can have the same name as a compiled class in another package. The package name differentiates the two classes.The examples in Lessons 1 and 2 did not need a package declaration to call the Sytln Java API class because the System class is in the ng package that is included by default. You never need an import ng.* statement to use the compiled classes in that package.5、More InformationYou can find more information on applets in the Writing Applets trail in The Java Tutorial.文献译文Java 编程语言基础像Java Application小应用程序一样,Java Applet小程序也是从类中创建来的。

java介绍外文翻译

java介绍外文翻译

外文原文Introduction to Javaautor:Martin Ngobye、source:Computing Static Slice for Java ProgramsJava is designed to meet the challenges of application development in the context of heterogeneous, network-wide distributed environments、Paramount among these challenges is secure delivery of applications that consume the minimum of system resources, can run on any hardware and software platform, and can be extended dynamically、Java originated as part of a research project to develop advanced software for a wide variety of network devices and embedded systems、The goal was to develop a small, reliable, portable, distributed, real-time operating platform、When the project started, C++ was the language of choice、But over time the difficulties encountered with C++ grew to the point where the problems could best be addressed by creating an entirely new language platform、Design and architecture decisions drew from a variety of languages such as Eiffel, SmallTalk, Objective C, and Cedar/Mesa、The result is a language platform that has proven ideal for developing secure, distributed, network based end-user applications in environments ranging from network-embedded devices to the World-Wide Web and the desktop、The design requirements of Java are driven by the nature of the computing environments in which software must be deployed、The massive growth of the Internet and the World-Wide Web leads us to a completely new way of looking at development and distribution of software、To live in the world of electronic commerce and distribution, Java must enable the development of secure, high performance, and highly robust applications on multiple platforms in heterogeneous, distributed networks、Operating on multiple platforms in heterogeneous networks invalidates the traditional schemes of binary distribution, release, upgrade, patch, and so on、To survive in this jungle, Java must be architecture neutral, portable, and dynamically adaptable、The Java system that emerged to meet these needs is simple, so it can be easily programmed by most developers; familiar, so that current developers can easily learn Java; object oriented, to take advantage of modern software development methodologies and to fit into distributed client-server applications; multithreaded, for high performance in applications that need to perform multiple concurrent activities, such as multimedia; and interpreted, for maximum portability and dynamic capabilities、Together, the above requirements comprise quite a collection of buzzwords, so let’s examine some of them and their respective benefits before going on、What’s completely new is the manner in which Java and its run-time system have combined them to produce a flexible and powerful programming system、、Developing your applications using Java results in software that is portable across multiple machine architectures, operating systems, and graphical user interfaces, secure, and high performance, With Java, your job as a software developer is much easier—you focus your full attention on the end goal of shipping innovative products on time, based on the solid foundation of Java、The better way to develop software is here, now, brought to you by the Java language platform、Very dynamic languages like Lisp, TCL, and SmallTalk are often used for prototyping、One of the reasons for their success at this is that they are very robust—you don’t have to worry about freeing or corrupting memory、Similarly, programmers can be relatively fearless about dealing with memory when programming in Java, The garbage collection sys tem makes the programmer’s job vastly easier; with the burden of memory management taken off the programmer’s shoulders, storage allocation errors go away、Another reason commonly given that languages like Lisp, TCL, and SmallTalk are good for prototyping is that they don’t require you to pin down decisions early on—these languages are semantically rich、Java has exactly the opposite property: it forces you to make explicit choices、Along with these choices come a lot of assistance—you can write method invocations and, if you get something wrong, you get told about it at compile time、You don’t have to worry about method invocation error、The Java beginner must grasp 30 basic conceptsBasic concept1、In OOP the only relations is what the object’s interface, such as the computer seller he leaves alone internal structure of electrical source, but he is only concerned about that whether the power will be supplied to you, also so long as know can or not but is not how and why、All procedures are make up of certain attribute and the behavior object, the different object visit invokes through the function invocation, between the object all intercommunion are invoke through the method invocation, By object data encapsulation, enhances reuse rate very much、、2、In OOP the most important thought is class, the class is the template ,is a blueprint, construct an object from a class, namely construct an instance of the class、3、Encapsulation: is that combines the data and the behavior in a package) and hides the data the realization process to the object user, in an object data is called its instance field、4、Through expands a class to obtain a new class is called inheritance, but all classesare constructed by the object super root class of expansion, super root class of as follows can make the introduction、5、Object 3 principal characteristicsBehavior--- explained this object can make what、Tate--- when the object exerts the method object reflection、Dentity--- and other similar behavior objects discrimination symbols、Each object has only indentity and among three characteristics they affect mutually、6、Relations among classes:Use-a:Dependent relationHas-a:Polymerization relationIs-a: inheritor relation -- example:A class has inherited B class, this time A class not only has B class of method, but also has its own method(Individuality exists in general character)7、Structure object use structure:Structure proposing, the structure is one special method, the structure object and to its initialization、Example:A Data class of structure calls DataNew Data () --- structure a new object, also initialize current time、Data happyday=new Data () --- an object evaluates an variable happyday, thus enables this object to be used many times, here be stated the cause variable and the object variable are different、New returns the value is a quotation、Constructor characteristic:The constructor may have 0, one or many parametersThe constructor and the class have the same nameA class may have many constructor、The constructor has not returned valueThe constructor always be together used with the new operator8、Over loading: When many methods have the same name when includes the different parameter, then has the over loading Which method does the compiler have to choose invokes、9、Package : Java allow one or many classes to become together as group, is called package, to organizing duty easily, the standard Java storehouse divides into many packages Java、Lang java、Util java, net and so on, the package is layered and all java packages are in java and in a javax package、10、Extendable thought: permit to construct new class on existing classes , when you extend the class which already existed, then you reuse this class of method and the field, at the same time you might add the new method and the field in the new class、11、Expandable class:The expandable class fully manifested is-a to extend the relations The form is:Class (subclass) extends (base class)、12、Multi-modality: In java, the object variable is multi-modality But in java does not support multiple extend、13、Dynamic combine: the mechanism of invoking object method mechanism、1) compiler examines object statement type and method name、2) the compiler examines that method invokes parameter type、3) static combine: If the method type is priavte static the final ,compiler can accurately know which method should invoke、4) when the procedure runs and uses dynamic combine to invoke a method, the method edition which then hypothesized machine must invoke x the object actual type which aims at to match、5) dynamic combine: is a very important characteristic, it can cause the procedure to change again may expand but does not need to translate has saved the code、14、Final class:In order to prevent other people derive the new class from yours class, this class is cannot expanded、15、The dynamic invocation spend longer time than the static invocation expenditure、16、Abstract class:Stipulated or many abstract methods class of itself must define is abstract、Example: Public abstract string getDescripition17、In Java each class is be extended by object class、18、equal and toString method in object class 、Equal uses in testing an object is whether equal with another object、ToString returns to represent this object the string of character, each class can nearly over loading this method, in order to returns to the current condition the correct expression、(The toString method is a very important method)19、General programming:Any class of type all values all may replace with a object class of variable、20、The array tabulates: The ArrayList dynamic array tabulates, is a class of storehouse, defines in java、In uitl package, but automatic control array size、21、in class and class of object ,getclass method returns to the class type an example, when the procedure start contains can increase in the main method class, hypothesized confidential increase all classes which he needs, each increase class all must increase the class which it needs、22、The class: class might dynamic operate the java code for the compilation the procedure to provide the formidable function reflection, this function was JavaBeans is specially useful, the use reflected Java to be able to support the VB programmer to be familiar with the use the tool、procedure of analysis class ability is called the reflector, in Java to provide this function the package to call Java、Lang、The reflect reflection mechanism is extremely formidable、1) when run analysis class ability、2) when run searches observes a class of object、3) realizes the general array operation code、4) provides the method object、But this mechanism mainly aims at the tool but not the application and the procedure、In the reflection mechanism most important part is that permits class that you inspect structure、With to API includes:Java、Lang、Reflect、Field returns to the field、Java、Reflect、Method returns to the method、Java、Lang、Reflect、Constructor returns to the parameter、Method pointer: Java does not have the method pointer, makes a method address another method, may invoke it in behind, but the interface is the better solution、23、interface: should showing class could do what but not to assign how to do, a class may realize one or many interfaces、24、The interface is not a class, but is to conforms to a interface request class of set of standard、If realizes a interface to need 2 steps:1) the statement class needs to realize assigns the interface、2) provides in the interface all methods definition、Stated a class realizes a interface to need to use the implements key wordsClass actionB implements Comparable its actionb needs to provide the CompareTo method, the interface is not the class, cannot use a new example interface、25、A class only then a super class, but a class can realize many interfaces、In a Java important interface: Cloneable26、The interface and call-back :to programs a commonly used pattern is call-back,in the pattern, you may refer when this class of pattern settled specific time occurs returns to adjusts on the object the method、Example:ActionListener interface monitor、Similar API includes:Java、Swing、JOptionPaneJava、Swing、TimerJava、Awt、Tookit27、Object clone:The clone method is a object protection method, this meant your code cannot simple invoke it、28、Inner class an inner class definition is the definition in another class、The reason is:1) an inner class object can visit founds its object realization, including private data、2) about other classes in the same package in that, inner class can be hided、3) the anonymous inner class may the very convenient definition accent、In 4) uses the category to be possible the extremely convenient compilation event driver、29、Agent class (proxy):1) appointing all codes that interfaces request2) all methods (toString equals) that object class define30、Data type:Java is kind of emphasizing type language, each variable all must be declared its types at first, in java altogether has 8 basic types 、four kinds are the long, two kinds are the float, one is the char, being used in the Unicode code char, Boolean、1、java is simpleJava and C + + are very similar, but much simpler、All the high-level programming language features, is not absolutely necessary have been deleted、For example, Java does not overload operator, the title of the document, pre-processing, computing pointer, the structure of the joint, multi-dimensional array, templates and implicit type conversion、If you know a little C, C + + or Pascal, you will soon master Java、Here is a simple procedure JavaHelloWorld:publicclassHelloInternet (publicstaticvoidmain (Stringargv []) (System、out、println ( "HelloIn-ternet!")))2、Java is object-orientedJava is an object-oriented programming language、In addition to the simple types,such as digital and Boolean operators in addition, Java is an object of most、As with any object-oriented languages, Java code also organized by category、Each category provides a definition of the object behavior、Another type of succession can be a kind of behavior、In the category of the root level, often the target category、Java support for the single type of inherited hierarchy、This means that each category can only inherit one other category、Some of the language to allow multiple inheritance, but it may cause confusion and unnecessarily complicated language、For example, imagine that an object would inherit two completely different category、Java also supports the kind of summary of the interface、This allows programmers to define the interface methods, and do not have to rush immediately to determine the methods to achieve、 A type of interface can be a number of purposes in order to truly multi-inheritance of a number of advantages、The implementation of an object can be any number of interfaces、IDL interface and Java interface very similar、Very easy to set up IDLJ compiler、In other words, Java can be used to create a CORBA object system distributed object system、In the view of many computer systems use IDL interface and CORBA objects, such compatibility is important、3、Java is a type of staticIn a Java program, it is essential to the definition used by the target (number of characters, such as an array) type、This will help programmers quickly found because the procedure when the compiler can detect the type of error、However, Java System objects are also dynamic types、 A requirement for the type of dynamic is often possible, so programmers can write the procedures for different types of objects to do different things、4、Is a Java-based compilerWhen running Java programs, which were first compiled into byte code、Byte code is very similar to the machine instructions, so Java program is very efficient、However, the byte code does not specifically for a particular machine, so no need to recompile Java program can be in many different computer implementation、Java source code files were compiled into a category, which is equivalent to process byte code performance、In a Java class file, and an example for all of the variables are in the light of, and for the first time in the implementation of the code be resolved、This makes the code more common and more easily subject to revision, but still high、5、Java is architecture neutralJava language is the same for each computer、For example, simple types are the same: 32-bit integer always, always 64-bit long integers、It is strange, such as C and C + + programming language, and so fashionable it is not the case、As a result of these languages so the definition of freedom, each of the compiler and development environment will bedifferent, so that this process nuisance become a transplant、Java programs can easily gain access to transplants, and there is no need to re-compile、6、Java is a soundJava program can not be caused by the collapse of the computer、Java careful testing of the system memory of each visit, make sure it is legitimate and will not cause any problems、However, even if the Java program may also be wrong、If there is some kind of unexpected things, the process will not collapse, and to abandon the exception、Procedures for such an exception would be found to address them、Traditional computer programs can access the full memory、May (unconsciously) to amend any of the value of memory, which will cause problems、Java program can only access memory to allow them access to those parts of the Java program can not modify it does not seek to change the value、7、Java is a compactAs the Java is designed to run on a small computer, as a programming language for the system is relatively small、It effectively in more than 4MB of RAM to run on PC machine、Java translator occupied by only a few hundred KB、This translator for the Java platform independence and portability is reliable、Due to Java is very small, it is a very small computer memory, such as the Java-based PC, as well as television sets, ovens, telephone and home computer, and so on, it is ideal、8、Java is a multi-threadedJava program can run more than one thread、For example, it can be a thread in a time-consuming to complete the calculation, and other users to interact with the threads of dialogue、Therefore, users do not have to stop working, waiting for the Java computing time-consuming process、In the multi-threaded programming environment, it is often difficult because many things may occur at the same time、However, Java provides easy-to-use features simultaneously, so that the programming easier、中文翻译JA V A介绍作者:Martin Ngobye、出处:Computing Static Slice for Java ProgramsJava就是被设计用来解决在上下文分布式的异构网络中应用程序开发的问题。

外文翻译java

外文翻译java

外文资料译文及原文JavaJava I/O 系统对编程语言的设计者来说,创建一套好的输入输出(I/O)系统,是一项难度极高的任务。

这一点可以从解决方案的数量之多上看出端倪。

这个问题难就难在它要面对的可能性太多了。

不仅是因为有那么多 I/O 的源和目地(文件,控制台,网络连接等等),而且还有很多方法(顺序的『sequential』,随机的『random-access』, 缓存的『 buffered 』,二进制的『 binary 』,字符方式的『 character 』,行的『by lines 』,字的『 by words 』,等等)。

Java类库的设计者们用"创建很多类"的办法来解决这个问题。

坦率地说Java I/O 系统的类实在是太多了,以至于初看起来会把人吓着(但是,具有讽刺意味的是,这种设计实际上是限制了类的爆炸性增长)。

此外,Java在1.0版之后又对其 I/O 类库作了重大的修改,原先是面向 byte 的,现在又补充了面向Unicode字符的类库。

为了提高性能,完善功能,JDK1.4又加了一个nio(意思是"new I/O"。

这个名字会用上很多年)。

这么以来,如果你想对Java的I/O 类库有个全面了解,并且做到运用自如,你就得先学习大量的类。

此外,了解 I/O 类库的演化的历史也是相当重要的。

可能你的第一反应是 "别拿什么历史来烦我了,告诉我怎么用就可以了! "但问题是,如果你对这段历史一无所知,很快就会被一些有用或是没用的类给搞糊涂了。

本章会介绍 Java 标准类库中的各种 I/O 类,及其使用方法。

File 类在介绍直接从流里读写数据的类之前,我们先介绍一下处理文件和目录的类。

File 类有一个极具欺骗性的名字;或许你会认为这是一个关于文件的类,但它不是。

你可以用它来表示某个文件的名字,也可以用它来表示目录里一组文件的名字。

java-毕业论文外文文献翻译

java-毕业论文外文文献翻译

Advantages of Managed CodeMicrosoft intermediate language shares with Java byte code the idea that it is a low—level language with a simple syntax ,which can be very quickly translated into native machine code。

Having this well-defined universal syntax for code has significant advantages。

Platform independenceFirst,it means that the same file containing byte code instructions can be placed on any platform;at runtime the final stage of compilation can then be easily accomplished so that the code will run on that particular platform. In other words, by compiling to IL we obtain platform independence for 。

NET, in much the same way as compiling to Java byte code gives Java platform independence。

Performance improvementIL is actually a bit more ambitious than Java byte code。

IL is always Just-In—Time compiled (known as JIT),whereas Java byte code was often interpreted。

JAVA外文文献+翻译说课讲解

JAVA外文文献+翻译说课讲解

Java and the InternetIf Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re coming from a traditional programming perspective. Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web.1.Client-side programmingThe Web’s in itial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl is a common choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data mustbe sent, as well as the load on both the server and the Internet. (On top of this, starting a CGI program tends to be slow.) The initial designers of the Web did not foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed. For example, any sort of dynamic graphing is nearly impossible to perform with consistency because a GIF file must be created and moved from the server to the client for each version of the graph. And you’ve no doubt had direct experience with something as simple as validating the data on an input form. You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; you must then back up a page and try again. Not only is this slow, it’s inelegant.The solution is client-side programming. Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page. Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience at your Web site.The problem with discussions of client-side prog ramming is that they aren’t very different from discussions of programming in general. The parameters are almost the same, but the platform is different: a Web browser is like a limited operating system. In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming. The rest of this section provides an overview of the issues and approaches in client-side programming.2.Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in. This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself into the appropriate spot in the browser. It tells the browser “from now on you canpe rform this new activity.” (You need to download the plug-in only once.) Some fast and powerful behavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t something you’d want to do as part of the process of building a particular site. The value of the plug-in for client-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer. Thus, plug-ins provide a “back door” that allows the creation of new client-side programming languages (although not all languages are implemented as plug-ins).3.Scripting languagesPlug-ins resulted in an explosion of scripting languages. With a scripting language you embed the source code for your client-side program directly into the HTML page, and the plug-in that interprets that language is automatically activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The trade-off is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly s ophisticated things with scripting languages so this is not too much of a hardship.This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in client-side programming. Your problems might very well fit completely within that 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming.The most commonly discussed browser scripting languages are JavaScript (which has nothing to do with Java; it’s named that way just to grab some of Java’s marketing momentum), VBScript (which looks like Visual Basic), andTcl/Tk, which comes from the popular cross-platform GUI-building language. There are others out there, and no doubt more in development.JavaScript is probably the most commonly supported. It comes built into both Netscape Navigator and the Microsoft Internet Explorer (IE). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript. However, if you’re already fluent in Visual Basic or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing w ith the Web issues already.)4.JavaIf a scripting language can solve 80 percent of the client-side programming problems, what about the other 20 percent—the “really hard stuff?” The most popular solution today is Java. Not only is it a powerful programming language built to be secure, cross-platform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, network programming, and distributed computing. Java allows client-side programming via the applet.An applet is a mini-program that will run only under a Web browser. The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded). When the applet is activated it executes a program. This is part of its beauty—it provides you with a way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner. The user gets the latest version of the client software without fail and without difficult reinstallation. Because of the way Java is designed, the programmer needs to create only a single program, and that program automatically works with all computers that have browsers with built-in Java interpreters. (This safely includes the vast majority of machines.) Since Java is a full-fledged programming language, you can do as much work as possible on the client before and after making requests of theserver. For example, you won’t need to send a request form across the Internet to discover that you’ve gotten a date or some other parameter wrong, and your client computer can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you. Not only do you get the immediate win of speed and responsiveness, but the general network traffic and load on servers can be reduced, preventing the entire Internet from slowing down.On e advantage a Java applet has over a scripted program is that it’s in compiled form, so the source code isn’t available to the client. On the other hand, a Java applet can be decompiled without too much trouble, but hiding your code is often not an important issue. Two other factors can be important. As you will see later in this book, a compiled Java applet can comprise many modules and take multiple server “hits” (accesses) to download. (In Java 1.1 and higher this is minimized by Java archives, called JAR files, that allow all the required modules to be packaged together and compressed for a single download.) A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits). This could be important to the responsiveness of your Web site. Another factor is the all-important learning curve. Regardless of what you’ve heard, Java is not a trivial language to learn. If you’re a Visual Basic programmer, moving to VBScript will be your fastest solution, and since it will probably solve most typical client/server problems you might be hard pressed to justify learning Java. If you’re experienced with a scripting language you will certainly benefit from looking at JavaScript or VBScript before committing to Java, since they might fit your needs handily and you’ll be more productive sooner.to run its applets withi5.ActiveXTo some degree, the competitor to Java is Microsoft’s ActiveX, although it takes a completely different approach. ActiveX was originally a Windows-only solution, although it is now being developed via an independent consortium to become cross-platform. Effectively, ActiveX says “if your program connects toits environment just so, it can be dropped into a Web page and run under a b rowser that supports ActiveX.” (IE directly supports ActiveX and Netscape does so using a plug-in.) Thus, ActiveX does not constrain you to a particular language. If, for example, you’re already an experienced Windows programmer using a language such as C++, Visual Basic, or Borland’s Delphi, you can create ActiveX components with almost no changes to your programming knowledge. ActiveX also provides a path for the use of legacy code in your Web pages.6.SecurityAutomatically downloading and running programs across the Internet can sound like a virus-builder’s dream. ActiveX especially brings up the thorny issue of security in client-side programming. If you click on a Web site, you might automatically download any number of things along with the HTML page: GIF files, script code, compiled Java code, and ActiveX components. Some of these are benign; GIF files can’t do any harm, and scripting languages are generally limited in what they can do. Java was also designed to run its applets within a “sandbox” of s afety, which prevents it from writing to disk or accessing memory outside the sandbox.ActiveX is at the opposite end of the spectrum. Programming with ActiveX is like programming Windows—you can do anything you want. So if you click on a page that downloads an ActiveX component, that component might cause damage to the files on your disk. Of course, programs that you load onto your computer that are not restricted to running inside a Web browser can do the same thing. Viruses downloaded from Bulletin-Board Systems (BBSs) have long been a problem, but the speed of the Internet amplifies the difficulty.The solution seems to be “digital signatures,” whereby code is verified to show who the author is. This is based on the idea that a virus works because its creator can be anonymous, so if you remove the anonymity individuals will be forced to be responsible for their actions. This seems like a good plan because it allows programs to be much more functional, and I suspect it will eliminate malicious mischief. If, however, a program has an unintentional destructive bugit will still cause problems.The Java approach is to prevent these problems from occurring, via the sandbox. The Java interpreter that lives on your local Web browser examines the applet for any untoward instructions as the applet is being loaded. In particular, the applet cannot write files to disk or erase files (one of the mainstays of viruses). Applets are generally considered to be safe, and since this is essential for reliable client/server systems, any bugs in the Java language that allow viruses are rapidly repaired. (It’s worth noting that the browser software actually enforces these security restrictions, and some browsers allow you to select different security levels to provide varying degrees of access to your system.) You might be skeptical of this rather draconian restriction against writing files to your local disk. For example, you may want to build a local database or save data for later use offline. The initial vision seemed to be that eventually everyone would get online to do anything important, but that was soon seen to be impractical (although low-cost “Internet appliances” might someday satisfy the needs of a significant segment of users). The solution is the “signed applet” that uses public-key encryption to verify that an applet does indeed come from where it claims it does. A signed applet can still trash your disk, but the theory is that since you can now hold the applet creator accountable they won’t do vicious things. Java provides a framework for digital signatures so that you will eventually be able to allow an applet to step outside the sandbox if necessary. Digital signatures have missed an important issue, which is the speed that people move around on the Internet. If you download a buggy program and it does something untoward, how long will it be before you discover the damage? It could be days or even weeks. By then, how will you track down the program that’s done it? And what good will it do you at that point?7.Internet vs. intranetThe Web is the most general solution to the client/server problem, so it makes sense that you can use the same technology to solve a subset of the problem, in particular the classic client/server problem within a company. With traditionalclient/server approaches you have the problem of multiple types of client computers, as well as the difficulty of installing new client software, both of which are handily solved with Web browsers and client-side programming. When Web technology is used for an information network that is restricted to a particular company, it is referred to as an intranet. Intranets provide much greater security than the Internet, since you can physically control access to the servers within your company. In terms of training, it seems that once people understand the general concept of a browser it’s much easier for them to deal with differences in the way pages and applets look, so the learning curve for new kinds of systems seems to be reduced.The security problem brings us to one of the divisions that seems to be automatically forming in the world of client-side programming. If your program is running on the Internet, you don’t know what platform it will be working under, and you want to be extra careful that you don’t di sseminate buggy code. You need something cross-platform and secure, like a scripting language or Java.If you’re running on an intranet, you might have a different set of constraints. It’s not uncommon that your machines could all be Intel/Windows platfor ms. On an intranet, you’re responsible for the quality of your own code and can repair bugs when they’re discovered. In addition, you might already have a body of legacy code that you’ve been using in a more traditional client/server approach, whereby you must physically install client programs every time you do an upgrade. The time wasted in installing upgrades is the most compelling reason to move to browsers, because upgrades are invisible and automatic. If you are involved in such an intranet, the most sensible approach to take is the shortest path that allows you to use your existing code base, rather than trying to recode your programs in a new language.When faced with this bewildering array of solutions to the client-side programming problem, the best plan of attack is a cost-benefit analysis. Consider the constraints of your problem and what would be the shortest path to your solution. Since client-side programming is still programming, it’s always a good idea to take the fastest development approach for your particular situation.This is an aggressive stance to prepare for inevitable encounters with the problems of program development.8.Server-side programmingThis whole discussion has ignored the issue of server-side programming. What happens when you make a request of a server? Most of the time the request is simply “send me this file.” Your browser then interprets the file in some appropriate fashion: as an HTML page, a graphic image, a Java applet, a script program, etc. A more complicated request to a server generally involves a database transaction. A common scenario involves a request for a complex database search, which the server then formats into an HTML page and sends to you as the result. (Of course, if the client has more intelligence via Java or a scripting language, the raw data can be sent and formatted at the client end, which will be faster and less load on the server.) Or you might want to register your name in a database when you join a group or place an order, which will involve changes to that database. These database requests must be processed via some code on the server side, which is generally referred to as server-side programming. Traditionally, server-side programming has been performed using Perl and CGI scripts, but more sophisticated systems have been appearing. These include Java-based Web servers that allow you to perform all your server-side programming in Java by writing what are called servlets. Servlets and their offspring, JSPs, are two of the most compelling reasons that companies who develop Web sites are moving to Java, especially because they eliminate the problems of dealing with differently abled browsers.9. separate arena: applicationsMuch of the brouhaha over Java has been over applets. Java is actually a general-purpose programming language that can solve any type of problem—at least in theory. And as pointed out previously, there might be more effective ways to solve most client/server problems. When you move out of the appletarena (and simultaneously release the restrictions, such as the one against writing to disk) you enter the world of general-purpose applications that run standalone, without a Web browser, just like any ordinary program does. Here, Java’s strength is not only in its portability, but a lso its programmability. As you’ll see throughout this book, Java has many features that allow you to create robust programs in a shorter period than with previous programming languages. Be aware that this is a mixed blessing. You pay for the improvements through slower execution speed (although there is significant work going on in this area—JDK 1.3, in particular, introduces the so-called “hotspot” performance improvements). Like any language, Java has built-in limitations that might make it inappropriate to solve certain types of programming problems. Java is a rapidly evolving language, however, and as each new release comes out it becomes more and more attractive for solving larger sets of problems.Java和因特网既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不是很明显。

Java技术外文翻译文献

Java技术外文翻译文献

Java技术外文翻译文献(文档含中英文对照即英文原文和中文翻译)外文:Core Java™ Volume II–Advanced Features When Java technology first appeared on the scene, the excitement was not about a well-crafted programming language but about the possibility of safely executing applets that are delivered over the Internet (see V olume I, Chapter 10 for more information about applets). Obviously, delivering executable applets is practical only when the recipients are sure that the code can't wreak havoc on their machines. For this reason, security was and is a major concern of both the designers and the users of Java technology. This means that unlike other languages andsystems, where security was implemented as an afterthought or a reaction to break-ins, security mechanisms are an integral part of Java technology.Three mechanisms help ensure safety:•Language design features (bounds checking on arrays, no unchecked type conversions, no pointer arithmetic, and so on).•An access control mechanism that controls what the code can do (such as file access, network access, and so on).•Code signing, whereby code authors can use standard cryptographic algorithms to authenticate Java code. Then, the users of the code can determine exactly who created the code and whether the code has been altered after it was signed.Below, you'll see the cryptographic algorithms supplied in the java.security package, which allow for code signing and user authentication.As we said earlier, applets were what started the craze over the Java platform. In practice, people discovered that although they could write animated applets like the famous "nervous text" applet, applets could not do a whole lot of useful stuff in the JDK 1.0 security model. For example, because applets under JDK 1.0 were so closely supervised, they couldn't do much good on a corporate intranet, even though relatively little risk attaches to executing an applet from your company's secure intranet. It quickly became clear to Sun that for applets to become truly useful, it was important for users to be able to assign different levels of security, depending on where the applet originated. If an applet comes from a trusted supplier and it has not been tampered with, the user of that applet can then decide whether to give the applet more privileges.To give more trust to an applet, we need to know two things:•Where did the applet come from?•Was the code corrupted in transit?In the past 50 years, mathematicians and computer scientists have developed sophisticated algorithms for ensuring the integrity of data and for electronic signatures. The java.security package contains implementations of many of these algorithms. Fortunately, you don't need to understand the underlying mathematics to use the algorithms in the java.security package. In the next sections, we show you how message digests can detect changes in data files and how digital signatures can prove the identity of the signer.A message digest is a digital fingerprint of a block of data. For example, the so-called SHA1 (secure hash algorithm #1) condenses any data block, no matter how long, into a sequence of 160 bits (20 bytes). As with real fingerprints, one hopes that no two messages have the same SHA1 fingerprint. Of course, that cannot be true—there are only 2160 SHA1 fingerprints, so there must be some messages with the same fingerprint. But 2160is so large that the probability of duplication occurring is negligible. How negligible? According to James Walsh in True Odds: How Risks Affect Your Everyday Life (Merritt Publishing 1996), the chance that you will die from being struck by lightning is about one in 30,000. Now, think of nine other people, for example, your nine least favorite managers or professors. The chance that you and all of them will die from lightning strikes is higher than that of a forged message having the same SHA1 fingerprint as the original. (Of course, more than ten people, none of whom you are likely to know, will die from lightning strikes. However, we are talking about the far slimmer chance that your particular choice of people will be wiped out.)A message digest has two essential properties:•If one bit or several bits of the data are changed, then the message digest also changes.• A forger who is in possession of a given message cannot construct a fake message that has the same message digest as the original.The second property is again a matter of probabilities, of course. Consider the following message by the billionaire father:"Upon my death, my property shall be divided equally among my children; however, my son George shall receive nothing."That message has an SHA1 fingerprint of2D 8B 35 F3 BF 49 CD B1 94 04 E0 66 21 2B 5E 57 70 49 E1 7EThe distrustful father has deposited the message with one attorney and the fingerprint with another. Now, suppose George can bribe the lawyer holding the message. He wants to change the message so that Bill gets nothing. Of course, that changes the fingerprint to a completely different bit pattern:2A 33 0B 4B B3 FE CC 1C 9D 5C 01 A7 09 51 0B 49 AC 8F 98 92Can George find some other wording that matches the fingerprint? If he had been the proud owner of a billion computers from the time the Earth was formed, each computing a million messages a second, he would not yet have found a message he could substitute.A number of algorithms have been designed to compute these message digests. The two best-known are SHA1, the secure hash algorithm developed by the National Institute of Standards and Technology, and MD5, an algorithm invented by Ronald Rivest of MIT. Both algorithms scramble the bits of a message in ingenious ways. For details about these algorithms, see, for example, Cryptography and Network Security, 4th ed., by William Stallings (Prentice Hall 2005). Note that recently, subtle regularities have been discovered in both algorithms. At this point, most cryptographers recommend avoiding MD5 and using SHA1 until a stronger alternative becomes available.The Java programming language implements both SHA1 and MD5. The MessageDigest class is a factory for creating objects that encapsulate the fingerprinting algorithms. It has a static method, called getInstance, that returns an object of a class that extends the MessageDigest class. This means the MessageDigest class serves double duty:•As a factory class•As the superclass for all message digest algorithmsFor example, here is how you obtain an object that can compute SHA fingerprints:MessageDigest alg = MessageDigest.getInstance("SHA-1");(To get an object that can compute MD5, use the string "MD5" as the argument to getInstance.)After you have obtained a MessageDigest object, you feed it all the bytes in the message by repeatedly calling the update method. For example, the following code passes all bytes in a file to the alg object just created to do the fingerprinting:InputStream in = . . .int ch;while ((ch = in.read()) != -1)alg.update((byte) ch);Alternatively, if you have the bytes in an array, you can update the entire array at once:byte[] bytes = . . .;alg.update(bytes);When you are done, call the digest method. This method pads the input—as required by the fingerprinting algorithm—does the computation, and returns the digest as an array of bytes.byte[] hash = alg.digest();The program in Listing 9-15 computes a message digest, using either SHA or MD5. You can load the data to be digested from a file, or you can type a message in the text area.Message SigningIn the last section, you saw how to compute a message digest, a fingerprint for the original message. If the message is altered, then the fingerprint of the altered message will not match the fingerprint of the original. If the message and its fingerprint are delivered separately, then the recipient can check whether the message has been tampered with. However, if both the message and the fingerprint were intercepted, it is an easy matter to modify the message and then recompute the fingerprint. After all, the message digest algorithms are publicly known, and they don't require secret keys. In that case, the recipient of the forged message and the recomputed fingerprint would never know that the message has been altered. Digital signatures solve this problem.To help you understand how digital signatures work, we explain a few concepts from the field called public key cryptography. Public key cryptography is based on the notion of a public key and private key. The idea is that you tell everyone in the world your public key. However, only you hold the private key, and it is important that you safeguard it and don't release it to anyone else. The keys are matched by mathematical relationships, but the exact nature of these relationships is not important for us.The keys are quite long and complex. For example, here is a matching pair of public and private Digital Signature Algorithm (DSA) keys.Public key:Code View:p:fca682ce8e12caba26efccf7110e526db078b05edecbcd1eb4a208f3ae1617ae01f35b91a47e6df 63413c5e12ed0899bcd132acd50d99151bdc43ee737592e17q: 962eddcc369cba8ebb260ee6b6a126d9346e38c5g:678471b27a9cf44ee91a49c5147db1a9aaf244f05a434d6486931d2d14271b9e35030b71fd7 3da179069b32e2935630e1c2062354d0da20a6c416e50be794ca4y:c0b6e67b4ac098eb1a32c5f8c4c1f0e7e6fb9d832532e27d0bdab9ca2d2a8123ce5a8018b8161 a760480fadd040b927281ddb22cb9bc4df596d7de4d1b977d50Private key:Code View:p:fca682ce8e12caba26efccf7110e526db078b05edecbcd1eb4a208f3ae1617ae01f35b91a47e6df 63413c5e12ed0899bcd132acd50d99151bdc43ee737592e17q: 962eddcc369cba8ebb260ee6b6a126d9346e38c5g:678471b27a9cf44ee91a49c5147db1a9aaf244f05a434d6486931d2d14271b9e35030b71fd73 da179069b32e2935630e1c2062354d0da20a6c416e50be794ca4x: 146c09f881656cc6c51f27ea6c3a91b85ed1d70aIt is believed to be practically impossible to compute one key from the other. That is, even though everyone knows your public key, they can't compute your private key in your lifetime, no matter how many computing resources they have available.It might seem difficult to believe that nobody can compute the private key from the public keys, but nobody has ever found an algorithm to do this for the encryption algorithms that are in common use today. If the keys are sufficiently long, brute force—simply trying all possible keys—would require more computers than can be built from all the atoms in the solar system, crunching away for thousands of years. Of course, it is possible that someone could come up with algorithms for computing keys that are much more clever than brute force. For example, the RSA algorithm (the encryption algorithm invented by Rivest, Shamir, and Adleman) depends on the difficulty of factoring large numbers. For the last 20 years, many of the best mathematicians have tried to come up with good factoring algorithms, but so far with no success. For that reason, most cryptographers believe that keys with a "modulus" of 2,000 bits or more are currently completely safe from any attack. DSA is believed to be similarly secure.Figure 9-12 illustrates how the process works in practice.Suppose Alice wants to send Bob a message, and Bob wants to know this message came from Alice and not an impostor. Alice writes the message and then signs the message digest with her private key. Bob gets a copy of her public key. Bob then applies the public key to verify thesignature. If the verification passes, then Bob can be assured of two facts:•The original message has not been altered.•The message was signed by Alice, the holder of the private key that matches the public key that Bob used for verification.You can see why security for private keys is all-important. If someone steals Alice's private key or if a government can require her to turn it over, then she is in trouble. The thief or a government agent can impersonate her by sending messages, money transfer instructions, and so on, that others will believe came from Alice.The X.509 Certificate FormatTo take advantage of public key cryptography, the public keys must be distributed. One of the most common distribution formats is called X.509. Certificates in the X.509 format are widely used by VeriSign, Microsoft, Netscape, and many other companies, for signing e-mail messages, authenticating program code, and certifying many other kinds of data. The X.509 standard is part of the X.500 series of recommendations for a directory service by the international telephone standards body, the CCITT.The precise structure of X.509 certificates is described in a formal notation, called "abstract syntax notation #1" or ASN.1. Figure 9-13 shows the ASN.1 definition of version 3 of the X.509 format. The exact syntax is not important for us, but, as you can see, ASN.1 gives a precise definition of the structure of a certificate file. The basic encoding rules, or BER, and a variation, called distinguished encoding rules (DER) describe precisely how to save this structure in a binary file. That is, BER and DER describe how to encode integers, character strings, bit strings, and constructs such as SEQUENCE, CHOICE, and OPTIONAL.译文:Java核心技术卷Ⅱ高级特性当Java技术刚刚问世时,令人激动的并不是因为它是一个设计完美的编程语言,而是因为它能够安全地运行通过因特网传播的各种applet。

Java编程语言外文翻译、英汉互译、中英对照

Java编程语言外文翻译、英汉互译、中英对照

文档从互联网中收集,已重新修正排版,word格式支持编辑,如有帮助欢迎下载支持。

外文翻译原文及译文学院计算机学院专业计算机科学与技术班级学号姓名指导教师负责教师Java(programming language)Java is a general-purpose, concurrent, class-based, object-oriented computer program- -ming language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java applications are typically compiled to byte code (class file) that can run on any Java virtual machine(JVM) regardless of computer architecture. Java is, as of 2012, one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users. Java was originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1991 and first released in 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java and GNU Classpath.Java is a set of several computer software products and specifications from Sun Microsystems (which has since merged with Oracle Corporation), that together provide a system for developing application software and deploying it in across-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones on the low end, to enterprise servers and supercomputers on the high end. While less common, Java appletsare sometimes used to provide improved and secure functions while browsing the World Wide Web on desktop computers.Writing in the Java programming language is the primary way to produce code that will be deployed as Java bytecode. There are, however, byte code compilers available forother languages such as Ada, JavaScript, Python, and Ruby. Several new languages have been designed to run natively on the Java Virtual Machine (JVM), such as Scala, Clojure and Groovy.Java syntax borrows heavily from C and C++, but object-oriented features are modeled after Smalltalk and Objective-C. Java eliminates certain low-level constructs such as pointers and has a very simple memory model where every object is allocated on the heap and all variables of object types are references. Memory management is handled through integrated automatic garbage collection performed by the JVM.An edition of the Java platform is the name for a bundle of related programs from Sun that allow for developing and running programs written in the Java programming language. The platform is not specific to any one processor or operating system, but rather an execution engine (called a virtual machine) and a compiler with a set of libraries that are implemented for various hardware and operating systems so that Java programs can run identically on all of them. The Java platform consists of several programs, each of which provides a portion of its overall capabilities. For example, the Java compiler, which converts Java source code into Java byte code (an intermediate language for the JVM), is provided as part of the Java Development Kit (JDK). The Java Runtime Environment(JRE), complementing the JVM with a just-in-time (JIT) compiler, converts intermediate byte code into native machine code on the fly. An extensive set of libraries are also part of the Java platform.The essential components in the platform are the Java language compiler, the libraries, and the runtime environment in which Java intermediate byte code "executes" according to the rules laid out in the virtual machine specification.In most modern operating systems (OSs), a large body of reusable code is provided to simplify the programmer's job. This code is typically provided as a set of dynamically loadable libraries that applications can call at runtime. Because the Java platform is not dependent on any specific operating system, applications cannot rely on any of the pre-existing OS libraries. Instead, the Java platform provides a comprehensive set of its own standard class libraries containing much of the same reusable functions commonly found in modern operating systems. Most of the system library is also written in Java. For instance, Swing library paints the user interface and handles the events itself, eliminatingmany subtle differences between how different platforms handle even similar components.The Java class libraries serve three purposes within the Java platform. First, like other standard code libraries, the Java libraries provide the programmer a well-known set of functions to perform common tasks, such as maintaining lists of items or performing complex string parsing. Second, the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily intertwined with the distinctive implementations of each platform. The and java.io libraries implement an abstraction layer in native OS code, then provide a standard interface for the Java applications to perform those tasks. Finally, when some underlying platform does not support all of the features a Java application expects, the class libraries work to gracefully handle the absent components, either by emulation to provide a substitute, or at least by providing a consistent way to check for the presence of a specific feature.The success of Java and its write once, run anywhere concept has led to other similar efforts, notably the .NET Framework, appearing since 2002, which incorporates many of the successful aspects of Java. .NET in its complete form (Microsoft's implementation) is currently only fully available on Windows platforms, whereas Java is fully available on many platforms. .NET was built from the ground-up to support multiple programming languages, while the Java platform was initially built to support only the Java language, although many other languages have been made for JVM since..NET includes a Java-like language called Visual J# (formerly named J++) that is incompatible with the Java specification, and the associated class library mostly dates to the old JDK 1.1 version of the language. For these reasons, it is more a transitional language to switch from Java to the .NET platform, than a first class .NET language. Visual J# was discontinued with the release of Microsoft Visual Studio 2008. The existing version shipping with Visual Studio 2005will be supported until 2015 as per the product life-cycle strategy.In June and July 1994, after three days of brainstorming with John Gage, the Director of Science for Sun, Gosling, Joy, Naughton, Wayne Rosing, and Eric Schmidt, the team re-targeted the platform for the World Wide Web. They felt that with the advent of graphical web browsers like Mosaic, the Internet was on its way to evolving into the samehighly interactive medium that they had envisioned for cable TV. As a prototype, Naughton wrote a small browser, Web Runner (named after the movie Blade Runner), later renamed Hot Java.That year, the language was renamed Java after a trademark search revealed that Oak was used by Oak Technology. Although Java 1.0a was available for download in 1994, the first public release of Java was 1.0a2 with the Hot Java browser on May 23, 1995, announced by Gage at the Sun World conference. His announcement was accompanied by a surprise announcement by Marc Andreessen, Executive Vice President of Netscape Communications Corporation, that Netscape browsers would be including Java support. On January 9, 1996, the Java Soft group was formed by Sun Microsystems to develop the technology.Java编程语言Java是一种通用的,并发的,基于类的并且是面向对象的计算机编程语言,它是为实现尽可能地减少执行的依赖关系而特别设计的。

JAVA外文文献+翻译

JAVA外文文献+翻译

Java and the InternetIf Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming、The answer isn’t immediately obvious if you’re comin g from a traditional programming perspective、Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web、1.Client-side programmingThe Web’s in itial server-browser design provided for interactive content, but the interactivity was completely provided by the server、The server produced static pages for the client browser, which would simply interpret and display them、Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form back to the server、This submission passes through the Common Gateway Interface (CGI) provided on all Web servers、The text within the submission tells CGI what to do with it、The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin、” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there、) These programs can be written in most languages、Perl is a common choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system、Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it、However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem ofresponse time、The response of a CGI program depends on how much data must be sent, as well as the load on both the server and the Internet、(On top of this, starting a CGI program tends to be slow、) The initial designers of the Web did not foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed、For example, any sort of dynamic graphing is nearly impossible to perform with consistency because a GIF be created and moved from the server to the client for each version of the graph、And you’ve no doubt had direct experience with something as simple as validating the data on an input form、You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; you must then back up a page and try again、Not only is this slow, it’s inelegant、The solution is client-side programming、Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page、Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience at your Web site、The problem with discussions of client-side programming i s that they aren’t very different from discussions of programming in general、The parameters are almost the same, but the platform is different: a Web browser is like a limited operating system、In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming、The rest of this section provides an overview of the issues and approaches in client-side programming、2、Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in、This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself intothe appropriate spot in the browser、It tells the browser “from now on you can perform this new activity、” (You need to download the plug-in only once、) Some fast and powerful behavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t something you’d want to do as part of the process of building a particular site、The value of the plug-in for client-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer、Thus, plug-ins provide a “back door” that allows the creation of new client-side programming languages (although not all languages are implemented as plug-ins)、3、Scripting languagesPlug-ins resulted in an explosion of scripting languages、With a scripting language you embed the source code for your client-side program directly into the HTML page, and the plug-in that interprets that language is automatically activated while the HTML page is being displayed、Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page、The trade-off is that your code is exposed for everyone to see (and steal)、Generally, however, you aren’t doing amazingly sophistica ted things with scripting languages so this is not too much of a hardship、This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs)、However, a scripting language might solve 80 percent of the problems encountered in client-side programming、Your problems might very well fit completely within that 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming、The most commonly discussed browser scripting languages are JavaScript (which has nothing to do wit h Java; it’s named that way just to grab some ofJava’s marketing momentum), VBScript (which looks like Visual Basic), and Tcl/Tk, which comes from the popular cross-platform GUI-building language、There are others out there, and no doubt more in development、JavaScript is probably the most commonly supported、It comes built into both Netscape Navigator and the Microsoft Internet Explorer (IE)、In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript、However, if you’re already fluent in Visual Basic or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one、(You’ll have your hands full dealing with the W eb issues already、)4、JavaIf a scripting language can solve 80 percent of the client-side programming problems, what about the other 20 percent—the “really hard stuff?” The most popular solution today is Java、Not only is it a powerful programming language built to be secure, cross-platform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, network programming, and distributed computing、Java allows client-side programming via the applet、An applet is a mini-program that will run only under a Web browser、The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded)、When the applet is activated it executes a program、This is part of its beauty—it provides you with a way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner、The user gets the latest version of the client software without fail and without difficult reinstallation、Because of the way Java is designed, the programmer needs to create only a single program, and that program automatically works with all computers that have browsers with built-in Java interpreters、(This safely includes the vast majority of machines、) Since Java is a full-fledged programming language, you can do asmuch work as possible on the client before and after making requests of the server、For example, you won’t need to send a request form across the Internet to discover that you’ve gotten a date or some other parameter wrong, and your client computer can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you、Not only do you get the immediate win of speed and responsiveness, but the general network traffic and load on servers can be reduced, preventing the entire Internet from slowing down、One advanta ge a Java applet has over a scripted program is that it’s in compiled form, so the source code isn’t available to the client、On the other hand, a Java applet can be decompiled without too much trouble, but hiding your code is often not an important issue、Two other factors can be important、As you will see later in this book, a compiled Java applet can comprise many modules and take multiple server “hits” (accesses) to download、(In Java 1、1 and higher this is minimized by Java archives, called JAR files, that allow all the required modules to be packaged together and compressed for a single download、) A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits)、This could be important to the responsiveness of your Web site、Another factor is the all-important learning curve、Regardless of what you’ve heard, Java is not a trivial language to learn、If you’re a Visual Basic programmer, moving to VBScript will be your fastest solution, and since it will probably solve most typical client/server problems you might be hard pressed to justify learning Java、If you’re experienced with a scripting language you will certainly benefit from looking at JavaScript or VBScript before committing to Java, since they might fit your needs handily and you’ll be more productive sooner、to run its applets withi5、ActiveXTo some degree, the competitor to Java is Microsoft’s ActiveX, although it takes a completely different approach、ActiveX was originally a Windows-onlysolution, although it is now being developed via an independent consortium to become cross-platform、Effectively, ActiveX says “if your program connects to its environment just so, it can be dropped into a Web page and run under a browser that supports ActiveX、” (IE directly supports ActiveX and Netscape does so using a plug-in、) Thus, ActiveX does not constrain you to a particular language、If, for example, you’re already an experienced Windows programmer using a language such as C++, Visual Basic, or Borland’s Delphi, you can create ActiveX components with almost no changes to your programming knowledge、ActiveX also provides a path for the use of legacy code in your Web pages、6、SecurityAutomatically downloading and running programs across the Internet can sound like a virus-builder’s dream、ActiveX especially brings up the thorny issue of security in client-side programming、If you click on a Web site, you might automatically download any number of things along with the HTML page: GIF files, script code, compiled Java code, and ActiveX components、Some of these are benign; GIF files can’t do any harm, and scripting languages are generally limited in what they can do、Java was also designed to run its applets within a “sandbox” of safety, wh ich prevents it from writing to disk or accessing memory outside the sandbox、ActiveX is at the opposite end of the spectrum、Programming with ActiveX is like programming Windows—you can do anything you want、So if you click on a page that downloads an ActiveX component, that component might cause damage to the files on your disk、Of course, programs that you load onto your computer that are not restricted to running inside a Web browser can do the same thing、Viruses downloaded from Bulletin-Board Systems (BBSs) have long been a problem, but the speed of the Internet amplifies the difficulty、The solution seems to be “digital signatures,” whereby code is verified to show who the author is、This is based on the idea that a virus works because its creator can be anonymous, so if you remove the anonymity individuals will beforced to be responsible for their actions、This seems like a good plan because it allows programs to be much more functional, and I suspect it will eliminate malicious mischief、If, however, a program has an unintentional destructive bug it will still cause problems、The Java approach is to prevent these problems from occurring, via the sandbox、The Java interpreter that lives on your local Web browser examines the applet for any untoward instructions as the applet is being loaded、In particular, the applet cannot write files to disk or erase files (one of the mainstays of viruses)、Applets are generally considered to be safe, and since this is essential for reliable client/server systems, any bugs in the Java language that allow viruses are rapidly repaired、(It’s worth noting that the browser software actually enforces these security restrictions, and some browsers allow you to select different security levels to provide varying degrees of access to your system、)You might be skeptical of this rather draconian restriction against writing files to your local disk、For example, you may want to build a local database or save data for later use offline、The initial vision seemed to be that eventually everyone would get online to do anything important, but that was soon seen to be impractical (although low-cost “Internet appliances” might someday satisfy the needs of a significant segment of users)、The solution is the “signed applet” that uses public-key encryption to verify that an applet does indeed come from where it claims it does、A signed applet can still trash your disk, but the theory is that since you can now hold the applet creator accountable they won’t do vicious things、Java provides a framework for digital signatures so that you will eventually be able to allow an applet to step outside the sandbox if necessary、Digital signatures have missed an important issue, which is the speed that people move around on the Internet、If you download a buggy program and it does something untoward, how long will it be before you discover the damage? It could be days or even weeks、By then, how will you track down the program that’s done it? And what good will it do you at that point?7、Internet vs、intranetThe Web is the most general solution to the client/server problem, so it makes sense that you can use the same technology to solve a subset of the problem, in particular the classic client/server problem within a company、With traditional client/server approaches you have the problem of multiple types of client computers, as well as the difficulty of installing new client software, both of which are handily solved with Web browsers and client-side programming、When Web technology is used for an information network that is restricted to a particular company, it is referred to as an intranet、Intranets provide much greater security than the Internet, since you can physically control access to the servers within your company、In terms of training, it seems that once people understand the general concept of a browser it’s much easier for them to deal with differences in the way pages and applets look, so the learning curve for new kinds of systems seems to be reduced、The security problem brings us to one of the divisions that seems to be automatically forming in the world of client-side programming、If your program is running on the Internet, you don’t know what platform it will be working under, and you want to be extra careful that you don’t disseminate buggy code、You need something cross-platform and secure, like a scripting language or Java、If you’re running on an intranet, you might have a different set of constraints、It’s not uncommon that your machines could all be Intel/Windows platforms、On an intranet, you’re responsible for the quality of your own code and can repair bugs when they’re discovered、In addition, you might already have a body of legacy code that you’ve been using in a more traditional client/server approach, whereby you must physically install client programs every time you do an upgrade、The time wasted in installing upgrades is the most compelling reason to move to browsers, because upgrades are invisible and automatic、If you are involved in such an intranet, the most sensible approach to take is the shortest path that allows you to use your existing code base, rather than trying to recode your programs in a new language、When faced with this bewildering array of solutions to the client-side programming problem, the best plan of attack is a cost-benefit analysis、Consider the constraints of your problem and what would be the shortest path to your solution、Since client-side programming is still programming, it’s always a good idea to take the fastest development approach for your particular situation、This is an aggressive stance to prepare for inevitable encounters with the problems of program development、8、Server-side programmingThis whole discussion has ignored the issue of server-side programming、What happens when you make a request of a server? Most of the time the request is simply “send me this file、” Your browser then interprets the some appropriate fashion: as an HTML page, a graphic image, a Java applet, a script program, etc、A more complicated request to a server generally involves a database transaction、A common scenario involves a request for a complex database search, which the server then formats into an HTML page and sends to you as the result、(Of course, if the client has more intelligence via Java or a scripting language, the raw data can be sent and formatted at the client end, which will be faster and less load on the server、) Or you might want to register your name in a database when you join a group or place an order, which will involve changes to that database、These database requests must be processed via some code on the server side, which is generally referred to as server-side programming、Traditionally, server-side programming has been performed using Perl and CGI scripts, but more sophisticated systems have been appearing、These include Java-based Web servers that allow you to perform all your server-side programming in Java by writing what are called servlets、Servlets and their offspring, JSPs, are two of the most compelling reasons that companies who develop Web sites are moving to Java, especially because they eliminate the problems of dealing with differently abled browsers、9、separate arena: applicationsMuch of the brouhaha over Java has been over applets、Java is actually a general-purpose programming language that can solve any type of problem—at least in theory、And as pointed out previously, there might be more effective ways to solve most client/server problems、When you move out of the applet arena (and simultaneously release the restrictions, such as the one against writing to disk) you enter the world of general-purpose applications that run standalone, without a Web browser, just like any ordinary program does、Here, Java’s strength is not only in its portability, but also its programm ability、As you’ll see throughout this book, Java has many features that allow you to create robust programs in a shorter period than with previous programming languages、Be aware that this is a mixed blessing、You pay for the improvements through slower execution speed (although there is significant work going on in this area—JDK 1、3, in particular, introduces the so-called “hotspot” performance improvements)、Like any language, Java has built-in limitations that might make it inappropriate to solve certain types of programming problems、Java is a rapidly evolving language, however, and as each new release comes out it becomes more and more attractive for solving larger sets of problems、Java与因特网既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它就是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不就是很明显。

java介绍外文翻译

java介绍外文翻译

外文原文Introduction to Javaautor:Martin Ngobye.source:Computing Static Slice for Java ProgramsJava is designed to meet the challenges of application development in the context of heterogeneous, network-wide distributed environments. Paramount among these challenges is secure delivery of applications that consume the minimum of system resources, can run on any hardware and software platform, and can be extended dynamically.Java originated as part of a research project to develop advanced software for a wide variety of network devices and embedded systems. The goal was to develop a small, reliable, portable, distributed, real-time operating platform. When the project started, C++ was the language of choice. But over time the difficulties encountered with C++ grew to the point where the problems could best be addressed by creating an entirely new language platform. Design and architecture decisions drew from a variety of languages such as Eiffel, SmallTalk, Objective C, and Cedar/Mesa. The result is a language platform that has proven ideal for developing secure, distributed, network based end-user applications in environments ranging from network-embedded devices to the World-Wide Web and the desktop.The design requirements of Java are driven by the nature of the computing environments in which software must be deployed.The massive growth of the Internet and the World-Wide Web leads us to a completely new way of looking at development and distribution of software. To live in the world of electronic commerce and distribution, Java must enable the development of secure, high performance, and highly robust applications on multiple platforms in heterogeneous, distributed networks.Operating on multiple platforms in heterogeneous networks invalidates the traditional schemes of binary distribution, release, upgrade, patch, and so on. To survive in this jungle, Java must be architecture neutral, portable, and dynamically adaptable.The Java system that emerged to meet these needs is simple, so it can be easily programmed by most developers; familiar, so that current developers can easily learn Java; object oriented, to take advantage of modern software development methodologies and to fit into distributed client-server applications; multithreaded, for high performance in applications that need to perform multiple concurrent activities, such as multimedia; and interpreted, for maximum portability and dynamic capabilities.Together, the above requirements comprise quite a collection of buzzwords, so let’s examine some of them and their respective benefits before going on.What’s completely new is the manner in which Java and its run-time system have combinedthem to produce a flexible and powerful programming system..Developing your applications using Java results in software that is portable across multiple machine architectures, operating systems, and graphical user interfaces, secure, and high performance, With Java, your job as a software developer is much easier—you focus your full attention on the end goal of shipping innovative products on time, based on the solid foundation of Java. The better way to develop software is here, now, brought to you by the Java language platform.Very dynamic languages like Lisp, TCL, and SmallTalk are often used for prototyping. One of the reasons for their success at this is that they are very robust—you don’t have to worry about freeing or corrupting memory.Similarly, programmers can be relatively fearless about dealing with memory when programming in Java, The garbage collection sy stem makes the programmer’s job vastly easier; with the burden of memory management taken off the programmer’s shoulders, storage allocation errors go away. Another reason commonly given that languages like Lisp, TCL, and SmallTalk are good for prototyping is that they don’t require you to pin down decisions early on—these languages are semantically rich.Java has exactly the opposite property: it forces you to make explicit choices. Along with these choices come a lot of assistance—you can write method invocations and, if you get something wrong, you get told about it at compile time. You don’t have to worry about method invocation error.The Java beginner must grasp 30 basic conceptsBasic concept1.In OOP the only relations is what the object’s interface, such as the computer seller he leaves alone internal structure of electrical source, but he is only concerned about that whether the power will be supplied to you, also so long as know can or not but is not how and why.All procedures are make up of certain attribute and the behavior object, the different object visit invokes through the function invocation, between the object all intercommunion are invoke through the method invocation, By object data encapsulation, enhances reuse rate very much..2.In OOP the most important thought is class, the class is the template ,is a blueprint, construct an object from a class, namely construct an instance of the class.3. Encapsulation: is that combines the data and the behavior in a package) and hides the data the realization process to the object user, in an object data is called its instance field.4.Through expands a class to obtain a new class is called inheritance, but all classes are constructed by the object super root class of expansion, super root class of as follows can make the introduction.5.Object 3 principal characteristicsBehavior--- explained this object can make what.Tate--- when the object exerts the method object reflection.Dentity--- and other similar behavior objects discrimination symbols.Each object has only indentity and among three characteristics they affect mutually.6. Relations among classes:Use-a:Dependent relationHas-a:Polymerization relationIs-a: inheritor relation -- example:A class has inherited B class, this time A class not only has B class of method, but also has its own method(Individuality exists in general character)7.Structure object use structure:Structure proposing, the structure is one special method, the structure object and to its initialization.Example:A Data class of structure calls DataNew Data () --- structure a new object, also initialize current time.Data happyday=new Data () --- an object evaluates an variable happyday, thus enables this object to be used many times, here be stated the cause variable and the object variable are different.New returns the value is a quotation.Constructor characteristic:The constructor may have 0, one or many parametersThe constructor and the class have the same nameA class may have many constructor. The constructor has not returned valueThe constructor always be together used with the new operator8. Over loading: When many methods have the same name when includes the different parameter, then has the over loading Which method does the compiler have to choose invokes.9.Package : Java allow one or many classes to become together as group, is called package, to organizing duty easily, the standard Java storehouse divides into many packages ng java.Util java, net and so on, the package is layered and all java packages are in java and in a javax package.10. Extendable thought: permit to construct new class on existing classes , when you extend the class which already existed, then you reuse this class of method and the field, at the same time you might add the new method and the field in the new class.11.Expandable class:The expandable class fully manifested is-a to extend the relations The form is:Class (subclass) extends (base class).12. Multi-modality: In java, the object variable is multi-modality But in java does not support multiple extend.13.Dynamic combine: the mechanism of invoking object method mechanism.1) compiler examines object statement type and method name.2) the compiler examines that method invokes parameter type.3) static combine: If the method type is priavte static the final ,compiler can accurately know which method should invoke.4) when the procedure runs and uses dynamic combine to invoke a method, the method edition which then hypothesized machine must invoke x the object actual type which aims at to match.5) dynamic combine: is a very important characteristic, it can cause the procedure to change again may expand but does not need to translate has saved the code.14.Final class:In order to prevent other people derive the new class from yours class, this class is cannot expanded.15.The dynamic invocation spend longer time than the static invocation expenditure.16.Abstract class:Stipulated or many abstract methods class of itself must define is abstract.Example: Public abstract string getDescripition17.In Java each class is be extended by object class.18. equal and toString method in object class .Equal uses in testing an object is whether equal with another object.ToString returns to represent this object the string of character, each class can nearly over loading this method, in order to returns to the current condition the correct expression.(The toString method is a very important method)19.General programming:Any class of type all values all may replace with a object class of variable.20.The array tabulates: The ArrayList dynamic array tabulates, is a class of storehouse, defines in java.In uitl package, but automatic control array size.21.in class and class of object ,getclass method returns to the class type an example, when the procedure start contains can increase in the main method class, hypothesized confidential increase all classes which he needs, each increase class all must increase the class which it needs.22.The class: class might dynamic operate the java code for the compilation the procedure to provide the formidable function reflection, this function was JavaBeans is specially useful, the use reflected Java to be able to support the VB programmer to be familiar with the use the tool.1) when run analysis class ability.2) when run searches observes a class of object.3) realizes the general array operation code.4) provides the method object.But this mechanism mainly aims at the tool but not the application and the procedure.In the reflection mechanism most important part is that permits class that you inspectstructure. With to API includes:Method pointer: Java does not have the method pointer, makes a method address another method, may invoke it in behind, but the interface is the better solution.23. interface: should showing class could do what but not to assign how to do, a class may realize one or many interfaces.24.The interface is not a class, but is to conforms to a interface request class of set of standard.If realizes a interface to need 2 steps:1) the statement class needs to realize assigns the interface.2) provides in the interface all methods definition.Stated a class realizes a interface to need to use the implements key wordsClass actionB implements Comparable its actionb needs to provide the CompareTo method, the interface is not the class, cannot use a new example interface.25.A class only then a super class, but a class can realize many interfaces. In a Java important interface: Cloneable26.The interface and call-back :to programs a commonly used pattern is call-back,in the pattern, you may refer when this class of pattern settled specific time occurs returns to adjusts on the object the method.Example:ActionListener interface monitor.Similar API includes:27.Object clone:The clone method is a object protection method, this meant your code cannot simple invoke it.28.Inner class an inner class definition is the definition in another class.The reason is:1) an inner class object can visit founds its object realization, including private data.2) about other classes in the same package in that, inner class can be hided.3) the anonymous inner class may the very convenient definition accent.In 4) uses the category to be possible the extremely convenient compilation event driver.29.Agent class (proxy):1) appointing all codes that interfaces request2) all methods (toString equals) that object class define30.Data type:Java is kind of emphasizing type language, each variable all must be declared its types at first, in java altogether has 8 basic types . four kinds are the long, two kinds are the float, one is the char, being used in the Unicode code char, Boolean.1. java is simpleJava and C + + are very similar, but much simpler. All the high-level programminglanguage features, is not absolutely necessary have been deleted. For example, Java does not overload operator, the title of the document, pre-processing, computing pointer, the structure of the joint, multi-dimensional array, templates and implicit type conversion. If you know a little C, C + + or Pascal, you will soon master Java. Here is a simple procedure JavaHelloWorld: publicclassHelloInternet (publicstaticvoidmain (Stringargv []) (System. out. println ( "HelloIn-ternet!")))2. Java is object-orientedJava is an object-oriented programming language. In addition to the simple types, such as digital and Boolean operators in addition, Java is an object of most. As with any object-oriented languages, Java code also organized by category. Each category provides a definition of the object behavior. Another type of succession can be a kind of behavior. In the category of the root level, often the target category. Java support for the single type of inherited hierarchy. This means that each category can only inherit one other category. Some of the language to allow multiple inheritance, but it may cause confusion and unnecessarily complicated language. For example, imagine that an object would inherit two completely different category. Java also supports the kind of summary of the interface. This allows programmers to define the interface methods, and do not have to rush immediately to determine the methods to achieve. A type of interface can be a number of purposes in order to truly multi-inheritance of a number of advantages. The implementation of an object can be any number of interfaces. IDL interface and Java interface very similar. Very easy to set up IDLJ compiler. In other words, Java can be used to create a CORBA object system distributed object system. In the view of many computer systems use IDL interface and CORBA objects, such compatibility is important.3. Java is a type of staticIn a Java program, it is essential to the definition used by the target (number of characters, such as an array) type. This will help programmers quickly found because the procedure when the compiler can detect the type of error. However, Java System objects are also dynamic types. A requirement for the type of dynamic is often possible, so programmers can write the procedures for different types of objects to do different things.4. Is a Java-based compilerWhen running Java programs, which were first compiled into byte code. Byte code is very similar to the machine instructions, so Java program is very efficient. However, the byte code does not specifically for a particular machine, so no need to recompile Java program can be in many different computer implementation. Java source code files were compiled into a category, whichis equivalent to process byte code performance. In a Java class file, and an example for all of the variables are in the light of, and for the first time in the implementation of the code be resolved. This makes the code more common and more easily subject to revision, but still high.5. Java is architecture neutralJava language is the same for each computer. For example, simple types are the same: 32-bit integer always, always 64-bit long integers. It is strange, such as C and C + + programming language, and so fashionable it is not the case. As a result of these languages so the definition of freedom, each of the compiler and development environment will be different, so that this process nuisance become a transplant. Java programs can easily gain access to transplants, and there is no need to re-compile.6. Java is a soundJava program can not be caused by the collapse of the computer. Java careful testing of the system memory of each visit, make sure it is legitimate and will not cause any problems. However, even if the Java program may also be wrong. If there is some kind of unexpected things, the process will not collapse, and to abandon the exception. Procedures for such an exception would be found to address them. Traditional computer programs can access the full memory. May (unconsciously) to amend any of the value of memory, which will cause problems. Java program can only access memory to allow them access to those parts of the Java program can not modify it does not seek to change the value.7. Java is a compactAs the Java is designed to run on a small computer, as a programming language for the system is relatively small. It effectively in more than 4MB of RAM to run on PC machine. Java translator occupied by only a few hundred KB. This translator for the Java platform independence and portability is reliable. Due to Java is very small, it is a very small computer memory, such as the Java-based PC, as well as television sets, ovens, telephone and home computer, and so on, it is ideal.8. Java is a multi-threadedJava program can run more than one thread. For example, it can be a thread in a time-consuming to complete the calculation, and other users to interact with the threads of dialogue. Therefore, users do not have to stop working, waiting for the Java computing time-consuming process. In the multi-threaded programming environment, it is often difficult because many things may occur at the same time. However, Java provides easy-to-use features simultaneously, so that the programming easier.中文翻译JAVA介绍作者:Martin Ngobye.出处:Computing Static Slice for Java ProgramsJava是被设计用来解决在上下文分布式的异构网络中应用程序开发的问题。

Java 简介英文版

Java 简介英文版

8
3.4 Auto garbage collection
• The C/C++ programmer have to explicitly make request of memory, like using pointers, and later have to release the memory manually. • By using Java, the entry-level programmer might forget to release memory without memory leak punishment. (like “” & “” ) • So it can be more robust &&dummy-proof.
9
4. Java edition
• J2SE(Java 2 standard edition) • J2EE(Java 2 enterprise edition) • J2ME(Java 2 mobile edition)
10
5. OOAD
System analysis & design can use the following • UML (unified modeling language)/IDE Rational Rose • OOAD principles like OCP, LSP etc. • Design patterns, GoF 23 design patterns
• • • • Platform independent Exception handler Multi-threading Auto garbage collection
5
3.Байду номын сангаас Platform independent
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

外文原文Introduction to Javaautor:Martin Ngobye.source:Computing Static Slice for Java ProgramsJava is designed to meet the challenges of application development in the context of heterogeneous, network-wide distributed environments. Paramount among these challenges is secure delivery of applications that consume the minimum of system resources, can run on any hardware and software platform, and can be extended dynamically.Java originated as part of a research project to develop advanced software for a wide variety of network devices and embedded systems. The goal was to develop a small, reliable, portable, distributed, real-time operating platform. When the project started, C++ was the language of choice. But over time the difficulties encountered with C++ grew to the point where the problems could best be addressed by creating an entirely new language platform. Design and architecture decisions drew from a variety of languages such as Eiffel, SmallTalk, Objective C, and Cedar/Mesa. The result is a language platform that has proven ideal for developing secure, distributed, network based end-user applications in environments ranging from network-embedded devices to the World-Wide Web and the desktop.The design requirements of Java are driven by the nature of the computing environments in which software must be deployed.The massive growth of the Internet and the World-Wide Web leads us to a completely new way of looking at development and distribution of software. To live in the world of electronic commerce and distribution, Java must enable the development of secure, high performance, and highly robust applications on multiple platforms in heterogeneous, distributed networks.Operating on multiple platforms in heterogeneous networks invalidates the traditional schemes of binary distribution, release, upgrade, patch, and so on. To survive in this jungle, Java must be architecture neutral, portable, and dynamically adaptable.The Java system that emerged to meet these needs is simple, so it can be easily programmed by most developers; familiar, so that current developers can easily learn Java; object oriented, to take advantage of modern software development methodologies and to fit into distributed client-server applications; multithreaded, for high performance in applications that need to perform multiple concurrent activities, such as multimedia; and interpreted, for maximum portability and dynamic capabilities.Together, the above requirements comprise quite a collection of buzzwords, so let’s examine some of them and their respective benefits before going on.What’s completely new is the manner in which Java and its run-time system have combined them to produce a flexible and powerful programming system..Developing your applications using Java results in software that is portable across multiple machine architectures, operating systems, and graphical user interfaces, secure, and high performance, With Java, your job as a software developer is much easier—you focus your full attention on the end goal of shipping innovative products on time, based on the solid foundation of Java. The better way to develop software is here, now, brought to you by the Java language platform.Very dynamic languages like Lisp, TCL, and SmallTalk are often used for prototyping. One of the reasons for their success at this is that they are very robust—you don’t have to worry about freeing or corrupting memory.Similarly, programmers can be relatively fearless about dealing with memory when programming in Java, The garbage collection sy stem makes the programmer’s job vastly easier; with the burden of memory management taken off the programmer’s shoulders, storage allocation errors go away. Another reason commonly given that languages like Lisp, TCL, and SmallTalk are good for prototyping is that they don’t require you to pin down decisions early on—these languages are semantically rich.Java has exactly the opposite property: it forces you to make explicit choices. Along with these choices come a lot of assistance—you can write method invocations and, if you get something wrong, you get told about it at compile time. You don’t have to worry about method invocation error.The Java beginner must grasp 30 basic conceptsBasic conceptOOP the only relations is what the object’s interface, such as the computer seller he leaves alone internal structure of electrical source, but he is only concerned about that whether the power will be supplied to you, also so long as know can or not but is not how and procedures are make up of certain attribute and the behavior object, the different object visit invokes through the function invocation, between the object all intercommunion are invoke through the method invocation, By object data encapsulation, enhances reuse rate very much..OOP the most important thought is class, the class is the template ,is a blueprint, construct an object from a class, namely construct an instance of the class.3. Encapsulation: is that combines the data and the behavior in a package) and hides the data the realization process to the object user, in an object data is called its instance field.expands a class to obtain a new class is called inheritance, but all classes are constructed by the object super root class of expansion, super root class of as follows can make the introduction.3 principal characteristicsBehavior--- explained this object can make what.Tate--- when the object exerts the method object reflection.Dentity--- and other similar behavior objects discrimination symbols.Each object has only indentity and among three characteristics they affect mutually.6. Relations among classes:Use-a:Dependent relationHas-a:Polymerization relationIs-a: inheritor relation -- example:A class has inherited B class, this time A class not only has B class of method, but also has its own method(Individuality exists in general character)object use structure:Structure proposing, the structure is one special method, the structure object and to its initialization.Example:A Data class of structure calls DataNew Data () --- structure a new object, also initialize current time.Data happyday=new Data () --- an object evaluates an variable happyday, thus enables this object to be used many times, here be stated the cause variable and the object variable are different.New returns the value is a quotation.Constructor characteristic:The constructor may have 0, one or many parametersThe constructor and the class have the same nameA class may have many constructor. The constructor has not returned valueThe constructor always be together used with the new operator8. Over loading: When many methods have the same name when includes the different parameter, then has the over loading Which method does the compiler have to choose invokes.: Java allow one or many classes to become together as group, is called package, to organizing duty easily, the standard Java storehouse divides into many packages java, net and so on, the package is layered and all java packages are in java and in a javax package.10. Extendable thought: permit to construct new class on existing classes , when you extend the class which already existed, then you reuse this class of method and the field, at the same time you might add the new method and the field in the new class.class:The expandable class fully manifested is-a to extend the relations The form is:Class (subclass) extends (base class).12. Multi-modality: In java, the object variable is multi-modality But in java does not support multiple extend.combine: the mechanism of invoking object method mechanism.1) compiler examines object statement type and method name.2) the compiler examines that method invokes parameter type.3) static combine: If the method type is priavte static the final ,compiler can accurately know which method should invoke.4) when the procedure runs and uses dynamic combine to invoke a method, the method edition which then hypothesized machine must invoke x the object actual type which aims at to match.5) dynamic combine: is a very important characteristic, it can cause the procedure to change again may expand but does not need to translate has saved the code.class:In order to prevent other people derive the new class from yours class, this class is cannot expanded.dynamic invocation spend longer time than the static invocation expenditure.class:Stipulated or many abstract methods class of itself must define is abstract.Example: Public abstract string getDescripitionJava each class is be extended by object class.18. equal and toString method in object class .Equal uses in testing an object is whether equal with another object.ToString returns to represent this object the string of character, each class can nearly over loading this method, in order to returns to the current condition the correct expression.(The toString method is a very important method)programming:Any class of type all values all may replace with a object class of variable.array tabulates: The ArrayList dynamic array tabulates, is a class of storehouse, defines in uitl package, but automatic control array size.class and class of object ,getclass method returns to the class type an example, when the procedure start contains can increase in the main method class, hypothesized confidential increase all classes which he needs, each increase class all must increase the class which it needs.class: class might dynamic operate the java code for the compilation the procedure to provide the formidable function reflection, this function was JavaBeans is specially useful, the use reflected Java to be able to support the VB programmer to be familiar with the use the tool.1) when run analysis class ability.2) when run searches observes a class of object.3) realizes the general array operation code.4) provides the method object.But this mechanism mainly aims at the tool but not the application and the procedure.In the reflection mechanism most important part is that permits class that you inspect structure. With to API includes:Method pointer: Java does not have the method pointer, makes a method address another method, may invoke it in behind, but the interface is the better solution.23. interface: should showing class could do what but not to assign how to do, a class may realize one or many interfaces.interface is not a class, but is to conforms to a interface request class of set of standard.If realizes a interface to need 2 steps:1) the statement class needs to realize assigns the interface.2) provides in the interface all methods definition.Stated a class realizes a interface to need to use the implements key wordsClass actionB implements Comparable its actionb needs to provide the CompareTo method, the interface is not the class, cannot use a new example interface.class only then a super class, but a class can realize many interfaces. In a Java important interface: Cloneableinterface and call-back :to programs a commonly used pattern is call-back,in the pattern, you may refer when this class of pattern settled specific time occurs returns to adjusts on the object the method.Example:ActionListener interface monitor.Similar API includes:clone:The clone method is a object protection method, this meant your code cannot simple invoke it.class an inner class definition is the definition in another class.The reason is:1) an inner class object can visit founds its object realization, including private data.2) about other classes in the same package in that, inner class can be hided.3) the anonymous inner class may the very convenient definition accent.In 4) uses the category to be possible the extremely convenient compilation event driver.class (proxy):1) appointing all codes that interfaces request2) all methods (toString equals) that object class definetype:Java is kind of emphasizing type language, each variable all must be declared its types at first, in java altogether has 8 basic types . four kinds are the long, two kinds are the float, one is the char, being used in the Unicode code char, Boolean.1. java is simpleJava and C + + are very similar, but much simpler. All the high-level programming language features, is not absolutely necessary have been deleted. For example, Java does not overload operator, the title of the document, pre-processing, computing pointer, the structure of the joint, multi-dimensional array, templates and implicit type conversion. If you know a little C, C + + or Pascal, you will soon master Java. Here is a simple procedure JavaHelloWorld:publicclassHelloInternet (publicstaticvoidmain (Stringargv []) (System. out. println ( "HelloIn-ternet!")))2. Java is object-orientedJava is an object-oriented programming language. In addition to the simple types, such as digital and Boolean operators in addition, Java is an object of most. As with any object-oriented languages, Java code also organized by category. Each category provides a definition of the object behavior. Another type of succession can be a kind of behavior. In the category of the root level, often the target category. Java support for the single type of inherited hierarchy. This means that each category can only inherit one other category. Some of the language to allow multiple inheritance, but it may cause confusion and unnecessarily complicated language. For example, imagine that an object would inherit two completely different category. Java also supports the kind of summary of the interface. This allows programmers to define the interface methods, and do not have to rush immediately to determine the methods to achieve. A type of interface can be a number ofpurposes in order to truly multi-inheritance of a number of advantages. The implementation of an object can be any number of interfaces. IDL interface and Java interface very similar. Very easy to set up IDLJ compiler. In other words, Java can be used to create a CORBA object system distributed object system. In the view of many computer systems use IDL interface and CORBA objects, such compatibility is important.3. Java is a type of staticIn a Java program, it is essential to the definition used by the target (number of characters, such as an array) type. This will help programmers quickly found because the procedure when the compiler can detect the type of error. However, Java System objects are also dynamic types. A requirement for the type of dynamic is often possible, so programmers can write the procedures for different types of objects to do different things.4. Is a Java-based compilerWhen running Java programs, which were first compiled into byte code. Byte code is very similar to the machine instructions, so Java program is very efficient. However, the byte code does not specifically for a particular machine, so no need to recompile Java program can be in many different computer implementation. Java source code files were compiled into a category, which is equivalent to process byte code performance. In a Java class file, and an example for all of the variables are in the light of, and for the first time in the implementation of the code be resolved. This makes the code more common and more easily subject to revision, but still high.5. Java is architecture neutralJava language is the same for each computer. For example, simple types are the same: 32-bit integer always, always 64-bit long integers. It is strange, such as C and C + + programming language, and so fashionable it is not the case. As a result of these languages so the definition of freedom, each of the compiler and development environment will be different, so that this process nuisance become a transplant. Java programs can easily gain access to transplants, and there is no need to re-compile.6. Java is a soundJava program can not be caused by the collapse of the computer. Java careful testing of the system memory of each visit, make sure it is legitimate and will not cause any problems. However, even if the Java program may also be wrong. If there is some kind of unexpected things, the process will not collapse, and to abandon the exception. Procedures for such an exception would be found to address them. Traditional computer programs can access the full memory. May (unconsciously) to amend any of the value of memory, which will causeproblems. Java program can only access memory to allow them access to those parts of the Java program can not modify it does not seek to change the value.7. Java is a compactAs the Java is designed to run on a small computer, as a programming language for the system is relatively small. It effectively in more than 4MB of RAM to run on PC machine. Java translator occupied by only a few hundred KB. This translator for the Java platform independence and portability is reliable. Due to Java is very small, it is a very small computer memory, such as the Java-based PC, as well as television sets, ovens, telephone and home computer, and so on, it is ideal.8. Java is a multi-threadedJava program can run more than one thread. For example, it can be a thread in atime-consuming to complete the calculation, and other users to interact with the threads of dialogue. Therefore, users do not have to stop working, waiting for the Java computing time-consuming process. In the multi-threaded programming environment, it is often difficult because many things may occur at the same time. However, Java provideseasy-to-use features simultaneously, so that the programming easier.中文翻译JAVA介绍作者:Martin Ngobye.出处:Computing Static Slice for Java ProgramsJava是被设计用来解决在上下文分布式的异构网络中应用程序开发的问题。

相关文档
最新文档