Skip to main content
Jump to: navigation, search

Difference between revisions of "Efxclipse/Tutorials/Tutorial01v4.5.0"

(Created page with "From creation to deployment How to create a very basic e(fx)clipse project on a Mars 4.5.0 version of eclipse. These instructions were written and the screen captures taken wi...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Efxclipse}}
 +
 +
[[File:Under-Construction-Go-somewhere-else.jpg]]
 +
Prior version of this wiki page for [[Juno|Juno]], [[Indigo|Indigo]] and [[xxx|xxx]] are still available. <br />
 
From creation to deployment
 
From creation to deployment
 
How to create a very basic e(fx)clipse project on a Mars 4.5.0 version of eclipse. These instructions were written and the screen captures taken with a clean install of the Eclipse for RCP and RAP Developers 64 bit package available here (http://www.eclipse.org/downloads/packages/eclipse-rcp-and-rap-developers/marsr). The Operating system used was Windows 7 SP1. These steps do not include the install of eclipse 4.5.0 (Mars).  This tutorial does not cover installing the e(fx)clipse IDE and setup a target platform for your application development.  See [[Efxclipse/Tutorials/AddingE(fx)clipse to eclipse | this]] tutorial for instructions on how to install the e(fx)eclipse IDE and setup a target platform.
 
How to create a very basic e(fx)clipse project on a Mars 4.5.0 version of eclipse. These instructions were written and the screen captures taken with a clean install of the Eclipse for RCP and RAP Developers 64 bit package available here (http://www.eclipse.org/downloads/packages/eclipse-rcp-and-rap-developers/marsr). The Operating system used was Windows 7 SP1. These steps do not include the install of eclipse 4.5.0 (Mars).  This tutorial does not cover installing the e(fx)clipse IDE and setup a target platform for your application development.  See [[Efxclipse/Tutorials/AddingE(fx)clipse to eclipse | this]] tutorial for instructions on how to install the e(fx)eclipse IDE and setup a target platform.
 
#File > New > Project
 
#File > New > Project
[[File: File-New-Project.png]]
+
[[File: File-New-Project.png|none|900px]]
 
   
 
   
 
# Type in '''JavaFX''' in the '''Wizards:''' text box.
 
# Type in '''JavaFX''' in the '''Wizards:''' text box.
 
# Select the '''JavaFX Project''' entry
 
# Select the '''JavaFX Project''' entry
[[File:Type-JavaFX-Select-JavaFXProject.png]]
+
# Press the '''<u>N</u>ext >''' button.
 +
[[File:Type-JavaFX-Select-JavaFXProject.png|none]]
  
 +
# Enter a project name '''MyJavaFXApp''' at the '''<u>P</u>roject name:''' text box
 +
# Press press the '''<u>N</u>ext >''' button.
 
[[File:Type-MyJavaFXApp-Press-Finish-Next.png]]
 
[[File:Type-MyJavaFXApp-Press-Finish-Next.png]]
# Enter a project name '''MyJavaFXApp''' at the '''<u>P</u>roject name:''' text box and press the '''<u>N</u>ext >''' button.
 
 
 
 
 
 
# Take the defaults and press the '''<u>N</u>ext >''' button.
 
# Take the defaults and press the '''<u>N</u>ext >''' button.
 
[[File:Take-the-defaults-and-press-the-Next-button.png]]
 
[[File:Take-the-defaults-and-press-the-Next-button.png]]
+
# Take the defaults and press the '''<u>F</u>inish''' button.
[[File:Take-the-defaults-and-press-the-Finish-button.png]]
+
[[File:Take-the-defaults-and-press-the-Finish-button.png]]  
+
 
 
# Select the '''Main''' class.
 
# Select the '''Main''' class.
 
# Pull up the context pop pout menu with a right mouse click.
 
# Pull up the context pop pout menu with a right mouse click.
 
# Select the '''Run As''' option.
 
# Select the '''Run As''' option.
 
# Select the '''Java Application Alt+Shift+X, J''' option on the sub pop out context menu.
 
# Select the '''Java Application Alt+Shift+X, J''' option on the sub pop out context menu.
 +
 
[[File:Select-JavaApplication.png]]
 
[[File:Select-JavaApplication.png]]
 
   
 
   
Line 28: Line 35:
 
   
 
   
 
# Add the following four lines of Java Code at the location screen on the following screen capture.
 
# Add the following four lines of Java Code at the location screen on the following screen capture.
[[File:Add-four-lines-of-Java-code.png]]
 
root.setTop(new Text("Top"));
 
root.setBottom(new Text("Bottom"));
 
root.setRight(new Text("Right"));
 
root.setLeft(new Text("Left"));
 
 
# Save the changes by typing '''CTL+S'''  
 
# Save the changes by typing '''CTL+S'''  
 +
[[File:Add-four-lines-of-Java-code.png]]
 +
<br />
 +
<pre>
 +
root.setTop(new Text("Top"));
 +
root.setBottom(new Text("Bottom"));
 +
root.setRight(new Text("Right"));
 +
root.setLeft(new Text("Left"));
 +
</pre>
  
 
# Run the application again.
 
# Run the application again.
Line 44: Line 54:
 
# At the '''Application Title*:''' text box enter '''BestSolutions'''.
 
# At the '''Application Title*:''' text box enter '''BestSolutions'''.
 
# At the '''Application version*:''' text box enter '''1.0.0'''.
 
# At the '''Application version*:''' text box enter '''1.0.0'''.
 +
[[File:build-fxbuild-Press-Application-Browse-button.png]]
 
# At the '''Application Class*:''' text box press the '''Browse ...''' button.
 
# At the '''Application Class*:''' text box press the '''Browse ...''' button.
 
# Pick the '''Main''' entry and press the '''OK''' button.
 
# Pick the '''Main''' entry and press the '''OK''' button.
Line 52: Line 63:
 
[[File:Click-AntBuildXMLandRun.png]]
 
[[File:Click-AntBuildXMLandRun.png]]
  
+
# The tutorial is now complete.
# On the '''Not a JDK''' dialog press the '''Yes''' button.  
+
# Read the console to check that there are no errors.
[[File:On-the-NotAJDK-button-press-Yes.png]]
+
# Expand the Package Explorer to see the jar file '''MyJavaFXApp.jar'''
+
[[File:jar_and_console.png|none|900px]]
# On the '''Select a JDK''' dialog select '''???'''  and press the '''OK''' button.
+
[[File:On-the-SelectAJDK-button-select-___-press-OK.png]]
+
 
+
== stopped here ===
+
Expand the folders in the "Package Explorer" and double click your jar file.
+

Latest revision as of 14:35, 14 September 2015


Under-Construction-Go-somewhere-else.jpg Prior version of this wiki page for Juno, Indigo and xxx are still available.
From creation to deployment How to create a very basic e(fx)clipse project on a Mars 4.5.0 version of eclipse. These instructions were written and the screen captures taken with a clean install of the Eclipse for RCP and RAP Developers 64 bit package available here (http://www.eclipse.org/downloads/packages/eclipse-rcp-and-rap-developers/marsr). The Operating system used was Windows 7 SP1. These steps do not include the install of eclipse 4.5.0 (Mars). This tutorial does not cover installing the e(fx)clipse IDE and setup a target platform for your application development. See this tutorial for instructions on how to install the e(fx)eclipse IDE and setup a target platform.

  1. File > New > Project
File-New-Project.png
  1. Type in JavaFX in the Wizards: text box.
  2. Select the JavaFX Project entry
  3. Press the Next > button.
Type-JavaFX-Select-JavaFXProject.png
  1. Enter a project name MyJavaFXApp at the Project name: text box
  2. Press press the Next > button.

Type-MyJavaFXApp-Press-Finish-Next.png

  1. Take the defaults and press the Next > button.

Take-the-defaults-and-press-the-Next-button.png

  1. Take the defaults and press the Finish button.

Take-the-defaults-and-press-the-Finish-button.png

  1. Select the Main class.
  2. Pull up the context pop pout menu with a right mouse click.
  3. Select the Run As option.
  4. Select the Java Application Alt+Shift+X, J option on the sub pop out context menu.

Select-JavaApplication.png

  1. An empty window is rendered.
  2. Close the window.

An-empty-window-is-rendered.png


  1. Add the following four lines of Java Code at the location screen on the following screen capture.
  2. Save the changes by typing CTL+S

Add-four-lines-of-Java-code.png

root.setTop(new Text("Top"));
root.setBottom(new Text("Bottom"));
root.setRight(new Text("Right"));
root.setLeft(new Text("Left"));
  1. Run the application again.
  2. This time the words Top, Bottom, Left, Right and Center will appear. The green boxes will not render. The green box are just something added to the screen capture to help the newbie see how the parts of a BorderPane layout.

Top-Bottom-Left-Right-Center.png

Deployment

  1. Open the build.fxbuild file.
  2. At the Vendor name*: text box enter BestSolutions.
  3. At the Application Title*: text box enter BestSolutions.
  4. At the Application version*: text box enter 1.0.0.

Build-fxbuild-Press-Application-Browse-button.png

  1. At the Application Class*: text box press the Browse ... button.
  2. Pick the Main entry and press the OK button.

Pick-the-Main-entry-press-OK-button.png

  1. Save the changes by typing CTL+S
  2. Click on the ant build.xml and run link in the build section of the editor.

Click-AntBuildXMLandRun.png

  1. The tutorial is now complete.
  2. Read the console to check that there are no errors.
  3. Expand the Package Explorer to see the jar file MyJavaFXApp.jar
Jar and console.png

Back to the top