欢迎来到毕设资料网! | 帮助中心 毕设资料交流与分享平台
毕设资料网
全部分类
  • 毕业设计>
  • 毕业论文>
  • 外文翻译>
  • 课程设计>
  • 实习报告>
  • 相关资料>
  • ImageVerifierCode 换一换
    首页 毕设资料网 > 资源分类 > DOC文档下载
    分享到微信 分享到微博 分享到QQ空间

    计算机专业毕业外文翻译--使用 Eclipse 远程调试 Java 应用程序

    • 资源ID:129951       资源大小:606.50KB        全文页数:19页
    • 资源格式: DOC        下载积分:100金币
    快捷下载 游客一键下载
    账号登录下载
    三方登录下载: QQ登录
    下载资源需要100金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

    计算机专业毕业外文翻译--使用 Eclipse 远程调试 Java 应用程序

    1、Debug Java applications remotely with Eclipse Use the power of the Eclipse IDE to spread around your Java application debugging Level: Intermediate Charles Lu (), Software Engineer, IBM 09 Dec 2008 You dont need to debug Java applications on just your local desktop. Learn how to spread around your d

    2、ebugging using different connection types that make up remote debugging. This article explains the features and examples that show how to set up remote application debugging. Remote debugging can be useful for application development, such as developing a program for a low-end machine that cannot ho

    3、st the development platform, or debugging programs on dedicated machines like Web servers, whose services cannot be shut down. Other examples include Java applications running with limited memory or CPU power, such as mobile devices, or developers wanting to separate the application and development

    4、environments, etc. Prerequisites If you dont have it already, download Eclipse V3.4 (Ganymede). In Ganymede, the socket listening connector has been added to the Remote Java Application launch-configuration type. Eclipses new socket listening connector allows you to start the Java debugger, which li

    5、stens for a connection on a specific socket. The program being debugged can then be started with command-line options to connect to the debugger. Prior to the Ganymede release, only a socket-attaching connector was provided, and the program being debugged had to be a debug host that was connected by

    6、 the debugger. It is impractical for mobile devices to be a host due to insufficient memory and CPU power. To use remote debugging, Java Virtual Machine (JVM) V5.0 or later must be used, such as IBM J9 or Sun Microsystems Java SE Development Kit (JDK). In this article, we focus on remote debugging,

    7、rather than detail each of Eclipses debugging features. See Resources for more information about debugging with Eclipse and where to find the aforementioned software. JPDA introduction Sun Microsystems Java Platform Debugger Architecture (JPDA) technology is a multitiered architecture that allows yo

    8、u to debug Java applications in all situations easily. The JPDA consists of two interfaces (the JVM Tool Interface and JDI, respectively), a protocol (Java Debug Wire Protocol), and two software components that tie them together (back-end and front-end). Its designed for use by debuggers in any envi

    9、ronment. JPDA is not only for desktop systems but works well with embedded systems, too. The JVM Tool Interface (JVMTI) defines that a VM must provide for debugging. (Editors note: Starting with Java V5, JVMTI replaced JVMDI, which was used in Java V1.4.) The Java Debug Wire Protocol (JDWP) describe

    10、s the format of debugging information and requests transferred between the process being debugged and a debugger front end, which implements the JDI, such as Eclipse, Borland JBuilder, and Launch-configuration type A launch configuration keeps a set of attributes that can be used to launch a program

    11、. The launch-configuration type is a unique type of program that can be launched in the Eclipse platform. Frequently used acronyms JDI Java Debug Interface JDT Java Development Tools JDWP Java Debug Wire Protocol JPDA Java Platform Debugger Architecture JVM Java Virtual Machine JVMDI JVM Debug Inter

    12、face JVMTI JVM Tool Interface VM Virtual Machine many others. The program being debugged is often called the debuggee in Suns JPDA specification. The JDI is a high-level interface to define the information and requests used for remote debugging. The architecture is structured as follows. Listing 1.

    13、The Java Platform Debugger Architecture Components Debugger Interfaces / |-| / | VM | debuggee -( |-| - JVMTI - Java VM Tool Interface | back-end | |-| / | comm channel -( | - JDWP - Java Debug Wire Protocol | / |-| / | front-end | debugger -( |-| - JDI - Java Debug Interface | UI | |-| Therefore, a

    14、ny third-party tools and VM based on JPDA should work together without complaint. This client-server architecture allows you to debug a Java program from a local workstation running the platform, or even debug it from a remote computer on your network. Before talking about the debug-scenario stuff,

    15、we need to introduce two terms used in the JPDA specification: connector and transport. A connector is a JDI abstraction used to establish a connection between a debugger application and a target VM. A transport defines how applications access and transmit data between the front end and back end. Th

    16、e connectors map to the available transport types and the modes of connection. In Suns reference implementation of JPDA, two transport mechanisms are provided on Microsoft Windows: socket transport and shared memory transport. Available connectors: Socket-attaching connector Shared-memory attaching

    17、connector Socket-listening connector Shared-memory listening connector Command-line launching connector In establishing a connection between a debugger application and target VM, one side acts as a server and listens for a connection. At some later time, the other side attaches to the listener and e

    18、stablishes a connection. The connections allow the debugger application or the target VM to act as a server. The communications among processes can be running on one machine or different machines. The problem with debugging a Java program remotely is not in the debugger front end but the remote Java

    19、 back end. Unfortunately, there is not much information about this in the Eclipse help system. In fact, JDI and JVMTI are implemented by Eclipse and the Java runtime environment, respectively. The only thing we are concerned with is the JDWP, which contains the information to communicate with the JV

    20、MTI and JDI. The JDWP contains many arguments that have been added to invoke the application for the remote Java application. Following are some of the arguments used in this article. -Xdebug Enables debugging features. -Xrunjdwp: Loads the implementation of JDWP in the target VM. It uses a transpor

    21、t and the JDWP protocol to communicate with a separate debugger application. Specific suboptions are described below. Starting from Java V5, you can use the -agentlib:jdwp option, instead of -Xdebug and -Xrunjdwp. But if you have to connect to the VM prior to V5, -Xdebug and -Xrunjdwp will be the on

    22、ly choice. Following are brief descriptions of the -Xrunjdwp suboptions. transport Generally, socket transport is used. But shared-memory transport can also be used on the Windows platform, if available. server If the value is y, the target application listens for a debugger application to attach. O

    23、therwise, it attaches to a debugger application at the specified address. address This is the transport address for the connection. If the server is n, attempt to attach to a debugger application at this address. Otherwise, listen for a connection at this port. suspend If the value is y, the target

    24、VM will be suspended until the debugger application connects. For detailed explanations for each debug setting, refer to the JPDA documentation (see Resources). Listing 2 shows an example of how to launch a VM in debug mode and listen for a socket connection at port 8765. Listing 2. Target VM acts a

    25、s a debug server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8765 Listing 3 shows how to attach to a running debugger application using a socket on host 127.0.0.1 at port 8000. Listing 3. Target VM acts as a debug client -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000 Remote

    26、debugging features in Eclipse Eclipse is a graphical Java debugger front end. The JDI is implemented in org.eclipse.jdt.debug bundle. In this article, we dont discuss the details of JDI implementation. See Resources for information about Eclipse JDT and Java JDI technology. The first thing we want t

    27、o know is which Eclipse connector to use. To learn the remote connection types provided by Eclipse, you can add a launch configuration in Remote Java Application by going to the Eclipse menu and selecting Run Debug Configurations., then selecting the connector from the dropdown list. Two connectors are provided in Ganymede:


    注意事项

    本文(计算机专业毕业外文翻译--使用 Eclipse 远程调试 Java 应用程序)为本站会员(泛舟)主动上传,毕设资料网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请联系网站客服QQ:540560583,我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们
    本站所有资料均属于原创者所有,仅提供参考和学习交流之用,请勿用做其他用途,转载必究!如有侵犯您的权利请联系本站,一经查实我们会立即删除相关内容!
    copyright@ 2008-2025 毕设资料网所有
    联系QQ:540560583