开发者

BlackBerry Java SDK < 6.0.0 on Mac

开发者 https://www.devze.com 2023-02-03 00:46 出处:网络
I have a brand new installation of Eclipse with BlackBerry Plugin 开发者_如何学Cfor mac. The Java SDK 6.0.0 is already installed, the only thing now is that I want to compile for minor version, like 4

I have a brand new installation of Eclipse with BlackBerry Plugin 开发者_如何学Cfor mac. The Java SDK 6.0.0 is already installed, the only thing now is that I want to compile for minor version, like 4.5.0

I have tried : Help -> Install New Sotftware... -> http://www.blackberry.com/go/eclipseUpdate/3.5/java

But it gives me an error.

"No repository found at http://www.blackberry.com/go/eclipseUpdate/3.5/java"

anyone had the same issue ? It seems that it worked for some people.


I don't know if what you're trying is possible, I also couldn't get it to work. According to the RIM site, they don't support building apps on OS X for non-6.0 right now, and based on the workaround below, I think it might not be as simple as installing the packages from the Eclipse installer.

However, I found a great post on building BlackBerry apps on OS X, and since then I've been working on my MBP, and can't say I would turn back. Here's a summary of how I got it set up:

  1. Install Eclipse (I am using 3.5, but it may not matter) and VirtualBox.
  2. Create a new VM and install Windows (tested with XP SP3). This would probably work using VMWare Fusion or Parallels too.
  3. On the VM, install Java 6 and the version of the BlackBerry JDE that matches your target OS.
  4. In OS X, download bb-ant-tools.jar and move it to ~/.ant/lib.
  5. Get an OS X version of preverify, which is included in the Sun J2ME SDK 3.0 for OS X. Install it and either copy /Applications/Java_ME_SDK_3.0.app/Contents/Resources/bin/preverify to somewhere in your PATH or just add that directory to your PATH.
  6. If you don't have one already, create the file ~/.MacOSX/environment.plist.
  7. Edit this file with /Developer/Applications/Utilities/Property\ List\ Editor.app/.
  8. Create a new variable called PATH and set it to the value of your shell PATH, making sure that the directory containing preverify is included. This allows Ant, via Eclipse, to see the preverify command when Eclipse is launched from Eclipse.app and not from the command line. See this for more details.
  9. In OS X, create a directory for the BlackBerry components (something like "bb-components").
  10. From the BlackBerry JDE installation in the VM, copy both "lib" and "bin" directories to this directory.
  11. In Eclipse, create a new Java project.
  12. Choose "Use an execution environment JRE:" and select Java 1.3.
  13. Right click the project in the "Package Explorer" and select "Build Path" and then "Configure Build Path."
  14. Add bb-components/lib/net_rim_api.jar as an "External JAR."
  15. Remove the "JRE System Library." This is so that only BlackBerry supported classes will be offered via autocompletion etc.
  16. Copy the attached minimal build.xml into the project.
  17. Edit the build.xml to suit your environment (specifically the jde.home property) and anything else you want to customise.
  18. Right click and select "Run as" and then "Ant Build" (the first one). You can also build using Ant on the command line, of course.

These were adapted from https://spin.atomicobject.com/2010/11/04/our-blackberry-development-environment

Good luck!


I develop all of my BB apps on Mac hardware but I'm running Windows through Parallels. Not better than having native Mac tools, but it works!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号