Monday, April 1, 2019

Way to use Java to grab classpath

Easy to combine with the IScript from before.

Function Test_Java_Path();
   %Response.SetContentType("text/plain");
   %Response.WriteLine("");
   %Response.WriteLine("------ Java -------");
   Local JavaObject &sys = GetJavaClass("java.lang.System");
   Local string &cp = &sys.getProperty("java.class.path");
   Local array of string &tokens = Split(&cp, &sys.getProperty("path.separator"));
   For &i = 1 To &tokens.Len
      Local string &token = Lower(&tokens [&i]);
      %Response.WriteLine("&token:  " | Lower(&tokens [&i]));
   End-For;
End-Function;

No comments:

Post a Comment