Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
サーバーではなく、アプリケーションのJREバージョンを検索したいjavacodeを使用することを意味します。私の本番サーバーには、tomcat、websphere、axwayなどのJavaで何千ものアプリケーションがあります。特定のアプリケーションのjreバージョンを知りたいのですが、クラスを作成し、それを使用して印刷したいと思います。そのクラスは特定のアプリケーションに配置されます。
このリンクを試しましたが、わかりませんでした。
System.out.println(System.getProperty("java.version")); コードの実行に使用される Java の実際のバージョンを出力することをテストしました。
System.out.println(System.getProperty("java.version"));