forked from ntsggr/JavaPOS-POStest-2
-
Notifications
You must be signed in to change notification settings - Fork 1
Using an IDE
Martin edited this page Nov 26, 2019
·
2 revisions
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.
Follow these steps:
- Open IntelliJ.
- File -> New -> Project from Existing Source.
- Navigate to the folder that contains the sources (the folder with the pom.xml file), OK.
- Select Import project from external model: Maven, Next, Next, Next.
- Select the JDK you like to use, Next, Finish.
Follow these steps:
- First create the project.
- File -> Project Structure.
- Set language level to 7 (Diamonds, ARM, ...).
- Select Artifacts, Add (+) Jar -> From modules with dependencies.
- Select Main class (use the browse button, there is only one entry, postest2.POSTest2).
- From Output Layout, add (+) Directory Content.
- Select addTarget sub-folder in project root, OK.
- From Output Layout, remove Extracted 'jfxrt.jar/' and Extracted 'xml-apis-1.3.04.jar/', OK
- Build -> Build Artifacts -> POStest2:jar -> Build
Follow these steps:
- Copy POStest2.bat from project root and the generated jar file into the target folder.
- 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.
- 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.
- 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.
- 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.
- 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.
- Start POStest2.bat.