Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
michalcz
Contributor
Contributor

How to determine, if a job has been launched from IDE or shell

Hello Community,

I would ask you, if there is a way how to determine - at runtime (e.g. using tJava component) - if a job has been launched from IDE or from shell.

Thanks in advance

Michal

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi @michalcz,

 

This is a real hack, but it worked when I tried it....

 

java.io.Console console = System.console();
if (console != null) {
   System.out.println("CommandLine");
} else if (!java.awt.GraphicsEnvironment.isHeadless()) {
   System.out.println("Studio");
}

Regards

 

Richard

View solution in original post

3 Replies
Anonymous
Not applicable

Hi @michalcz,

 

This is a real hack, but it worked when I tried it....

 

java.io.Console console = System.console();
if (console != null) {
   System.out.println("CommandLine");
} else if (!java.awt.GraphicsEnvironment.isHeadless()) {
   System.out.println("Studio");
}

Regards

 

Richard

michalcz
Contributor
Contributor
Author

Hi @rhall,

thank you, it works as expected.

 

Regards

Michal

Anonymous
Not applicable

Glad it worked for you