1

I am developing an application in java for mac osx. I need to implement a custom protocol for it. Its same as some inbuilt application in osx, like when we hit mailto:// in Safari browser it open default mail application. My requirement is same as it. I have written following code in info.plist of application bundle and its working fine.

 <key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleURLName</key>
        <string>SBR</string>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>sbr</string>
        </array>
      </dict>
    </array>

I can open my application using Safari browser by hitting sbr://.

Problem- I want to pass some argument with this protocol like sbr://user:pass@abc.xyz.com and then take these arguments user:pass@abc.xyz.com as String in java code to perform some operation.

Any help or suggestion is appreciated. thanks.

kazanaki
  • 7,988
  • 8
  • 52
  • 79
Mukesh Kumar Singh
  • 4,512
  • 2
  • 22
  • 30

1 Answers1

0

I think I found the solution to your problem:

https://stackoverflow.com/a/31694986/382877

It worked for me. I was using MacOS X 10.8.2

Community
  • 1
  • 1
rigon
  • 1,310
  • 4
  • 15
  • 37