LogoLogo
WinForms to WebPowerBuilder to .NETPowerBuilder to Java
  • WebMAP Documentation | Mobilize.Net
  • WinForms
    • Introduction
    • Getting Started
    • Conversion Process
    • Post-Conversion
    • Extend or Modify the Converted Application
      • NoWebMap Forms Winforms
        • How to add a new Form
        • Adding the created form to the migrated App
        • Interacting with the application data
        • Call the custom API
        • Interaction between the no webmap added Form and the WebMap components
      • Adding a component
      • Adding a component dynamically
      • Add a new control model
      • Switching CSS theme
      • Adding new window
      • Conversion Configuration
        • WebMAP configuration file
        • Stub Filter
      • Adding Non-WebMap Angular Forms
      • Adding FrontEnd Handler to a ToolStripMenuItem
      • Changing ToolStripButton icons
      • Adding new items to existing toolbar
      • Adding FrontEnd element properties and JS listeners
      • Adding FrontEnd output handlers
      • Access FrontEnd components
      • Create custom components based on existing WebMap Component
      • Override FrontEnd methods
    • Assessment Mode
    • Errors and Troubleshooting
      • How to resolve broken reference problems with VBUC
    • Portability
    • Glossary
    • Release Notes
    • Internal Demos
    • Known Issues
    • WinForms DCP
  • WebForms
    • Introduction
    • Overview
    • Desktop Compatibility Platform (DCP)
      • Pages and Master Pages
      • GridView and DataList data synchronization
      • HTTP objects
    • Post-Conversion
    • Extend or Modify the Converted Application
      • Adding FrontEnd validator
      • Adding Page
      • Adding MasterPage
    • Designer classes on WebForms Conversion Tool
    • Errors and Troubleshooting
      • How fix Solution when have been added website from filesystem without project file
    • Release Notes
  • PowerBuilder to .Net
    • Introduction
    • Getting Started
      • Conversion Tool
    • Desktop Compatibility Platform (DCP)
      • Data Manager
    • Reports
      • Report Rendering in Modernized Code
      • ReportWatcher Service Configuration
      • Data Manager to RDL Conversion
      • Reporting Service Internals
      • Troubleshooting
  • PowerBuilder to Java
    • Introduction
    • Getting started
    • Post-Conversion
      • Setup PBJava Environment
      • Architecture
      • App Start
    • Glossary
    • Errors
    • Glossary
    • FAQ
      • How to create a new Control
      • How to create a new Screen
      • What is the Mobilize.WebMAP.CoreServices.All?
      • What is the DesignerAttribute?
      • What is the InterceptedAttribute?
      • What is the InterceptedAttribute?
      • What is the ObservableAttribute?
      • What is the Mobilize.Weaving.WebMAPExtensions.All?
  • General
    • FrontEnd
      • Documentation
        • Webforms Angular Components
          • Web Components
            • Base Components
              • BaseValidator Component
            • KendoUI Components
              • CompareValidator
              • CustomValidator
              • RegularExpressionValidator
              • RequiredFieldValidator
              • ValidationSummary
          • Directives
          • AJAX Web Components
            • AjaxCalendar
            • AjaxModalPopupExtender
          • Ajax Interaction Services
        • Client Core
          • WebMap's Client Core
        • Angular Client
          • Introduction
          • WebMap Service
          • WebMap Interceptor Service
        • Base Components
          • Introduction
          • Components
            • Container
            • Control
            • ControlContainer
            • FormsContainer
            • Loading
            • Stub
        • Winforms Angular Components
          • Web Components
            • Base Components
              • Control Component
              • Form Container
              • Grid Component
              • Style
            • KendoUI Components
              • AdoDataControl
              • Button
              • C1TrueDBGrid
              • CheckBox
              • CheckedListBox
              • ComboBox
              • ContextMenuStrip
              • DataGridView
              • DataGridViewFlex
              • DateTimePicker
              • FileDialog
              • GroupBox
              • Label
              • ListBox
              • ListView
              • MaskedTextBox
              • MessageBox
              • NumericUpDown
              • Panel
              • PictureBox
              • PrintDialog
              • ProgressBar
              • RadioButton
              • RichTextBox
              • StatusStrip
              • Stup
              • TabControl
              • TabPage
              • TextBox
              • Timer
              • ToolStrip
              • TreeView
              • WebBrowser
              • Window
            • JQuery Web Components
          • WebMap FrontEnd Architecture
          • Migrated Structure
          • Setup
            • Front-End setup and compilation
            • Components Manual
            • Browser Support
            • Unit Test Manual
            • Development Process
            • Setup AOT/JIT Compilation
          • Decorators
            • Server Event
          • Conventions
            • Application Structure and NgModules
            • Coding
            • Components
            • Data Service
            • Directives
            • Lifecycle hooks
            • Names
            • Services
        • PowerBuilder Kendo Components
          • Base Components
            • base-component
            • column-control
            • controlcontainer
          • Data Manager Componets
            • base-data-manager
            • data-manager-control
            • data-manager-control-base
            • dw-checkbox
            • dw-column
            • dw-complexNumericMaskComponent
            • dw-compute
            • dw-date-time-edit-mask
            • dw-dropdowndatawindow
            • dw-edit
            • dw-edit-mask
            • dw-radio-button
            • dw-simple-numeric-edit-mask
            • dw-string-edit-mask
            • dw-time-edit-mask
          • Window Components
            • basemask
            • graphics
            • w-checkbox
            • w-command-button
            • w-complex-numeric-mask
            • w-date-time-edit-mask
            • w-dropdownlistbox
            • w-group-box
            • w-line
            • w-listbox
            • w-maskedtextbox
            • w-mdiclient
            • w-menu
            • w-multiline
            • w-picture
            • w-picture
            • w-radiobutton
            • w-rectangle
            • w-simple-numeric-edit-mask
            • w-single-line-edit
            • w-statictext
            • w-string-edit-mask
            • w-time-edit-mask
            • w-toolbar
            • w-toolbaritem
            • w-user-object
            • w-window
          • Services
            • DmInteractionService
          • DataManagerEvents
          • FocusManager guide
      • Api Documentation
        • WebMap Silverlight
        • WfNetC1Components
        • WebFormsComponents
      • Guides
        • Setup NPM package registry in the workspace
        • How to Setup WebMap Applications To Run Over SubDomains or WebApplications In IIS
        • Deploy several WebMap Apps in the same Server
        • Update to Angular 16
        • Appearance
          • How to change the CSS
          • How to override the style for a component
        • Component maintenance
          • How link WebMap package to the migrated Application
          • How to resolve broken reference problems with VBUC
          • How to test a local WebMap Components package
          • How to add a new component in a migrated application
          • How to update a component
          • Dynamic Control Support
          • How to add new set of component with a different provider
          • How to test your component in the playground
          • Tools
        • WMLogger
          • How to use the WMLogger's instance
          • How to change log's level
          • How to add log tags
        • Integration test
        • Setup WebMap Applications to Run Front-End And Back-End In Separates Sites
          • Setup WebMap Applications To Run Front-End And Back-End In Separates Sites in Production (IIS)
        • Setup Migrated WebMap Applications To Run Front-end & Back-end In Separates Sites (Only development)
        • Initial Set Up
          • Software to Install
          • Necessary Repositories
      • Errors
      • Version Notes
        • Client Core
        • Angular Client
        • Web Base Components
        • Winforms Angular Components
        • PowerBuilder Kendo Components
      • Licenses
        • Client Core
        • Angular Client
        • Base Components
        • PB Kendo Components
        • WFNet Kendo Components
        • WebForms Components
        • WFNet Access Components
        • WFNet Janus Components
        • WFNet C1 Components
        • Silverlight wms-framework
        • Silverlight i-components
    • BackEnd
      • WebMAP From Scratch
      • Setup
      • DCP: Desktop Compatibly Platform
        • Overview
        • Library Bundles
          • Bundle Library
            • Create an Observable Object
          • Bundle DTO
            • DTO: Data Transfer Objects
              • Creating a DTO
            • Mappers
              • Create Mappers
            • Observable Wrappers
              • Create an Observable Wrapper
            • API/Controllers
      • Architecture
      • Weaving on WebMAP
      • Glossary
      • FAQ
        • How to create a new Control
        • How to create a new Screen
        • What is the Mobilize.WebMAP.CoreServices.All?
        • What is the DesignerAttribute?
        • What is the InterceptedAttribute?
        • What is the Mobilize.Extensions.Logging.RollingFile?
        • What is the ObservableAttribute?
        • What is the Mobilize.Weaving.WebMAPExtensions.All?
      • Licenses
        • PBNet DCP
        • WebFormsDCP
        • WFNet DCP
        • CoreServices
        • CoreServicesCommon
    • Request and Response
  • SCALABILITY
    • Introduction
    • Microservices
    • Containerizing a WebMap .Net Application with Docker
    • Vertical scalability
Powered by GitBook
On this page
  • Prerequisites
  • Installing Java 12
  • Installing Tomcat 9
  • Installing Maven 3.8.2
  • Installing STS 4
  • Adding Environment Variables
  • Verifying Maven
  • Increasing STS build memory
  • Workspace setup
  • Adding Tomcat to STS
  • Import converted projects and helpers project
  • Increasing time of server Timeouts
  • Adding JDK reference
  • Adding webMap.properties file
  • Building and running converted application
  • Final Steps (Optional)

Was this helpful?

  1. PowerBuilder to Java
  2. Post-Conversion

Setup PBJava Environment

PreviousPost-ConversionNextArchitecture

Last updated 3 months ago

Was this helpful?

Prerequisites

Installing Java 12

Java Development Kit (JDK) is required to compile and run WebMAP PBJava converted apps, the recommended version is JDK 12.0.2.

  1. Navigate to

  2. Look for 12.0.2 version or higher (Recommended version was fully tested)

  3. Download Windows 64-bit zip version (x86 for legacy PC or JAR if is a Linux distribution)

  4. Extract JDK and add to a folder path closest to root disk path or even better in the same location where Java is installed. (e.g. C:\Program Files\Java\jdk-12.0.2)

Installing Tomcat 9

Tomcat 9 is an application server to run WebMAP PBJava converted apps. The recommended version is 9.0.52.

  1. Navigate to

  2. Look for 9.0.52 version or higher (Recommended version was fully tested)

  3. Download Core: 64-bit Windows zip version (pgp, sha512)

  4. Extract Tomcat and add to a folder path closest to root disk (e.g. C:\apache-tomcat-9.0.52)

Installing Maven 3.8.2

Maven is a builder for Java applications, it helps making the build process easy. The recommended version is 3.8.2

  1. Look for 3.8.2 version or higher (Recommended version was fully tested)

  2. Download Binary Zip archive version

  3. Extract Maven and add to a folder path closest to root disk (e.g. C:\apache-maven-3.8.2)

Installing STS 4

STS is a Eclipse IDE flavored with the Spring Framework features, the IDE choice is up to you (Eclipse, Visual Studio Code, etc) however WepMAP recommends STS 4.4.0 because it was fully tested.

  1. Extract STS and add .exe to a folder path closest to root disk (e.g. C:\STS\sts-4.4.0.RELEASE)

  2. The STS runs executing the SpringToolSuite4.exe, to simplify execution create a shortcut and then add to Desktop, Start Menu or anywhere with easy access

Adding Environment Variables

The different tools need to be configured to be accessible from Windows OS (For different OS please omit this step) we can use the Windows Environment Variables to solve the access requirement. In previous steps the installation paths of different tools were set, now please make sure those paths match with the paths to add in the following System variables, for this example the paths are the exactly mentioned in steps above:

  • CATALINA_HOME -> C:\apache-tomcat-9.0.52

  • JAVA_DOC -> %JAVA_HOME%

  • JAVA_HOME -> C:\Program Files\Java\jdk-12.0.2

And modify Path variable from User Variables section to add:

  • Path -> Add -> C:\Program Files\Java\jdk-12.0.2\bin\

  • Path -> Add -> C:\apache-maven-3.8.2\bin

Verifying Maven

Open a CMD and exectute mvn -version it should return the current Maven version:

Increasing STS build memory

STS needs more memory that default value to build WebMAP converted applications, the configuration file SpringToolSuite4.ini is located inside STS folder (e.g. C:\STS\sts-4.4.0.RELEASE), open the file with a text editor and add the next instructions if they are not already in the file:

-Xms1024m
-Xmx4096m

Workspace setup

After WebMAP conversion process the converted app generates a folder with Java Back-end code and Angular Front-end code, this is going to be the STS workspace folder. e.g.

Open the STS and select the folder as a workspace, initially the IDE should have an empty structure and the next steps are going to show how to configure the project correctly.

Adding Tomcat to STS

Add servers view(window that shows information about specific IDE area) to IDE, to add the view go to menu option Window -> Show View -> Other -> Server -> Servers

Then in Servers view click link No servers are available. Click this link to create a new server... it opens the New Server window, select Tomcat v9.0 Server and click Next> button

Browse to Tomcat folder installation (e.g. C:\apache-tomcat-9.0.52) and click Finish button

Import converted projects and helpers project

To add Java WebMAP converted projects to the workspace, the Project Explorer view should be open if is not visible go to Window -> Show View -> Project Explorer and then right click over Project Explorer view, click option Import -> Import

Import window is shown, select Maven -> Exisiting Maven Projects -> Next > browse to workspace folder to select Java WebMAP projects (e.g. ReferenceApplication, Target...) and click Finish button. Repeat steps for each project

PBJavaHelpers

Increasing time of server Timeouts

Tomcat server has start and end timeouts default values, those values have to be increased to run WebMAP applications correctly. Double click over Tomcat v9.0 Server at localhost and navigate to Timeouts section. Modify both values to recommended value 360 ms

Adding JDK reference

  1. Go to Window -> Preferences -> Java -> Installed JREs and click button Add...

  2. Select Standard VM and click Next >

  3. On JRE home: click Directory... button and find the path where JDK was installed (e.g. C:\Program Files\Java\jdk-12.0.2) and click Finish

  4. Installed JREs window prompts with JDK added but not checked as default, please check JDK to set as default and click Apply and Close

Adding webMap.properties file

Converted WebMAP PBJava applications generate a folder with the WebMAP configuration, the folder relative path is ..\ReferenceApplication\configuration, it contains connection.properties and webMap.properties files, the folder has to be added to Tomcat server following next steps:

  1. Go to Run -> Run Configurations -> double click over Apache Tomcat -> Classpath -> User Entries -> Advanced ->Add External Folder

  2. Browse to configuration folder and select folder then click Apply button and finally click Close button

webMap.properties contains important configuration before run the WebMAP PBJava application, it contains the appstart parameter that indicates what is the main Java class where application should start. Note: Assure that parameter is configured with correct entry point before run the application. It will be the entry Java class where converted application starts e.g. com.project.project.mainclass

Building and running converted application

Workspace is ready to start building process, every project needs to be configured using Maven, the steps to configure a project are:

  1. Right click over the project and select Run As -> Maven Build

  2. Edit configuration and launch. window appears

  3. On Goals field add clean install

  4. Only for helpers project please check Skip Tests

  5. Click Apply button and Run button

Repeat process for each project in workspace except Servers project (We recommend do process for helpers project first)

After build all workspace the projects dependencies need to be updated, it can be do with the next steps:

  1. Right click on any part of Project Explorer

  2. Maven -> Update Project...

  3. Check all existing projects

  4. Click OK button

Try to run application right clicking on start project (ReferenceApplication) and Run As -> Run on Server, application will start but in some cases an empty browser appears. The steps to solve this issue is changing Servers -> open server.xml file -> change to Source view instead of Design view -> modify path="/ws" to path="/" on <Context docBase="ReferenceApplication" node and run application again.

Final Steps (Optional)

Application should run correctly by this moment but there are some optional improvements that can be perform to improve develop process.

Configure Chrome as default browser

  1. Go to Window -> Preferences -> General -> WebBrowser

  2. Select External Browser

  3. Select Chrome from browsers list (Chrome must be already installed)

  4. Parameters can be added to run application incognito mode -incognito or in a new browser window --new-window

Excluding .js files from Java building to improve compilation time

  1. Right click over ReferenceApplication project -> Properties -> JavaScript -> Include Path -> Source

  2. Select Front-end deployment folder (ReferenceApplication)

  3. Excluded -> Edit -> Exclusion patterns -> Add

  4. Add patterns *.js and *.js.map, click OK button

  5. Click Finish button

Navigate to

Dowload STS 4.4.0 from or if your are inside the GAP network can be download from shared folder \\backupserver\itbackup\installers\JAVA

--->

WebMAP PBJava converted applications need PBJavaHelpers project to run, it can be clone from: be sure that branch develop is selected. After cloning the repository add the project performing the same steps mentioned above to add Java projects to STS workspace.

https://jdk.java.net/archive/
https://tomcat.apache.org/download-90.cgi
https://maven.apache.org/download.cgi
https://spring.io/tools
https://collaboration.artinsoft.com/tfs/Product/Product/_git/PBJavaHelpers