Introduction
In this article, you will learn how to set Java command-line parameters for the ZappySys JDBC-ODBC Bridge Driver using the JdbcBridge.properties options file.
This approach allows you to configure Java runtime behavior—such as system properties, proxy settings, and Java runtime paths—without modifying application code or manually editing the Java command line.
Scenario
If you need to set a property for the java.exe command line, such as the one below, you can use the JdbcBridge.properties file mentioned in this article.
For example, if you want to pass some system-level property (indicated by the -D switch in java.exe), your command line may look like the one below in JAVA. In the next section, we will see how to achieve the same effect in the ZappySys JDBC Bridge Driver.
Example: Set System Property via Java Command Line
java.exe -Dsome_property1=some_value1 ....
Example: Set multiple System Properties via Java Command Line
java.exe -Dsome_property1=some_value1 -Dsome_property2=some_value2 ....
To achieve the same in Java code, you might do something like below.
System.setProperty("some-property-name1", "some-value1");
System.setProperty("some-property-name2", "some-value2");
...
Setting System Properties in JdbcBridge.properties (Options file) for JAVA Command Line
Let’s look at an example file for setting System Properties in the JDBC Bridge Driver, which yields the same result as the previous command line we saw.
- Create a new file named
JdbcBridge.propertiesatC:\Program Files (x86)\ZappySys\ZappySys ODBC PowerPack(Assuming you installed ZappySys ODBC PowerPack at the default location) - Paste the following code in the file and save it.
This sample is to enable Web Proxy for JDBC Drivers accessed by ZappySys JDBC-ODBC Bridge Driver.
java.args= -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8888 -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888
Setting Java Runtime Path (in case multiple versions are installed)
Another common setting you can change in the properties file is the Java Runtime folder path (where java.exe is located). This is useful when you have multiple runtimes installed (e.g. Java 8, Java 12, Java 17..)
java.path=c:\Program Files\Amazon Corretto\jdk1.8.0_382\bin
Confirming if Java Command Line loads Custom Options
Now, to confirm if your settings are applied on the Java command line, you can perform the following steps.
- Open Task Manager.
- Go to the Details tab.
- Right-click any column header and select Select columns.
- Enable the Command line column.
- Open the JDBC Bridge Data Source UI.
- Click Test connection.
- Go back to Task Manager quickly and review the java.exe entry in the Details Tab. If it shows all options as per your JdbcBridge.properties, then it’s good. If it doesn’t show, you need to kill the java.exe instance, close/reopen any open ODBC UI as described at the end of this article, and try testing again.
Available Options
######################################################
##Sample settings file for ZappySys JDBC Bridge
######################################################
# 1. Create a new text file, name it JdbcBridge.properties, copythe settings listed below, use # to comment lines, or use blank lines for spacing
# Format is prop_name=prop_value (do not use a space before or after the equal sign)
# 2. Copy your JdbcBridge.properties file and place it in the installation directory (root) or any other individual driver folders where the JdbcBridge.jar file is located.
# Example Paths:
# C:\Program Files (x86)\ZappySys\ZappySys ODBC PowerPack
# OR C:\Program Files (x86)\ZappySys\ZappySys ODBC PowerPack\JdbcBridgeDriverX86
# OR C:\Program Files (x86)\ZappySys\ZappySys ODBC PowerPack\JdbcBridgeDriverX64
# OR C:\Program Files (x86)\ZappySys\ZappySys ODBC PowerPack\ZappySys.TdsServer.WindowsService
###Enable Additional log from the Java side, like below
#app.logfile=c:/temp/JdbcBridge_log.txt
Set custom Java runtime path rather than using the default path, like below (uncomment/change as per your need)
---------------------------------------------------------------------------------------------------------
#java.path=c:\JAVA\JDK8\bin\
#java.path=c:\Program Files\Amazon Corretto\jdk1.8.0_382\bin
###Enable HTTP/HTTPS Proxy like below (e.g., Use Fiddler Proxy or other Web Proxy)
#java.args= -Djava.net.useSystemProxies=true
#--OR--
#java.args= -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8888 -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888
#--OR--
#Tools like Fiddler (web proxy tool) will need some extra settings to trust self-signed certificates
#https://azureossd.github.io/2017/04/26/capture-java-vm-traffic-using-fiddler/
#java.args= -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8888 -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888 -Djavax.net.ssl.trustStore="c:\Program Files\Amazon Corretto\jdk1.8.0_382\bin\FiddlerKeystore" -Djavax.net.ssl.trustStorePassword=test123
Restarting Java after making changes
After saving JdbcBridge.properties, the JDBC Bridge may take up to one minute to terminate the existing Java process if it is idle.
After one minute of idle time, JDBC Bridge terminates the Java instance, so the next time you access JDBC Bridge, it will read your options file.
To kill Java forcefully, open Task Manager, find the java.exe Process, and end it. If you have multiple Java.exe files, then choose the one that has the command line below
How to check if a port is used by any application (use netstat)
After changing to the new Port, you can confirm whether the old Port is still in use with the following command.
- Open the command line
- Run the command below (change the Port to whatever Port you want to search)
netstat -ano | findstr :50433 - If the Port is not used, you will see a blank; else it may showa few entries like below
How to check which process is holding this Port
Here’s a clearer version of the text: To identify which process is using a specific port number, follow these steps:
- Run the command to search for the Port and note the PID (Process ID), which is the last column in the console output. This PID corresponds to the process that is holding the Port.
netstat -ano | findstr :5000 - Open the Task Manager.
- Navigate to the Details tab.
- Sort the list by the PID column and locate the PID to match it with the console output. This will identify the process that is holding the Port.
To release the Port, you need to terminate this process. If possible, avoid killing it abruptly; instead, try to exit it gracefully.
Additional resources
Still need help?
If the issue persists, please contact our support team:
- Live Chat: Open the chat widget (bottom right of this page)
- Email: support@zappysys.com
- Support Centre: https://zappysys.com/support/




