#Start a jar file from another java application and debug its output

17 messages · Page 1 of 1 (latest)

dusky lichen
#

So basically i start a jar file from another java app and i want to display that started jar's output with a System.out.println using the application that i use for starting that jar.

This is the code i'm actually using simply for starting it but i need to find a way to get its debug
Runtime.getRuntime().exec("java -jar wizzed.jar " + currentSex + "/config.yml").waitFor();

orchid cloakBOT
#

This post has been reserved for your question.

Hey @dusky lichen! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

patent pendant
#

I'm not sure if this is exactly what you want, but java -agentlib:jdwp=transport=dt_socket,address=8080,server=y,suspend=n -jar should run the jar in a debugger

dusky lichen
patent pendant
#

Elaborate.

dusky lichen
# patent pendant Elaborate.

so i start wizzed.jar with those parameters using my program and then from my program how can i access that jar file's debugger?

patent pendant
#

i don't quite get your question

dusky lichen
#

i need to start a jar file with my java application and how can i display that started jar's logs in my application? Thats what i want to do

cerulean citrus
patent pendant
#

wait

#

you can actually log runtime exec outputs?

dusky lichen
#

you can also log them to files

patent pendant
#

interesting

#

i never knew that