MCPcopy Create free account
hub / github.com/SWI-Prolog/packages-jpl / report_versions

Method report_versions

src/examples/java/system/Init.java:73–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72
73 public static void report_versions() {
74 System.out.println("REPORTING VERSION INFO: \n");
75
76 System.out.println("\t swipl.home = " +
77 Query.oneSolution("current_prolog_flag(home, Home)").get("Home").name());
78
79 Term swi = Query.oneSolution("current_prolog_flag(version_data, Swi)").get("Swi");
80 System.out.println("\t swipl.version = " +
81 swi.arg(1) + "." + swi.arg(2) + "." + swi.arg(3));
82
83
84 String pVersion = new Query("jpl_pl_lib_version(V)").oneSolution().get("V").name();
85 String jVersion = JPL.version_string();
86 String cVersion = Prolog.get_c_lib_version();
87
88 System.out.println("prolog library version (jpl.pl): " + pVersion);
89 System.out.println(" java library version (jpl.jar): " + jVersion);
90 System.out.println(" c library version (libjpl.so): " + cVersion);
91
92 if (pVersion.equals(jVersion) && jVersion.equals(cVersion)) {
93 System.out.println("BINGO! you appear to have the same version of each library installed");
94 } else {
95 System.out.println("WHOOPS! you appear not to have the same version of each library installed");
96 }
97 }
98
99
100

Callers 1

mainMethod · 0.95

Calls 6

oneSolutionMethod · 0.95
argMethod · 0.95
version_stringMethod · 0.95
get_c_lib_versionMethod · 0.95
nameMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected