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
  • Step 1: Search for .exe path
  • Step 2: Add input folder
  • Step 3: Add output folder
  • Step 4: Add package
  • Step 5: Start the migration process
  • Step 6: Review migration folder results
  • Arguments
  • Required Arguments
  • Optional Arguments

Was this helpful?

  1. PowerBuilder to Java

Getting started

In the next six steps, we are going to explain the conversion process.

Step 1: Search for .exe path

In the PBJava tool's folder, open a command prompt window and search for the file Artinsoft.Pb2Java.Runner.exe. Paste the .exe path into the command prompt.

Step 2: Add input folder

After pasting the .exe file, type in the command prompt the input folder where the PowerBuilder source code is located. To specify this folder, use the -i argument.

Example:

-i C:\source\target1.pbt

Step 3: Add output folder

Up next, add the output folder where you want your migrated code to be generated. To specify this folder, use the -o argument.

Example:

-o C:\migrated

Step 4: Add package

Then, enter the name of the package you want to appear in the generated code. To specify this package, use the -p argument.

This argument generates the name of the package.

Example:

-p a.b

The line before generates the following code:

Step 5: Start the migration process

Press the Enter key to start the migration.

You will see all the tasks the conversion tool goes through to successfully migrate the code. Along with those tasks, the tool provides the percentage of completion of the conversion process at the moment.

PBJava also provides some code conversion statistics such as number of lines migrated or not migrated, number of parsing errors, number of conversion errors, number of libraries, etc.

After the successful conversion of the code, the command prompt will display a summary of the conversion process. This summary shows the performance of each task processed by the conversion tool.

Step 6: Review migration folder results

Now that the migration is finished you can go to the output folder to check the generated files and folders. You will find the following:

  • ReferenceApplication: This is the web application.

  • Target: The target folder contains all the Java classes generated by the Conversion Tool.

  • TmpFiles: Temporary files used in the conversion process. You can delete those files.

  • WebApp: this folder contains the HTML and CSS files generated.

  • messages.properties: This file is used to map some label texts in case you need to use a different language.

  • Pb2JavaEwis.xml: an XML file that contains a list of errors, warnings and issues that occurred during the conversion process.

  • tmpstringsfile.txt: This file is used to map some label texts in case you need to use a different language.

Arguments

An argument is a type of indication that you provide to configure the tool so that the code can be successfully converted.

In this section you will find all the arguments options you have to configure PBJava.

Required Arguments

The following arguments are required to run the tool:

-i

Input folder path of the .pbt file **

-o

Output folder path for the migrated code

-p

Name of the package for the source code

** If there are two or more .pbt files in the path name, extension and -t argument must be indicated.

Optional Arguments

-s

Path of the serialized symbol table of sharedlibraries

-t

Indicates that the -i argument contains the file name

-q

List of SQL parsers separated by ";"

-r

This is the path of the configuration files, Config.xml and pb.ini **

-f

Temporal argument to fix specific SQL Sybase statements with joins or Informix statements

** These files contain specific configurations and customizations.

Argument -s

This argument is used to migrate PowerBuilder application or target containing only shared libraries while avoiding duplicate migrated code. As we know .pbl libraries can be shared by multiple targets. If the -s argument is not indicated and there are targets using the same libraries, then each target will migrate that same library causing duplicated libraries.

To avoid this behavior, creating a target with all the shared libraries on a new PowerBuilder application is required. This new target should compile without errors. The -s argument for the rest of the target must have the path where share libraries target was migrated.

To migrate the shared library target, both arguments, -o and -s will have the same path.

Example:

Shared libraries target

-i C:\source\sharedLibrary -o C:\migration\sharedLib -s C:\migration\sharedLib

Now, to convert the other targets using the migrated shared library, use the shared library migrated path in the -s argument. The tool will use the migrated code in the sharedLib folder to be able to migrate other targets that make reference to the shared library.

Example:

Normal target using migrated shared library

-i C:\source\target -o C:\migration\target -s C:\migration\sharedLib

Argument -t

If the -t is specified, the name of the pbt file should be included on the -i path. Example:

-i C:\source\target1.pbt -o C:\migrated -t

If -t is not specified, the migrator will find and migrate all the pbt files on the -i path. Example:

-i C:\source -o C:\migrated

Argument -q

You can specify which parsers you want to use to migrate code. The supported parsers are Oracle (Ora), TSQL (TSql) and Sybase (Sy).

The default parser is Oracle. If the -q argument is not specified, the migrator will use Oracle parser to parse all SQL statements in the code.

If you want to specify more parsers, in case of not supported statements, you can use the following command:

-i C:\source\target1.pbt -t -o C:\migrated -q Sy;Ora;TSql

In this case, if the migrator is not able to parse the code with Sybase, then it will do it try with Oracle. If it also fails, then it will use TSQL.

Argument -r

Using this argument, you can load an XML file with configuration details needed for the migration. For example, the XML file may include which datawindows need to be converted to pdf (reports) or background colors to be excluded. Also, with the useOnlyFreeForm configuration you can migrate all the dataManagers as FreeForm.

-i C:\source\target1.pbt -t -o C:\migrated -q Sy;Ora;TSql -r C:\source\config.xml

Example of the config file:



    
        
        
    
    
        #C0C0C0
    
    
        true
    

Argument -f

This argument is temporal. It will be removed after Sybase and Informix parsers are finished. If you need to use the Sybase parser, you must specify -f Sy, to convert Informix statements use -f Informix

-i C:\source\targe1.pbt -t -o C:\migrated -f Sy
PreviousIntroductionNextPost-Conversion

Last updated 2 months ago

Was this helpful?