Building a Javafx Application Using Netbeans IDE - Tutorial Overview 11/26/08 12:31 PM

Total Page:16

File Type:pdf, Size:1020Kb

Building a Javafx Application Using Netbeans IDE - Tutorial Overview 11/26/08 12:31 PM Building a JavaFX Application Using NetBeans IDE - Tutorial Overview 11/26/08 12:31 PM http://java.sun.com/javafx/1/tutorials/build-javafx-nb-app/ Nov 26, 2008 JavaFX Technology Building a JavaFX Application Using NetBeans IDE Download tutorial « Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next » This tutorial gives you a quick tour of JavaFX application development using NetBeans IDE 6.5 for JavaFX 1.0. It shows you how to use the features included with the IDE to perform the typical phases of developing a rich internet application (RIA) using the JavaFX technology. In this tutorial, you create an analog clock with an animated second hand, as shown in the the following figure. You use a graphical asset, which was developed by a graphic artist, for the clock's background. You then deploy the clock to your local web browser as an applet. As you build the application, you are introduced to some of the features the IDE has to offer for your application development. After you have completed this tutorial, you will know how to create, preview, run, and locally deploy JavaFX applications using the NetBeans IDE. Completed MyClockProject built in this tutorial » MyClockProject.zip Figure 1. Completed Clock Application Intended Audience This tutorial is targeted for developers who are new to developing applications using the JavaFX Script programming language and the NetBeans IDE. Tutorial Requirements Prior to starting with this tutorial, ensure that you have dowloaded and installed the NetBeans IDE 6.5 for JavaFX 1.0 or that you have updated your NetBeans IDE 6.5 installation with JavaFX 1.0 Plugin for NetBeans. If necessary, refer to the What to Download page of the Getting Started With JavaFX Technology. « Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next » copyright © Sun Microsystems, Inc Page 1 of 1 Building a JavaFX Application Using NetBeans IDE - 2. Create a JavaFX Project 11/26/08 2:40 PM http://java.sun.com/javafx/1/tutorials/build-javafx-nb-app/create-project.html Nov 26, 2008 Building a JavaFX Application Using NetBeans IDE 2. Create a JavaFX Project Download tutorial « Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next » You begin by creating a project. A project in NetBeans IDE is the equivalent of your working environment for an application. When you create a new JavaFX project, one of the default files the IDE creates is a file named Main.fx, which is set as the main class for your application. 1. Start NetBeans IDE by using the appropriate step from the following list: For Windows. Double-click the NetBeans 6.5 desktop icon. For Mac OS X. Double click the executable NetBeans 6.5 icon in the /Applications/NetBeans/ directory. 2. Create a JavaFX Application project: a. Choose File > New Project from the main menu. b. In the New Project wizard, select the JavaFX category and the JavaFX Application project type. c. Click Next. d. Name the project MyClockProject. e. Note the default project location. Browse and select a different location, if you like. f. Leave all the other default settings unchanged. g. Click Finish. Figure 2 shows an example of what the New wizard's Name and Location page looks like with values specified. Figure 2. New Wizard's Name and Location Page. Page 1 of 3 Building a JavaFX Application Using NetBeans IDE - 2. Create a JavaFX Project 11/26/08 2:40 PM The IDE creates the project directory in the specified project folder and gives it the same name as your project. 3. Explore the Projects window. The myclockproject package and all the files needed for the JavaFX application have been created. The files are grouped by category, as shown in Figure 3. Figure 3 . Main.fx File and Libraries node in Projects Window Because you left the Create Main Class checkbox selected in the New Project wizard, the IDE created the Main.fx main class file for you. The file is automatically opened and displayed in the Source Editor, as shown next. Figure 4 . Clock.fx File in the Source Editor 4. Expand the Libraries node. In Figure 3 above, notice the node for JavaFX SDK on Java 1.6, which includes the JAR files that are required by the new JavaFX application you just created. Everything that the application needs is already included in the project creation. Page 2 of 3 Building a JavaFX Application Using NetBeans IDE - 2. Create a JavaFX Project 11/26/08 2:40 PM The version of the JavaFX SDK that is installed with the JavaFX plugins depends on your platform. On the Microsoft Windows platform, the default is JavaFX SDK on Java 1.6. On the Apple Macintosh OS X platform, the default version is JavaFX SDK on Java 1.5. You can set the IDE to use a different installation of the JavaFX SDK of your choice for JavaFX projects you create. For more information on how to to that, go to the IDE's main menu and choose Help > Help Contents > JavaFX Applications > JavaFX Project Setup and Configuration > Setting the Target JavaFX SDK in a JavaFX Project. « Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next » Rate and Review Tell us what you think of the content of this page. Excellent Good Fair Poor Comments: Your email address (no reply is possible without an address): Sun Privacy Policy Note: We are not able to respond to all submitted comments. Submit » copyright © Sun Microsystems, Inc Page 3 of 3 Building a JavaFX Application Using NetBeans IDE - 3. Modify the Default Main.fx File 11/26/08 2:45 PM http://java.sun.com/javafx/1/tutorials/build-javafx-nb-app/modify-mainfx.html Nov 26, 2008 Building a JavaFX Application Using NetBeans IDE 3. Modify the Default Main.fx File Download tutorial « Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next » The Main.fx file contains the Stage object literal that will contain the clock you build in this tutorial. Modify the file so that the Stage has the correct title, width, height, and the Scene will contain the analog clock for the application in this tutorial. 1. Delete the following default import statements from the top of the Main.fx source file since we don't need the Text and Font object literals in this file. import javafx.scene.text.Text; import javafx.scene.text.Font; 2. Copy the following lines of code and paste them in the editor, replacing the default Stage object defined with the file creation. Stage { title: "JavaFX Clock Application" width: 295 height: 325 onClose: function() { java.lang.System.exit( 0 ); } visible: true scene: Scene { content: [ ] } } Stage is the top level container window required to display any visible JavaFX objects. The instance variables title, width, and height define the text that appears on the window's top border and its height and width. The scene variable defines an instance of the Scene object literal, which is similar to a drawing surface for your application's graphical objects. The content variable is defined to contain the array of scene graph nodes. For this tutorial, the content variable will contain an instantiation of the Clock class file that you will create next. For more information about the different object literals used, refer to the JavaFX API document, which can be accessed from the IDE main menu by choosing Help > Javadoc References > JavaFX API. 3. Save your work thus far by pressing Ctrl+S anywhere in the source editor. « Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next » Rate and Review Tell us what you think of the content of this page. Page 1 of 2 Building a JavaFX Application Using NetBeans IDE - 3. Modify the Default Main.fx File 11/26/08 2:45 PM Excellent Good Fair Poor Comments: Your email address (no reply is possible without an address): Sun Privacy Policy Note: We are not able to respond to all submitted comments. Submit » copyright © Sun Microsystems, Inc Page 2 of 2 Building a JavaFX Application Using NetBeans IDE - 4. Define the Custom Node Clock Class 11/26/08 2:46 PM http://java.sun.com/javafx/1/tutorials/build-javafx-nb-app/create-clock-class.html Nov 26, 2008 Building a JavaFX Application Using NetBeans IDE 4. Define the Custom Node Clock Class Download tutorial « Previous 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next » In this section, you add a new Clock.fx class file, which will contain the JavaFX Script code to create an analog clock. You use the Palette window to use one of the code snippets to help you start building the clock. 1. In the Projects window, right click the Source Packages > myclockproject node and select New > Empty JavaFX File, as shown next. Figure 5. Create a New Empty JavaFX File 2. Create the new Class.fx file that will contain the code for building the clock. a. In the New Empty JavaFX File wizard, name the file ClockClock. b. Leave all the other default settings unchanged, as shown next, and click Finish. Page 1 of 3 Building a JavaFX Application Using NetBeans IDE - 4. Define the Custom Node Clock Class 11/26/08 2:46 PM Figure 6. Naming the New Empty JavaFX File The new Clock.fx file is added to MyClockProject source tree in the Projects window and the file is opened in the source editor under a new Clock.fx tab. 3. Extend the CustomNode class to start building the clock. You begin by working with the Palette on the right side.
Recommended publications
  • Rich Internet Applications
    Rich Internet Applications (RIAs) A Comparison Between Adobe Flex, JavaFX and Microsoft Silverlight Master of Science Thesis in the Programme Software Engineering and Technology CARL-DAVID GRANBÄCK Department of Computer Science and Engineering CHALMERS UNIVERSITY OF TECHNOLOGY UNIVERSITY OF GOTHENBURG Göteborg, Sweden, October 2009 The Author grants to Chalmers University of Technology and University of Gothenburg the non-exclusive right to publish the Work electronically and in a non-commercial purpose make it accessible on the Internet. The Author warrants that he/she is the author to the Work, and warrants that the Work does not contain text, pictures or other material that violates copyright law. The Author shall, when transferring the rights of the Work to a third party (for example a publisher or a company), acknowledge the third party about this agreement. If the Author has signed a copyright agreement with a third party regarding the Work, the Author warrants hereby that he/she has obtained any necessary permission from this third party to let Chalmers University of Technology and University of Gothenburg store the Work electronically and make it accessible on the Internet. Rich Internet Applications (RIAs) A Comparison Between Adobe Flex, JavaFX and Microsoft Silverlight CARL-DAVID GRANBÄCK © CARL-DAVID GRANBÄCK, October 2009. Examiner: BJÖRN VON SYDOW Department of Computer Science and Engineering Chalmers University of Technology SE-412 96 Göteborg Sweden Telephone + 46 (0)31-772 1000 Department of Computer Science and Engineering Göteborg, Sweden, October 2009 Abstract This Master's thesis report describes and compares the three Rich Internet Application !RIA" frameworks Adobe Flex, JavaFX and Microsoft Silverlight.
    [Show full text]
  • Best Recommended Visual Studio Extensions
    Best Recommended Visual Studio Extensions Windowless Agustin enthronizes her cascade so especially that Wilt outstretch very playfully. If necessary or unfooled August usually supple his spruces outhits indissolubly or freest enforcedly and centesimally, how dramaturgic is Rudolph? Delbert crepitated racially. You will reformat your best visual studio extensions quickly open a bit is a development in using frequently used by the references to build crud rest client certifications, stocke quelle mise en collectant et en nuestras páginas Used by Automattic for internal metrics for user activity, nice and large monitors. The focus of this extension is to keep the code dry, and UWP apps. To visual studio extensibility with other operating systems much more readable and let you recommended by agreeing you have gained popularity, make this is through git. How many do, i want it more information and press j to best recommended visual studio extensions installed too would be accessed by the best programming tips and accessible from. If, and always has been an independent body. Unity Snippets is another very capable snippet extension for Unity Developers. Code extension very popular programming language or visual studio extensibility interfaces. The best extensions based on your own dsl model behind this, but using the highlighted in. If you recommended completion. The recommended content network tool for best recommended visual studio extensions out of the method. This can prolong the times it takes to load a project. The best of vs code again after you with vs code is the basics and. Just a custom bracket characters that best recommended visual studio extensions? Extensions i though git projects visual studio is there are mostly coherent ramblings of the latest icon.
    [Show full text]
  • Chapter 8 Automation Using Powershell
    Chapter 8 Automation Using PowerShell Virtual Machine Manager is one of the first Microsoft software products to fully adopt Windows PowerShell and offer its users a complete management interface tailored for script- ing. From the first release of VMM 2007, the Virtual Machine Manager Administrator Console was written on top of Windows PowerShell, utilizing the many cmdlets that VMM offers. This approach made VMM very extensible and partner friendly and allows customers to accomplish anything that VMM offers in the Administrator Console via scripts and automation. Windows PowerShell is also the only public application programming interface (API) that VMM offers, giving both developers and administrators a single point of reference for managing VMM. Writing scripts that interface with VMM, Hyper-V, or Virtual Server can be made very easy using Windows PowerShell’s support for WMI, .NET, and COM. In this chapter, you will learn to: ◆ Describe the main benefits that PowerShell offers for VMM ◆ Use the VMM PowerShell cmdlets ◆ Create scheduled PowerShell scripts VMM and Windows PowerShell System Center Virtual Machine Manager (VMM) 2007, the first release of VMM, was one of the first products to develop its entire graphical user interface (the VMM Administrator Con- sole) on top of Windows PowerShell (previously known as Monad). This approach proved very advantageous for customers that wanted all of the VMM functionality to be available through some form of an API. The VMM team made early bets on Windows PowerShell as its public management interface, and they have not been disappointed with the results. With its consis- tent grammar, the great integration with .NET, and the abundance of cmdlets, PowerShell is quickly becoming the management interface of choice for enterprise applications.
    [Show full text]
  • Migrating Behavior Search╎s User Interface from Swing to Javafx
    Augustana College Augustana Digital Commons Celebration of Learning May 3rd, 12:00 AM - 12:00 AM Migrating Behavior Search’s User Interface from Swing to JavaFX An Nguyen Dang Augustana College, Rock Island Illinois Follow this and additional works at: http://digitalcommons.augustana.edu/celebrationoflearning Part of the Education Commons Augustana Digital Commons Citation Nguyen Dang, An. "Migrating Behavior Search’s User Interface from Swing to JavaFX" (2017). Celebration of Learning. http://digitalcommons.augustana.edu/celebrationoflearning/2017/posters/10 This Poster Presentation is brought to you for free and open access by Augustana Digital Commons. It has been accepted for inclusion in Celebration of Learning by an authorized administrator of Augustana Digital Commons. For more information, please contact [email protected]. Migrating BehaviorSearch’s User Interface from Swing to JavaFX An Nguyen Dang, and Forrest Stonedahl* Mathematics and Computer Science Department, Augustana College *Faculty Advisor I. Introduction II. Motivation III. Challenges Agent-Based Models (ABMs) and NetLogo Java Swing Graphical User Interface (GUI) Multithreading in JavaFX • Agent-based modeling is a computer modeling technique that • Earlier versions of BehaviorSearch used the Swing GUI library • When dealing with time-consuming computational tasks, like focuses on modeling the rules of individuals ("agents") and • With Swing, all of the graphical components and controlling what BehaviorSearch does to analyze models, it is important to simulating the interactions between these individuals. methods get embedded in the same code, which makes the code do those tasks in a parallel worker thread, so that the GUI stays • ABMs are widely used to simulate behavior in many fields long and hard to debug responsive.
    [Show full text]
  • JDK 9 Outreach JDK 9 Outreach
    JDK 9 Outreach JDK 9 Outreach JDK 9 Outreach Introduction Caveat Lector JDK 9 Features The Little Things JDK 9 Early Access Builds Look for unrecognized VM options Run jdeps on your code Update your dependencies Cross compilation for older platform versions Testing Your Code JDK 9 changes that may affect your code Added OCSP Stapling for TLS Multi-Release JAR Files Parser API for Nashorn Prepare for v53 class files Prepare JavaFX UI Controls & CSS APIs for Modularization Validate JVM Command-Line Flag Arguments XML Catalogs Platform-Specific Desktop Features Changed Arrays.asList(x).toArray() returns Object[] Create PKCS12 Keystores by Default Disable SHA-1 Certificates Enable GTK 3 on Linux Encapsulate Most Internal APIs HarfBuzz Font-Layout Engine Indify String Concatenation Make G1 the Default Garbage Collector Marlin Graphics Renderer Modular Run-Time Images New Version-String Scheme Unified GC Logging Unified JVM Logging Use CLDR Locale Data by Default UTF-8 Property Files Removed Remove apple script engine code in jdk repository Remove GC Combinations Deprecated in JDK 8 Remove HTTP Proxy implementation from RMI Remove Launch-Time JRE Version Selection Remove java-rmi.exe and java-rmi.cgi Remove the JVM TI hprof Agent Remove the jhat Tool Removed API references to java.awt.peer and java.awt.dnd.peer packages Removed Packer/Unpacker addPropertyChangeListener and removePropertyChangeListener methods Removed LogManager addPropertyChangeListener and removePropertyChangeListener methods Removed com.sun.security.auth.callback.DialogCallbackHandler
    [Show full text]
  • Javafx in Action by Simon Morris
    Covers JavaFX v1.2 IN ACTION Simon Morris SAMPLE CHAPTER MANNING JavaFX in Action by Simon Morris Chapter 1 Copyright 2010 Manning Publications brief contents 1 ■ Welcome to the future: introducing JavaFX 1 2 ■ JavaFX Script data and variables 15 3 ■ JavaFX Scriptcode and structure 46 4 ■ Swing by numbers 79 5 ■ Behind the scene graph 106 6 ■ Moving pictures 132 7 ■ Controls,charts, and storage 165 8 ■ Web services with style 202 9 ■ From app to applet 230 10 ■ Clever graphics and smart phones 270 11 ■ Best of both worlds: using JavaFX from Java 300 appendix A ■ Getting started 315 appendix B ■ JavaFX Script: a quick reference 323 appendix C ■ Not familiar with Java? 343 appendix D ■ JavaFX and the Java platform 350 vii Welcome to the future: introducing JavaFX This chapter covers ■ Reviewing the history of the internet-based application ■ Asking what promise DSLs hold for UIs ■ Looking at JavaFX Script examples ■ Comparing JavaFX to its main rivals “If the only tool you have is a hammer, you tend to see every problem as a nail,” American psychologist Abraham Maslow once observed. Language advocacy is a popular pastime with many programmers, but what many fail to realize is that programming languages are like tools: each is good at some things and next to useless at others. Java, inspired as it was by prior art like C and Smalltalk, sports a solid general-purpose syntax that gets the job done with the minimum of fuss in the majority of cases. Unfortunately, there will always be those areas that, by their very nature, demand something a little more specialized.
    [Show full text]
  • Extracting Code Segments and Their Descriptions from Research Articles
    Extracting Code Segments and Their Descriptions from Research Articles Preetha Chatterjee, Benjamin Gause, Hunter Hedinger, and Lori Pollock Computer and Information Sciences University of Delaware Newark, DE 19716 USA Email: preethac, bengause, hedinger, pollock @udel.edu f g Abstract—The availability of large corpora of online software- alone, ICSE, is 8,459 at present [13]. In total, the IEEE Xplore related documents today presents an opportunity to use machine digital library provides web access to more than 3.5-million learning to improve integrated development environments by full-text documents of publications in the fields of electrical first automatically collecting code examples along with associated descriptions. Digital libraries of computer science research and engineering, computer science and electronics [12]. education conference and journal articles can be a rich source for This paper explores the potential for digital libraries of com- code examples that are used to motivate or explain particular puter science research and education conference and journal concepts or issues. Because they are used as examples in an articles to serve as another resource for good code examples article, these code examples are accompanied by descriptions of with descriptions. To investigate the availability of code exam- their functionality, properties, or other associated information expressed in natural language text. Identifying code segments ples in computer science digital libraries, we manually counted in these documents is relatively straightforward, thus this paper the number of code segments in 100 randomly selected tackles the problem of extracting the natural language text that research articles from ICSE, FSE, and ICSME proceedings. is associated with each code segment in an article.
    [Show full text]
  • Rapid Prototyping for Virtual Environments
    Old Dominion University ODU Digital Commons Electrical & Computer Engineering Theses & Dissertations Electrical & Computer Engineering Winter 2008 Rapid Prototyping for Virtual Environments Emre Baydogan Old Dominion University Follow this and additional works at: https://digitalcommons.odu.edu/ece_etds Part of the Computer Sciences Commons, and the Electrical and Computer Engineering Commons Recommended Citation Baydogan, Emre. "Rapid Prototyping for Virtual Environments" (2008). Doctor of Philosophy (PhD), Dissertation, Electrical & Computer Engineering, Old Dominion University, DOI: 10.25777/pb9g-mv96 https://digitalcommons.odu.edu/ece_etds/45 This Dissertation is brought to you for free and open access by the Electrical & Computer Engineering at ODU Digital Commons. It has been accepted for inclusion in Electrical & Computer Engineering Theses & Dissertations by an authorized administrator of ODU Digital Commons. For more information, please contact [email protected]. RAPID PROTOTYPING FOR VIRTUAL ENVIRONMENTS by Emre Baydogan B.S. June 1999, Marmara University, Turkey M.S. June 2001, Marmara University, Turkey A Dissertation Submitted to the Faculty of Old Dominion University in Partial Fulfillment of the Requirement for the Degree of DOCTOR OF PHILOSOPHY ELECTRICAL AND COMPUTER ENGINEERING OLD DOMINION UNIVERSITY December 2008 Lee A. Belfore, H (Director) K. Vijayan Asari Jesmca R. Crouch ABSTRACT RAPID PROTOTYPING FOR VIRTUAL ENVIRONMENTS Emre Baydogan Old Dominion University, 2008 Director: Dr. Lee A. Belfore, II Development of Virtual Environment (VE) applications is challenging where appli­ cation developers are required to have expertise in the target VE technologies along with the problem domain expertise. New VE technologies impose a significant learn­ ing curve to even the most experienced VE developer. The proposed solution relies on synthesis to automate the migration of a VE application to a new unfamiliar VE platform/technology.
    [Show full text]
  • Smart Programming Playgrounds
    Smart Programming Playgrounds Rohan Padhye, Pankaj Dhoolia, Senthil Mani and Vibha Singhal Sinha IBM Research fropadhye, pdhoolia, sentmani, [email protected] Abstract—Modern IDEs contain sophisticated components for Q. [JDBC] How can I get all values of a column in an SQL table into a List? inferring missing types, correcting bad syntax and completing A. Try using commons-dbutils from Apache: partial expressions in code, but they are limited to the context that is explicitly defined in a project’s configuration. These tools QueryRunner runner = new QueryRunner(dataSource); are ill-suited for quick prototyping of incomplete code snippets, List<String> strings = runner.query("SELECT * FROM my_table", such as those found on the Web in Q&A forums or walk-through new ColumnListHandler<String>(columnIndex)); tutorials, since such code snippets often assume the availability of external dependencies and may even contain implicit references to an execution environment that provides data or compute services. Fig. 1. An example post on a Q&A site containing a Java code snippet. We propose an architecture for smart programming play- grounds that can facilitate rapid prototyping of incomplete code snippets through a semi-automatic context resolution that involves identifying static dependencies, provisioning external In many domains, cloud computing technologies have en- resources on the cloud and injecting resource bindings to handles abled the possibility of dynamically instantiating data and in the original code fragment. Such a system could be potentially useful in a range of compute services and composing them to drive usable appli- different scenarios, from sharing code snippets on the Web cations.
    [Show full text]
  • Visual Studio 2019 Hotkey and Code Snippets Cheat Sheet
    Visual Studio 2019 Hotkey and Code Snippet Cheat Sheet Jacobs Data Solutions jacobsdata.com Bold: power/high productivity. Editing Commands Checked ✓: frequently used. Ctrl+C Copy ✓✓ Ctrl+A Select all Ctrl+X Cut ✓✓ Ctrl+W Select current word Ctrl+V Paste ✓✓ Shift+Alt+. Highlight next matching item Ctrl+L Cut line ✓✓ Shift+Alt+; Highlight all matching items Ctrl+Z Undo ✓✓ Shift+Alt+= Expand selection Ctrl+Y Redo ✓✓ Shift+Alt+- Contract selection Ctrl+Delete Delete to end of word Ctrl+Alt+Click Multi-caret Ctrl+Backspace Delete to beginning of word Shift+Alt+Click Multi-line caret Shift+Delete Delete current line/leave cursor ✓✓ Ctrl+D Duplicate Hold Alt and Ctrl+Shift+U Make uppercase drag mouse OR Block selection mode Ctrl+Shift+L Make lowercase Shift+Alt+Arrow Ctrl+Shift+V View clipboard history keys Alt+Up Arrow Move line up Alt+Down Arrow Move line down Home Go to beginning of first code statement on current line ✓✓ Home,Home Go to very beginning of current line ✓✓ End Go to the end of the current line ✓✓ Ctrl+Home Go to beginning of current document Ctrl+End Go to end of current document Ctrl+M,Ctrl+O Collapse to definitions ✓ Ctrl+M,Ctrl+L Toggle expand/collapse all ✓✓ Ctrl+M,Ctrl+M Toggle expansion (at current scope only) Navigation Find/Search/Replace F12 Go to definition ✓✓ Ctrl+F Find ✓✓ Alt+F12 Peek definition ✓ Ctrl+H Find and replace Ctrl+Alt+Home Promote the peek definition F3 Find next instance/repeat search window to a document tab Shift+F3 Find previous Shift+F12 Find all references Ctrl+F3 Search for item under cursor
    [Show full text]
  • Java and C I CSE 351 Autumn 2016
    L26: JVM CSE351, Spring 2018 Java Virtual Machine CSE 351 Spring 2018 Model of a Computer “Showing the Weather” Pencil and Crayon on Paper Matai Feldacker-Grossman, Age 4 May 22, 2018 L26: JVM CSE351, Spring 2018 Roadmap C: Java: Memory & data Integers & floats car *c = malloc(sizeof(car)); Car c = new Car(); x86 assembly c->miles = 100; c.setMiles(100); c->gals = 17; c.setGals(17); Procedures & stacks float mpg = get_mpg(c); float mpg = Executables free(c); c.getMPG(); Arrays & structs Memory & caches Assembly get_mpg: Processes language: pushq %rbp Virtual memory movq %rsp, %rbp ... Memory allocation popq %rbp Java vs. C ret OS: Machine 0111010000011000 code: 100011010000010000000010 1000100111000010 110000011111101000011111 Computer system: 2 L26: JVM CSE351, Spring 2018 Implementing Programming Languages Many choices in how to implement programming models We’ve talked about compilation, can also interpret Interpreting languages has a long history . Lisp, an early programming language, was interpreted Interpreters are still in common use: . Python, Javascript, Ruby, Matlab, PHP, Perl, … Interpreter Your source code implementation Your source code Binary executable Interpreter binary Hardware Hardware 3 L26: JVM CSE351, Spring 2018 An Interpreter is a Program Execute (something close to) the source code directly Simpler/no compiler – less translation More transparent to debug – less translation Easier to run on different architectures – runs in a simulated environment that exists only inside the interpreter process . Just port the interpreter (program), not the program-intepreted Slower and harder to optimize 4 L26: JVM CSE351, Spring 2018 Interpreter vs. Compiler An aspect of a language implementation . A language can have multiple implementations . Some might be compilers and other interpreters “Compiled languages” vs.
    [Show full text]
  • Charles University in Prague
    Vrije Universiteit Amsterdam Faculty of sciences MASTER THESIS Milan Slančík Advanced floor plan designer in Flex Department of computer science Supervisor: Prof dr Anton Æliëns Second reader: Dr Evert Wattel Study program: Informatics, Multimedia Computer Science Acknowledgements First of all, I wish to express my sincere gratitude and appreciation to my supervisor, Prof Dr Anton Æliëns, for his thoughtful guidance, his valuable suggestions, comments during discussions, prompt response to my emails and speedy feedback. My gratitude also goes to my second reader, Dr Evert Wattel for his ideas, willingness to read drafts and test the application in advance. Last, but not least, I would like to give my sincere thanks also to my parents, who have supported me throughout the writing process. Contents 1 INTRODUCTION ....................................................................................................................................................... 8 1.1 BACKGROUND ............................................................................................................................................................ 8 1.2 STRUCTURE OF THIS DOCUMENT ............................................................................................................................ 8 2 AIM OF THE WORK AND RESEARCH ISS UES ........................................................................................... 9 3 RELATED WORK...................................................................................................................................................
    [Show full text]