简体   繁体   中英

Passing java command line arguments to a plugin

The Setup:

I am writing a plugin. The plugin runs under a program that was built upon the NetBeans Module platform. So in order to run my code, first you launch the main program, then activate the plugin.

The Problem:

I am working on internationalization, and the first language is Japanese. I have it working for the most part, but there are a handful of bugs our Japan office has identified that I need to deal with. In order to avoid having to do an extended back & forth effort with the Japanese office, I'm trying to get my plugin to work in Japanese on my workstation by changing the locale, either through a setenv command for the session, or using the "-locale ja" command line argument.

Both will get the main program to switch over to Japanese, but the plugin refuses to run in anything but English. The guys in the Japan office (whose machines are permanently set to JP_ja) have no trouble getting the plugin to use Kanji without any command line arguments.

The Question:

How do I get my plugin to use the correct locale setting?

Thanks

For anyone who is curious, I found the answer.

Launch the main program with jvmargs, like this:

/mainProg -jvmargs "-Duser.country=JP -Duser.language=ja"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM