博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
java 创建实例 方式_SingleRun-创建单实例快捷方式
阅读量:2533 次
发布时间:2019-05-11

本文共 1945 字,大约阅读时间需要 6 分钟。

java 创建实例 方式

介绍 (Introduction)

I developed this SingleRun application to address a business requirement. The requirement called for a method to allow only one instance of an application, taking arguments into account, when a user clicked on a shortcut.

我开发了此SingleRun应用程序来满足业务需求。 该要求要求一种方法,当用户单击快捷方式时,该方法仅允许应用程序的一个实例(考虑参数)。

In addition to this, when the application is already running, clicking on shortcut should bring the application into focus.

除此之外,当应用程序已经在运行时,单击快捷方式应该使应用程序成为焦点。

Although I frequently use the application, it is a bit of a niche solution so sharing it, hoping that someone will find it useful.

尽管我经常使用该应用程序,但它还是一个小众解决方案,因此可以共享它,希望有人会发现它有用。

实作 (Implementation)

(
)

步骤1)下载Visual Studio项目 (Step 1) Download Visual Studio Project )

(Source Code)

(源代码)

(Binary)

(二进制)

Step 2) Save to a convenient location (C:\Program Files\SingleRun in this article)

步骤2)保存到方便的位置(本文中的C:\ Program Files \ SingleRun)

Step 3) Create a SingleRun shortcut. You can create a SingleRun shortcut with by one of two ways:

步骤3)建立   SingleRun快捷方式。 您可以通过以下两种方式之一来创建SingleRun快捷方式:

Method 1) Drag and drop

方法1)拖放

Method 2) Command line

方法2)命令行

SingleRun supports the following command line arguments:

SingleRun支持以下命令行参数:

SingleRun.exe scope workingfolder target arguments

SingleRun.exe作用域工作文件夹目标参数

scope: Computer or User

范围:计算机或用户

workingfolder: Working folder to change context to

workingfolder 将上下文更改为的工作文件夹

target: The path the application to star

目标:应用程序启动的路径

arguments: Argument of the target

参数:目标参数

演示执行 (Demo execution)

I hope you found this tutorial useful. You are encouraged to ask questions, report any bugs or make any other comments about it below.

希望本教程对您有所帮助。 鼓励您在下面提出问题,报告任何错误或对此作出任何其他评论。

Please do not forget to press the "Thumb's Up" button if you think this article was helpful and valuable for EE members.

如果您认为本文对EE成员有用且有价值,请不要忘记按“ Thumb's Up”按钮。

It also provides me with positive feedback. Thank you!

它还为我提供了积极的反馈。 谢谢!

翻译自:

java 创建实例 方式

转载地址:http://nyhzd.baihongyu.com/

你可能感兴趣的文章
两台电脑如何实现共享文件
查看>>
组合模式Composite
查看>>
程序员最想得到的十大证件,你最想得到哪个?
查看>>
我的第一篇CBBLOGS博客
查看>>
【MyBean调试笔记】接口的使用和清理
查看>>
07 js自定义函数
查看>>
jQueru中数据交换格式XML和JSON对比
查看>>
form表单序列化后的数据转json对象
查看>>
[PYTHON]一个简单的单元測试框架
查看>>
iOS开发网络篇—XML数据的解析
查看>>
[BZOJ4303]数列
查看>>
一般处理程序在VS2012中打开问题
查看>>
C语言中的++和--
查看>>
thinkphp3.2.3入口文件详解
查看>>
POJ 1141 Brackets Sequence
查看>>
Ubuntu 18.04 root 使用ssh密钥远程登陆
查看>>
Servlet和JSP的异同。
查看>>
虚拟机centOs Linux与Windows之间的文件传输
查看>>
ethereum(以太坊)(二)--合约中属性和行为的访问权限
查看>>
IOS内存管理
查看>>