• 0

java and bluetooth


Question

I just d/l the java bluetooth api and gots a question about it: in the api that comes with the zip file they talk about two packages, javax.bluetooth and javax.obex. where are these two packages in the zip file? all I found were some .java files. how do I install the sun java api and how can I access the new commands?

LINK: Sun DownloadPage

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

When I unzipped it, I got these files:

inflating: btapi_appendix.zip

inflating: btapi_javadocs.zip

inflating: btapi_source.zip

inflating: Changes.doc

inflating: JSR82-spec_1.0a.pdf

Extracting the source one I get:

Archive: btapi_source.zip

creating: javax/

creating: javax/bluetooth/

inflating: javax/bluetooth/BluetoothConnectionException.java

inflating: javax/bluetooth/BluetoothStateException.java

inflating: javax/bluetooth/DataElement.java

inflating: javax/bluetooth/DeviceClass.java

inflating: javax/bluetooth/DiscoveryAgent.java

inflating: javax/bluetooth/DiscoveryListener.java

inflating: javax/bluetooth/L2CAPConnection.java

inflating: javax/bluetooth/L2CAPConnectionNotifier.java

inflating: javax/bluetooth/LocalDevice.java

inflating: javax/bluetooth/RemoteDevice.java

inflating: javax/bluetooth/ServiceRecord.java

inflating: javax/bluetooth/ServiceRegistrationException.java

inflating: javax/bluetooth/UUID.java

creating: javax/obex/

inflating: javax/obex/Authenticator.java

inflating: javax/obex/ClientSession.java

inflating: javax/obex/HeaderSet.java

inflating: javax/obex/Operation.java

inflating: javax/obex/PasswordAuthentication.java

inflating: javax/obex/ResponseCodes.java

inflating: javax/obex/ServerRequestHandler.java

inflating: javax/obex/SessionNotifier.java

This is where the packages are, notice the directories. And when I open up one, like javax/bluetooth/BluetoothConnectionException.java, I see in the first line after comments:

package javax.bluetooth;

That means it's in that package, so it should be in a directory under javax/bluetooth, which it is.

Link to comment
Share on other sites

  • 0

Put the directories in the same directory as your package/application. Or actually you don't even need to unzip the source zip file, just put it in your sourcepath ".:/location/of/btapi_source.zip" or if you decide to put the extracted directories elsewhere, add the directory you extracted them to to your sourcepath.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.