-1

It would be useful to have a java runtime option which does not do anything but only for informational purposes.

Background: We have a custom scheduler system with Web interface where we put command lines to start our jobs, and having that option would allow us to easily search by text criteria among these command lines.

So ideally this would look like

java <some_options> -XX:Comment="my comment" MyClass

Important thing, there must be a guarantee that this option will not affect the functioning of the program in any way.

The only idea I can think of is using option -D with non-existent property name. Is there any better idea?

dbc
  • 104,963
  • 20
  • 228
  • 340
ALV00
  • 9
  • 2

1 Answers1

0

I think if you need a flag to help you search your commands, you can just add a field or column to the command record which help searching. For example, Suppose your command is stored in a table Command of a database. It may look like this:

cron command keywords
1,3,4,7 * * * * java Myclass1 hello world,apple
1-6 * * * * java Myclass2 orange
vipcxj
  • 840
  • 5
  • 10