Visualjvm: a Visual Tool for Teaching Java Technology

Visualjvm: a Visual Tool for Teaching Java Technology

IEEE TRANSACTIONS ON EDUCATION, VOL. 51, NO. 1, FEBRUARY 2008 VisualJVM: A Visual Tool for Teaching Java Technology Pedro Pablo Garrido Abenza, Angel Grediaga Olivo, and Bernardo Ledesma Latorre Reference • ASCII Text Garrido Abenza, Pedro Pablo; Grediaga Olivo, Angel; Ledesma Latorre, Bernardo; "VisualJVM: a visual tool for teaching Java technology", Education, IEEE Transactions on, Vol.51, no.1, pp.86-92, Feb. 2008 • BibTex @ARTICLE{visualjvm2008, author = {Garrido Abenza, P.~Pablo and Grediaga Olivo, Angel and Ledesma Latorre, Bernardo}, title = "{VisualJVM: a visual tool for teaching Java technology}", journal = {Education, IEEE Transactions on}, year = {Feb. 2008}, volume = {51}, number = {1}, pages = {86-92}, doi = {10.1109/TE.2007.906601}, ISSN = {0018-9359} } Abstract This paper presents a laboratory session of an Advanced Programming course to introduce students to the technology involved with the Java programming language. In this special lab session the educational software tool VisualJVM is used, providing a graphical front-end to a Java virtual machine (JVM). This tool helps students learn about JVM architecture, learn how JVM works, and consequently, to understand why a Java program is platform independent. The student reaction to this experience was very positive and the authors are planning to use the tool in other contexts. ©2008 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE. Digital Object Identifier 10.1109/TE.2007.906601 86 IEEE TRANSACTIONS ON EDUCATION, VOL. 51, NO. 1, FEBRUARY 2008 VisualJVM: A Visual Tool for Teaching Java Technology Pedro Pablo Garrido Abenza, Angel Grediaga Olivo, and Bernardo Ledesma Latorre Abstract—This paper presents a laboratory session of an any time the internal state of the interpreter in a graphic and Advanced Programming course to introduce students to the interactive mode. So VisualJVM is composed of the Java inter- technology involved with the Java programming language. In this preter and the front-end; the former works as a back-end and special lab session the educational software tool VisualJVM is used, providing a graphical front-end to a Java virtual machine is able to run together with or without the front-end. However, (JVM). This tool helps students learn about JVM architecture, the use of this tool revealed that VisualJVM was very suitable learn how JVM works, and consequently, to understand why a for teaching some theoretical concepts involved with the Java Java program is platform independent. The student reaction to programming language. Because of this the front-end was this experience was very positive and the authors are planning to improved, giving special attention to factors like usability and use the tool in other contexts. readability, and a set of laboratory exercises were developed Index Terms—Educational technology, Java language, ob- and successfully integrated into an Advanced Programming ject-oriented programming (OOP), program interpreters, user course for Telecommunications Engineering degrees at Miguel interfaces. Hernandez University, Elche, Spain. Whereas the authors use this tool to debug the source code of their own JVM imple- I. MOTIVATION mentation, the students use VisualJVM as an educational tool to learn Java technology. ITH the explosion of the Internet and the demand for This paper is focused particularly on the benefits of Wplatform independent software, Java technology has VisualJVM as an educational tool, and is structured as follows. grown in popularity. Java has a wide range of applications and First, Section II examines other related tools and discusses the target platforms, ranging from PCs and Web servers to em- advantages of VisualJVM. Section III presents the lab session, bedded devices and smart cards. Thus, there is a strong demand while Section IV details the first exercise developed, and de- for knowledgeable Java programming engineers. Therefore, scribes the use of the VisualJVM tool. The results of the student Java programming courses have been introduced into many evaluation of the effectiveness of VisualJVM in enhancing the curricula. Java is not only a programming language, but also a learning process are discussed in Section V. Finally, Section VI set of specialized platforms that are also known as Java runtime consists of concluding remarks and future plans. environments (JRE), which are necessary to execute Java programs. JRE is composed of the Java library of classes [Java II. RELATED TOOLS application programming interface (API) implementation] and a Java program interpreter. The interpreter, also called Java Existing tools, like jclasslib Bytecode Viewer and Class virtual machine (JVM), is a program implemented for a specific Viewer for Java, could help in achieving the goals of this lab platform that executes the multiplatform sequence of bytes session. However, these tools only show static information generated by a Java compiler (bytecodes). This unique feature about Java compiled classes; they do not show the internal state is the basis of the platform independence of Java programs, and of the JVM during the execution of a Java program. can be difficult to understand for many students, even those There are other tools that can be used to trace the execution able to write Java programs [1]. of Java programs. Loggers, like Java Logging API and log4j, The primary motivation for the development of VisualJVM need to modify the source code so as to collect information at was to provide a graphical user interface (GUI) or front-end execution time. In contrast, since VisualJVM works with .class to a JVM implementation, which had been developed from files (like any other JVM), a user can work with Java programs scratch by the authors for research purposes. The role of the even when their source code is not available. Tracers, debug- front-end was to facilitate the debugging and testing of the gers and profiler tools have been developed using Java platform extensive source code written in C. This front-end shows at debugger architecture (JPDA), including JTracor, jLouiss, Java- TraceIt! [2], extensible Java profiler (EJP), JProfiler, or hprof. None of these tools require a recompilation of the Java source Manuscript received August 11, 2006; revised June 14, 2007. code. However, much as in integrated development environ- P. P. Garrido Abenza is with the Department of Physics and Computer ments (IDEs) such as Microsoft Visual Studio (which includes Architecture, Miguel Hernandez University, 03202 Elche, Spain (e-mail: [email protected]). Visual J#), Borland JBuilder, VisualCafe, NetBeans, or Eclipse, A. Grediaga Olivo and B. Ledesma Latorre are with the Department they work at the source code level and they do not show the inner of Computing and Information Technology, University of Alicante, 03690 workings of the JVM. San Vicente del Raspeig, Alicante, Spain (e-mail: [email protected]; [email protected]). Javy [3] is a virtual environment that simulates the JVM, and Digital Object Identifier 10.1109/TE.2007.906601 allows users to learn the JVM structure and the Java language 0018-9359/$25.00 © 2008 IEEE GARRIDO ABENZA et al.: VISUALJVM: A VISUAL TOOL FOR TEACHING JAVA TECHNOLOGY 87 compilation. A Java class visualization tool has also been de- other words, to distinguish CPU-specific machine code veloped [4] that allows interaction with a visualization of any from platform-independent bytecodes. Java class through the instantiation of objects. Several applets • Objective #2 (LO#2): To understand why a Java program that simulate JVM executing a few bytecode instructions are is platform independent. Students will prove to them- included in [5]. Unlike these tools, VisualJVM is not a simu- selves that, unlike the C programming language, a Java lator; when a Java program is loaded by the Java interpreter program can be executed under two different operating that program really is executed. In other words, VisualJVM has systems (OSs) without recompiling the source code. many of the benefits but none of the limitations of a simulation • Objective #3 (LO#3): To differentiate the concepts of tool [6], [7]. JVM, JRE, and the Java development kit (JDK), which Moreover, nearly all the previously mentioned tools have are often confused by students. normally been developed for only one target platform, whereas 2) Inside the JVM: Part 2 addresses issues related to the in- VisualJVM is highly platform-independent because JVM is ternal structure of the JVM. The goal is for students to get written in standard C and the front-end is based on the Qt 4.0 a general overview of how the Java programming language Opensource toolkit [8]. Such a front-end cannot be found in is implemented, since this is an unknown area for them. common JVM implementations (e.g., Sun Microsystems’ JDK • Objective #4 (LO#4): To interpret the structure of the [9], IBM Jikes research virtual machine (RVM) [10], [11], class file format, which defines the representation of a Kaffe [12], Joeq [13], etc.). Specifically, the Jikes RVM is used Java class. Students will be able to recognize binary files in many teaching courses such as Advanced Compiler Tech- representing a Java class. niques, Advanced Object-Oriented Programming, Compiler • Objective #5 (LO#5): To become familiar with the JVM Design and Optimization, etc. However, to the knowledge of instruction set (opcodes). The JVM has a complex in- the authors, VisualJVM is the first JVM including a graphical struction set computer (CISC) architecture because JVM interface that visualizes the internal state and the behavior of supports about 200 instructions, in contrast to the re- a real JVM. Thus, VisualJVM is very suitable for teaching duced instruction set computer (RISC), which supports purposes. fewer instructions. Java class files are, therefore, very compact.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us