Question

Is there a Linux equivalent to the Apple application extensions for Java (com.apple.eawt), as well as bundling a standalone application (defining an app bundle with Info.plist on OS X). Specifically I would like to be able to:

  • provide an application icon for the desktop/dock
  • specify JVM parameters, such as -Xmx
  • define custom document types with icons and roles (viewer, editor)
  • be able to listen to file-open events for these documents, if the user double-clicks them on the desktop
Was it helpful?

Solution

I think the closest thing to what you are looking for is the Desktop Entry. See these two questions for more info:

Register file extensions / mime types in Linux

Embedding an icon in a Linux executable

  • provide an application icon for the desktop/dock

Another option here is to simply set the application icon in code: myFrame.setIconImage(). This will show my application icon in the Ubuntu dock.

  • specify JVM parameters, such as -Xmx

Another simple option: create a shell script that starts your Java program and sets all the necessary parameters.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top