Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
JCarty
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

[ Edited ]

Since I've had to recently wipe the RC version of Windows 7 off of my Lenovo notebook PC and put the retail version on (Windows 7 Professional 32-bit), I've decided to write this walkthrough since I was able to replicate the steps that also work on my Windows 7 Ultimate 64-bit desktop machine.

 

These steps should also work on Vista and some steps can be skipped for XP.

 

Note: This walkthrough gets you a running copy of Eclipse with BlackBerry Java Plugin 1.1  for Eclipse (currently Beta 2) on a Windows 7 32-bit or 64-bit machine. I am not responsible if these steps render your machine unusable (even though they shouldn't, it is for my protection against blame :smileyhappy: ). As always, back up your existing files if you are nervous that this may cause some harm.

 

** Images coming soon **

 

Download all of your necessary software files


Files needed:

  • Java SE, Version 6 (32-bit JDK)

http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start...

 

  • Eclipse 3.5 (for Java Developers. Don't download the Java EE file)

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/ecl...

 

  • Blackberry Java Plug-in for Eclipse

http://na.blackberry.com/eng/developers/devbetasoftware/javaplugin.jsp

 

Install Java SE


Some people like to install this directly to the C drive (and I agree) but I left the default of C:\Program Files\Java\ (C:\Program Files (x86)\Java for 64-bit systems).

 

Just follow the wizard to install it to either the default path or some path like C:\tools\java and your set.

 

** JUST NOTE THE PATH YOU'VE USED SINCE IT'S NECESSARY FOR THE NEXT STEP **

 

Set your PATH variable


This step wasn't necessary for my 64-bit machine but I'll put it here since it solves a lot of problems.

 

  1. Click Start
  2. Type View Advanced System Settings in the search (partial search works too).
  3. Click Environment Variables
  4. Under  System Variables, click New.
  5. For variable name, type JAVA_HOME.
  6. For variable value, use the path from your Java SE install (e.g. C:\Program Files (x86)\Java\jdk1.6.0_17 OR C:\Program Files\Java\jdk1.6.0_17 OR C:\tools\Java\jdk1.6.0_17)
    and press OK.
  7. In the scroll box, find the Path variable
  8. Double-click that row or select the row and click Edit
  9. In the beginning of the Variable Value textbox, paste the following (thanks mreed):
    %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

     

  10. Press OK on all open dialogs.

Install Eclipse


Installing Eclipse is as easy as extracting the zip file that was downloaded earlier. Placement is key.

Extract the downloaded zip file for Eclipse (eclipse-java-galileo-SR1-win32.zip) to C:\

Verify that a folder called C:\eclipse\ was created and eclipse.exe is directly under it.

 

** If you already have this folder and don't want to touch it, just rename it C:\eclipseBB\ or something to your liking for the rest of the steps in this walkthrough. **

 

Install the BlackBerry Java Plug-in


Find and double-click the downloaded exe from the download link and follow the steps. When choosing the existing eclipse install folder, choose your eclipse install folder and let the install finish.

 

Setting up permissions (Skip for XP)


Disclaimer: This isn't for the squeamish that care about security on the eclipse folder. I just wanted it to work and it worked. If you see a better way of keeping this folder secure and getting it to work, let me know.

 

  1. Open Computer and go into C:\
  2. Right-click on the eclipse install folder and click properties.
  3. Under Security, click the Edit button.
  4. Add the user that will be logging in during development.
  5. Click the user in the top list box and give that user Full Control by checking the first checkbox under the Allow column in the lower list box. Press OK on all open dialog windows.

Compatibility Mode (Skip for XP)


  1. Open the eclipse folder
  2. Right-click on the eclipse.exe file and click Properties
  3. Under the Compatibility Tab, change the following:
    1. Check the Run this program in compatibility mode for checkbox and select  Windows XP (Service Pack 3)
    2. Check the Run this program as an administrator checkbox
    3. Press OK.

Pin to Start Menu and/or Taskbar (Optional)


This step is completely optional but why not take advantage of the new features in Windows 7?

  1. Right-click on the eclipse.exe file again
  2. Based on your preference, you can either pin it to the taskbar or the start menu or both by clicking Pin to Taskbar or Pin to Start Menu.

Starting up Eclipse


We're almost there!!!

 

It will now ask you where you want to store your workspace. I use one workspace for all my projects and place it in C:\BBWS\.

 

  1. Once Eclipse is started, go to Window > Preferences > Java > Compiler and set the Compiler Compliance Level to 1.4.
  2. Go to BlackBerry Java Plugin > Code Signing and check off all 3 checkboxes if and only if you have code signing keys and want to suppress the warnings. This is also where you can import existing keys from a previous eclipse install or install new keys if you have just purchased them.
  3. Go to BlackBerry Java Plugin > Debug and uncheck Prompt for missing debug files

Import your old projects (if any)


If you have projects set up in another workspace that were in the previous JDE Plug-in for Eclipse (or the JDE I'm not 100% sure but I believe so), you can import them with ease.

 

  1. Go to File > Import
  2. Click Import Legacy Blackberry Projects and click Next
  3. Select a JRE which is similar to your previous JDE Component Packs (5.0 for OS 5.0, 4.7.0 for your storm 1 development, etc.).
  4. Browse for your BlackBerry Workspace and select the projects you'd like to import from the box below and finish up. You can choose to copy the projects to your workspace. I would copy them in and leave the old install intact in case you don't like the current plug-in's state.

All set. If anyone has any questions, let me know. I also have a walkthrough on using subversion with all of this which works great for development between my different PCs as well as for deploying projects.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

Thanks for this Jerome, excellent stuff.  Not tested mind you, still running XP, the upgrade disk is in the list of things to do....

Please use plain text.
Developer
JCarty
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

No problem Peter. I see you guys give a lot back to the community so I wanted to do the same. I'm pulling for RIM so I'd like to help as best as I could. I also didn't want to sacrifice losing my new operating system for my development.

 

So hopefully RIM will fix all of the issues and get it working on the newer OS but in the meantime, it'll hopefully serve everyone well.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Please use plain text.
New Developer
ahmdsd_ostora
Posts: 35
Registered: ‎02-01-2010
My Device: 8300
My Carrier: Etisalat

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

Thank you alot for this great topic, but I have a problem in runnig my projects. When I build any imported blackberry sample, it builds well. But when I run it on the simulator, it just doesn't appear in the applications menu.

 

I am working on Windows 7, Eclipse 3.4.1, and JDE 4.5

Thanks again..

 

Please use plain text.
Developer
JCarty
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

[ Edited ]

 


ahmdsd_ostora wrote:

Thank you alot for this great topic, but I have a problem in runnig my projects. When I build any imported blackberry sample, it builds well. But when I run it on the simulator, it just doesn't appear in the applications menu.

 

I am working on Windows 7, Eclipse 3.4.1, and JDE 4.5

Thanks again..

 


 

 

I was having this same issue on my notebook which is why I decided to wipe it (it didn't have final version of Windows 7 on it). Do you have a retail copy of Windows 7? Is it 32-bit or 64-bit? Is it a retail copy or is it the Release Candidate (RC) version?

 

Once I placed Windows 7 Professional (32-bit) Retail on my notebook, all my issues cleared up.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Please use plain text.
New Developer
cwhite124
Posts: 9
Registered: ‎01-09-2010
My Device: BlackBerry Curve 8530

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

Nice write-up.  I am up and running with this and have added the other BB component packs.  You might want to add a section at the end of your write-up on how to add in the 4.X component packs. 

 

One question, I need to build/test/run/debug against multiple BB component packs.  In the old Eclipse Plug-in it was pretty straightfoward with respect to setting your current working component package.  I don't see anything analagous to this in Eclipse with the new plugin.  The only place where I see that I can set the target component package is when creating a new debug configuration.

 

Do you have any insight into how this is best done with the new plugin?  My guy feeling right now is that this new plugin has made it harder to do what I need which is never a good thing.  A new version should be making my life easier.  Any help would be appreciated but I will continue to poke around and try different things.

 

Thanks!

Chris

Please use plain text.
Developer
JCarty
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

[ Edited ]

The new plug-in, in my opinion, makes it easier. What you'd do is right-click on the root of the project, go to Build Path > Configure Build Path.

 

Click on the JRE that is in there and click Edit or double-click on it. Choose the JRE/JDE Pack you'd like to use for that particular project (which is the best part).

 

As far as I know, when you download the exe file, the 4.X version component packs come with the installer.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Please use plain text.
New Developer
maxx233
Posts: 9
Registered: ‎08-12-2009
My Device: Not Specified

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

Thanks for this!  I wish I'd had it when I set eclipse up on my win7 workstation... it was a pain in the butt!  If I have to wipe it anytime I know where to look :smileyhappy:

Please use plain text.
New Member
GaryK
Posts: 1
Registered: ‎02-23-2010
My Device: Blackberry Curve 8900
My Carrier: O2

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

This is all very dandy for those of you who have the technology and understanding to execute such commands.

fOR ME, THAT JUST ISNT AN OPTION. 

 

For those lesser mortals, like me, shouldnt we be able to ask BB or Microsoft to sort out their compatability problems first then deliver us a solution.   After all we pay good money for their software and hardware. Why should we have to iron out their problems.

 

Im a consumer, ive paid my money, i dont have the time or the inclination to sit here trying to get these things to work for hours on end and possibly jeapordise other programs i have in the long run.

 

Surely a simply syncronisation problem should be so insurmountable for them to rectify.

 

 

Please use plain text.
Developer
JCarty
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Windows 7 and BlackBerry Java Plug-in for Eclipse 1.1 Beta Walkthrough

I understand your frustration and am right there with you. They are working out all of the kinks and hopefully it'll be released soon (like tomorrow) but we have to wait until they release it unfortunately.

 

This is a workaround for the people who still want to give it a go (even if there is some hassle).

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Please use plain text.