Do you have the option to install a Java application as the default file opener?

I was looking for a way for users to set my program as default, to open files for a while and not find anything. I have a program that should be universal for Mac, Windows, and Linux, so I don’t want to use a method that works with only one OS. So, how can I give users the ability to install the Java application as the default file opener? Would I use the Desktop class?

+5
source share
2 answers

No Java supports this. You will need to write a small application for each OS that you want to support in your own language (C ++, object c, etc.), which simply launches your Java application every time it is opened. You can then install this application as the default program.

0
source

Here's the answer to stackoverflow: Use a Java application as the default program for a specific file type?

Send an answer:

JAR files are usually not executed. That is, the JAR file is not a valid Windows application. It doesn't matter if the JAR extension itself has an associated application by default because Open Verb is not used recursively in other Open Verb definitions.

Instead

  • ( ".BAT" ) ( EXE), java ( javaw, ) " ". ( .) ,
  • , "Open verb" JAR java ( javaw). , : javaw -jar TheJarFile.jar "% 1%". ( , javaw , TheJarFile.jar .)

. java - Java java/javaw.

. Linux Mac , , java .

0

All Articles