FAQ for VB to Java Converter
Q: Is the original VB project altered in any way?
Your existing code is left completely intact. The new Java files are written to the new location that you specify.
Q: What is the conversion accuracy?
Our accuracy is the highest in the industry, but there will be significant adjustments required for all but the most trivial conversions. There are no direct equivalents for some aspects of VB. Read the rest of the FAQ to get an idea of a few things that are not converted. VB to Java Converter is intended to reduce the amount of work you'll have to do to convert VB code to Java, but it is just the first step.
Q: Does VB to Java Converter convert VB6 projects to Java?
No. The most effective and safest way to get from VB6 to Java is to use the upgrade wizard (included with Visual Studio 2008 or earlier) on your VB6 code, and then use VB to Java Converter on the resulting VB code.
Q: How are VB methods with optional parameters converted?
Overloaded methods are created and the 'Optional' keywords are removed. Missing arguments are replaced by the defaults specified by the original VB parameter list.
Q: Are VB delegates converted?
Yes - try out our demo to see the conversion details. We convert delegate declarations to interface declarations and references to delegate instances to anonymous inner classes.
Q: Are VB case statements with range expressions handled?
Yes, VB 'Select Case' blocks containing non-ordinal or range expressions are converted to Java 'if-else' blocks. Other 'Select Case' blocks are either converted to Java 'switch' statements if the expressions are constant (a requirement in Java) or to Java if-else blocks otherwise.
Q: Are VB ByRef parameters converted?
Yes - try out our demo to see the conversion details. We substitute a wrapper type (using Java generics) for the parameter type and adjust all references to the parameter in the defining method and all calls to the method.
Q: What are the most common adjustments necessary after conversion?
Most .NET Framework calls are not converted. However, many references to the .NET String, Char, Hashtable, Dictionary, ArrayList, List, Stack, Queue, StrringBuilder, Array, Math, Convert, Console, and MessageBox classes are converted to Java.
There are no simple equivalents to VB events in Java, so these must be refactored.
Since Java lacks a preprocessor, all code dependent on conditional compilation needs to be refactored so that the functionality can be achieved in other ways. If your target environment is NetBeans, then no adjustments are required since VB to Java Converter converts preprocessor directives to NetBeans format by default (using //#if, //#else, //#elif, //#endif, //#define, and //#undefine).
VB LINQ queries are not converted since this feature is not available in Java.
VB 'Structure' is converted to Java 'class', since Java does not include value types. The Java class does not reproduce the same behavior as .NET value types, so adjustments may be required.
If the VB project did not have 'Option Strict On' set, then you'll likely have a number of cases where different types are compared with each other - these may need adjustment.
Although most On Error GoTo statements are converted, some elements of classic VB unstructured error handling (On Error Resume Next, On Error GoTo -1, etc.) are not converted. These statements are marked as a 'ToDo' task. Also, all references to the VB Err object are not converted and marked as a 'ToDo' task.
‘When’ statements in ‘Catch’ blocks (which have no equivalent in Java) must be manually adjusted. These are commented out and combined with a warning comment.
VB nullable logic cannot be converted since the necessary null-value logic must be applied to every aspect of expressions containing the nullable variable or method call. The only aspect of nullable instances that is converted is the declared type - the corresponding Java wrapper type is used for nullable primitives (e.g., the Java wrapper type 'Integer' is used for VB Integer? or Nullable(Of Integer)).