从java小程序检查程序是否安装在linux机器上 [英] Check if a program is installed on a linux machine from a java applet

查看:24
本文介绍了从java小程序检查程序是否安装在linux机器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要能够检查客户端计算机上是否安装了某个软件以及安装在何处,以便启动它.我发现了以下三篇关于如何在 Windows 和 Mac 上执行此操作的帖子,但我似乎无法弄清楚 Linux,因为没有注册表.有谁知道如何在 Linux 上做到这一点?

Hi I need to be able to check if a certain software is installed on the clients computer and where, in order to launch it. I found the following three posts as to how to do so on Windows and Mac but I can't seem to figure it out for Linux as there is no registry. Does any one know how this can be done on Linux?

适用于 Windows 和 Mac 的类似帖子:
可以Java小程序打开一个选择目录"并通过 JavaScript 交互写入文件系统?
使用 Java 读取/写入 Windows 注册表
如何才能我看到使用 Java 应用程序安装在 Mac OS 中的软件?

Similar posts for Windows and Mac:
Can a Java applet open a "select directory" and write to a filesystem via JavaScript interaction?
read/write to Windows Registry using Java
How can I see the software installed in a Mac OS using a java application?

任何帮助将不胜感激:)

any help would be greatly appreciated :)

推荐答案

使用

which file

命令来查明软件是否安装在路径中.如果没有任何结果,那么你可以做一个

command to find out if the software is installed in the path. If that comes up with nothing then you could do a

find ./ -name "file"

还要检查他们的本地 bin 或 .bin,如果它不包含在路径中.

Also check their local bin or .bin if its not included in the path.

这篇关于从java小程序检查程序是否安装在linux机器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆