Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions persistit/ui/src/main/java/com/persistit/ui/AdminUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Portions Copyrighted 2026 3A Systems, LLC
*/

package com.persistit.ui;
Expand Down Expand Up @@ -202,11 +203,20 @@ public AdminUI(final Management management) {
public AdminUI(final String rmiHost) {
this();
_rmiHost = rmiHost;
if (rmiHost != null)
connect(rmiHost);
}

public AdminUI() {
}

/**
* Builds and displays the UI. Invoke this once, after construction, from a
* thread other than the AWT event-dispatch thread: it launches the
* frame-building helper thread and waits for it to finish. The thread starts
* are kept out of the constructor so that {@code this} does not escape to the
* helper threads before construction has completed (CodeQL
* java/thread-start-in-constructor).
*/
public void launch() {
//
// This is a workaround for JVM bug 4030718 in JDK1.3.
// (See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4030718).
Expand Down Expand Up @@ -855,7 +865,12 @@ public void run() {
}

public static void main(final String[] args) {
new AdminUI(args.length > 0 ? args[0] : null);
final String rmiHost = args.length > 0 ? args[0] : null;
final AdminUI adminUI = new AdminUI(rmiHost);
adminUI.launch();
if (rmiHost != null) {
adminUI.connect(rmiHost);
}
}

/**
Expand Down
Loading