Java command line options

The following options are automatically parsed and available from the command line.


java [all java/JVM options here] -cp “[path to JCOBridge.jar];[classPath]” yourJavaClass [–NativePath:][–LicensePath:] [–CoreCLRRID:] [–CoreCLRPath:] [–CoreCLRApp:]

--NativePath:“PATH”               The path where is located JCOBridge runtime. Default is the same folder of JCOBridge.jar
--LicensePath:“PATH” The path where is located the JCOBridge license file or, starting from version 2.5.*, the URL of the license
--CoreCLRRID: The Rid to use. Searched autmatically, using some system infos. Set it to override searched value
--CoreCLRPath: The fully qualified location of the coreclr library
--CoreCLRApp:"Framework" The "Framework" to be used; valid values are:
- Microsoft.NET5.App (Default), Microsoft.NETCore.App or Microsoft.WindowsDesktop.App (version < 2.5.*)
- Microsoft.NET6.App (Default), Microsoft.NET7.App or Microsoft.WindowsDesktop.App (version >= 2.5.*)

Version 2.5.*+

Starting from version 2.5.* it is possible to use environment variables to set the previous variables, they are parsed from the engine in the same way. The standard behavior is to prepend the name of the command-line option with JCOBRIDGE_, e.g. the command line switch LicensePath becomes JCOBRIDGE_LicensePath

Usage Example (from JCOBridge-Examples):

java -cp “../../CLR/OutputCore/net6.0-windows/JCOBridge.jar;./Output” AWTWinFormsWPFNET5 –CoreCLRApp:Microsoft.WindowsDesktop.App

Code snippet to be used:

import org.mases.jcobridge.*;

public class yourJavaClass {
	public static void main(String args[]) {
		try {
				try {
				} catch (JCException e) {
// all stuff

		} catch (JCException jce) {