Anonymous user
Program name: Difference between revisions
→{{header|Java}}: Use a system property
m (→{{header|C}}: line continuation so __LINE__ is actually on the line) |
(→{{header|Java}}: Use a system property) |
||
Line 220:
=={{header|Java}}==
You can get the listing of the arguments to the <code>java</code> command through a system property. The first one is the name of the main class that was run.
public class Test{
System.out.println(System.getProperty("sun.java.command").split(" ")[0]);
}
▲ }
=={{header|LLVM}}==
|