3

Everywhere I look when seeking for a way to hide a Java applications dock icon, I see info.plist file this and info.plist file that. However I don't see one.

My question is How do i generate an info.plist file in eclipse? Where does it belong? And why did Eclipse not generate an info.plist file when I exported as mac osx bundle.

This is a view of my project files in eclipse, as you can see there is a manifest, but no info.plist:

enter image description here

Is there something i'm not getting about the info.plist file?

Community
  • 1
  • 1
ThatGuy343
  • 2,354
  • 3
  • 30
  • 55

1 Answers1

2

The Info.plist is generated by Eclipse and resides in the application bundle. To create an app bundle in Eclipse, select Export > Mac OS X application bundle. Select an output directory and you should see a directory like this created:

MyApp.app/

Inside of MyApp.app is a subdirectory called Contents. Here is where you'll find the Info.plist file.

MyApp.app/Contents/Info.plist

The Info.plist file (nor any of the application bundle files) won't appear in your project. These are generated build files.

martinez314
  • 12,162
  • 5
  • 36
  • 63
  • Okay, so it sounds like we're not supposed to even touch an info.plist file. Fine. If that's the case, though, how does one go about changing the name that appears in Mac OS X's menu bar at the top of the screen for a Java application? I really don't want "LoginDialog" to be up there all the time, even hours after a user has logged into an application. (As a side note, I wouldn't mind an answer for this on the Windows side, too.) – Sturm Oct 06 '14 at 21:06
  • @Sturm hey, in eclipse I'm pretty sure that when you setup the Run Configuration for your project. the name set in there is used for the applications name in the OS X menu bar. I remember changing it somehow but i don't have the project there anymore. I may be wrong but I'm pretty sure it was based of what i set in run configuration. – ThatGuy343 Oct 08 '14 at 06:18
  • Sadly, @ThatGuy343, I'm afraid that doesn't work; I just tried it. The Run Configuration name is ignored and the name appearing in the OS X menu bar is still the name of the main Class. – Sturm Oct 08 '14 at 13:20
  • @Sturm Yes, you can edit Info.plist. There's plenty you may want to add to it. Check that it contains: `CFBundleNameMyAppName` – martinez314 Oct 08 '14 at 14:23
  • Okay, @whiskeyspider, sounds good… Except that Eclipse seems to create a useless application bundle. I double-click the Scheduling.app file that it generated and nothing happens. Should I copy the runnable JAR file that Eclipse can also create into that application bundle folder? And if so, why doesn't Eclipse just do that, too? – Sturm Oct 08 '14 at 18:09