Skip to content

Using an IDE

Martin edited this page Nov 26, 2019 · 2 revisions

Introduction

Even if there is a description on Sourceforge how to use Eclipse, IntelliJ or Betbeans, this is not the whole truth. The descriptions are old and some things may be different today because JavaFX is no longer part of the latest JDK versions. However, here is an update for using it with IntelliJ.

Creating the Project

Follow these steps:

  1. Open IntelliJ.
  2. File -> New -> Project from Existing Source.
  3. Navigate to the folder that contains the sources (the folder with the pom.xml file), OK.
  4. Select Import project from external model: Maven, Next, Next, Next.
  5. Select the JDK you like to use, Next, Finish.

Creating a JAR File

Follow these steps:

  1. First create the project.
  2. File -> Project Structure.
  3. Set language level to 7 (Diamonds, ARM, ...).
  4. Select Artifacts, Add (+) Jar -> From modules with dependencies.
  5. Select Main class (use the browse button, there is only one entry, postest2.POSTest2).
  6. From Output Layout, add (+) Directory Content.
  7. Select addTarget sub-folder in project root, OK.
  8. From Output Layout, remove Extracted 'jfxrt.jar/' and Extracted 'xml-apis-1.3.04.jar/', OK
  9. Build -> Build Artifacts -> POStest2:jar -> Build

Starting POSTest2 on Windows

Follow these steps:

  1. Copy POStest2.bat from project root and the generated jar file into the target folder.
  2. If the environment variables JAVA_HOME and JFX_HOME are set to a JRE or JDK home and a FavaFX SDK or RE, simply start POStest2.bat.
  3. Otherwise if JAVA_HOME has not been set or if POStest2 does not find a JavaFX SDK, change POStest2.bat. Set JFX_HOME to the JavaFX root and, if necessary, JAVA_HOME to the Java root you want to use.
  4. To add you own JavaPOS services, add the paths of the necessary jar files to the classpath environment variable in POStest2.bat. Search for Add Device Specific jar's here..., below this comment is the right place.
  5. To add required additional binaries (dll, exe), add the paths to these binaries to the PATH environment variable in POStest2.bat. Search for Add Device Specific binary folders, below this comment is the right place.
  6. Extract xpos.xml from POStest2.jar and add the required JposEntry tags. Search for Add JposEntry tags here, below this comment line is the right place.
  7. Start POStest2.bat.

Clone this wiki locally