To capture the execution of a program to BugJail, the only thing you need to do is start Java Virtual Machine with one additional option.
This article links to two alternative ways how to construct the BugJail Agent option string and then shows how to use the option to enable BugJail capturing from programs that are started directly from command-line.
Step 1: Construct BugJail Agent option & copy to clipboard
Alternative A: construct BugJail Agent option string by using Capturing Assistant (easy user-interface, but supports only the two most common configuration options currently).
Alternative B: construct BugJail Agent option string manually (more effort, but allows using additional options).
Step 2: Start JVM from command-line with the BugJail Agent option
- Open shell (Windows PowerShell or Command Prompt, MacOS Terminal, or Linux shell)
- Type the normal command-line that you would use to start the program in JVM.
- Paste the BugJail Agent option string as the first JVM option
- Press "Enter" key (Yes, really).
The format of command-line for starting JVM with BugJail capturing enabled
java <bugjail_agent_option> <your_normal_options>
Example - Starting JVM directly from command-line, with BugJail capturing enabled, on Windows
java.exe -javaagent:C:\Users\Henri\.BugJail\agent.jar -jar somestuff.jar
Example - Starting JVM directly from command-line, with BugJail capturing enabled, on Mac or Linux
java -javaagent:/home/henri/.BugJail/agent.jar -jar somestuff.jar
Step 3: Verify that capturing worked
- In the shell's standard output, you should see extra logging from BugJail Agent
- In BugJail, the "Welcome to BugJail" or "Capturing Assistant" -dialog should disappear within 1-2 seconds, if it was visible, revealing a list of captures.
- In BugJail "Captures" -panel, you should see a new capture row within 1-2 seconds.