BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-21-2009, 09:36 PM   #1
2009.MOBILE
New Member
 
Join Date: Aug 2009
Model: 9000
PIN: N/A
Carrier: AT&T
Posts: 1
Default Eclipse plugin, preverify step: I/O Error: Cannot run program "jar"

Please Login to Remove!

Hi all,

When I preverify the BlackBerry app I'm developing using the Eclipse plugin, I get the following error:
Code:
I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified
This is the same error described in this thread:
developer-forum/137911-i-o-error-cannot-run-program-jar-eclipse-plugin.html

However, I don't know how to fix it using the instructions in that thread. All I see in the Installed Components tree item of the BlackBerry Preferences window is "Choose one of installed Components", nothing about Java Home. Also, how do I modify a PATH variable as described?

Also, I don't think my problem is related to the BlackBerry Preferences as a whole messing up, because I have many projects and only some of them are getting this error, while others are preverifying without error. This is the output when I press Build Active BlackBerry Configuration (with project names edited out):

Code:
Executing rapc for the project [Project1] at Fri Aug 21 18:48:43 PDT 2009.
C:\Program Files\Eclipse\plugins\net.rim.eide.componentpack4.5.0_4.5.0.16\components\bin\launcher.exe C:\Program Files\Eclipse\plugins\net.rim.eide.componentpack4.5.0_4.5.0.16\components\bin\rapc.exe  -quiet import="..\..\..\..\..\Program Files\Eclipse\plugins\net.rim.eide.componentpack4.5.0_4.5.0.16\components\lib\net_rim_api.jar" codename=..\[Project1]\[Project1] ..\[Project1]\[Project1].rapc warnkey=0x52435200 -sourceroot="C:\[...]\Workspace\[Project1]\src" @[Project1]_build.files
I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified
rapc executed for the project [Project1]

Executing rapc for the project [Project2] at Fri Aug 21 18:41:01 PDT 2009.
C:\Program Files\Eclipse\plugins\net.rim.eide.componentpack4.5.0_4.5.0.16\components\bin\launcher.exe C:\Program Files\Eclipse\plugins\net.rim.eide.componentpack4.5.0_4.5.0.16\components\bin\rapc.exe  -quiet import=..\[Import1]\[Import1].jar;..\[Import2]\[Import2].jar;"..\..\..\..\..\Program Files\Eclipse\plugins\net.rim.eide.componentpack4.5.0_4.5.0.16\components\lib\net_rim_api.jar" codename=..\[Project2]\[Project2] ..\[Project2]\[Project2].rapc warnkey=0x52435200 -sourceroot="C:\[...]\Workspace\[Project2]\src" "C:\[...]\Workspace\[Project2]\bin"
rapc executed for the project [Project2]
The second project succeeded but the first one failed. Notice that the second project uses imports, while the first one doesn't. I found the automatically-generated line @[Project1]_build.files in the first highly suspicious, since there's no similar string in the second.

What's going on if the problem is just happening with some, but not all, of my projects?

Thanks!
Offline  
Old 01-21-2010, 12:39 PM   #2
Jerry Brady
New Member
 
Join Date: Jan 2010
Model: 8800
PIN: N/A
Carrier: None
Posts: 1
Default Same here...

I've been experiencing the same issues trying to package certain BlackBerry projects using Eclipse (4.5) and the BB IDE for Eclipse (1.1beta).

If a project doesn't have external libraries, things work okay for me, but my biggest project with external libraries causes this error while packaging the project.

As a workaround, I copied the failed command (display in the packaging console window) into a command prompt from the project's directory and it worked fine.

My system's path is set properly to pick up jar.exe from the installed JDK's bin directory and it's obvious that something in Eclipse isn't picking up the right paths and I am unsure where to set them myself.
Offline  
Old 04-20-2010, 05:22 AM   #3
sadohert
New Member
 
Join Date: Jun 2006
Location: Waterloo, Ontario
Model: 8700r
Carrier: Rogers
Posts: 14
Default D'uh! The JDK needed to be installed...

Hey Guys,
I was having this issue...feel like an idiot now. I didn't actually install the jdk ! Surprisingly I got as far as building and testing the RIM Samples and my own application with no problem. It wasn't until I went to test using a project that depends on another project. I'm guessing at this point Eclipse needed "jar" to put together the compiled code from the separate projects.

Anyway, once I installed the jdk I still wasn't quite there. I had to edit my Windows Environment PATH variable to have the path to the jdk bin directory. In my case it was:

C:\Program Files\Java\jdk1.6.0_20\bin

Save the variable change. Restart eclipse, and presto, off to the races.

Stu
Offline  
Old 05-11-2010, 01:10 AM   #4
Taurus084
New Member
 
Join Date: May 2010
Model: B9700
PIN: N/A
Carrier: AT&T
Posts: 1
Default

Quote:
Originally Posted by sadohert View Post
Hey Guys,
I was having this issue...feel like an idiot now. I didn't actually install the jdk ! Surprisingly I got as far as building and testing the RIM Samples and my own application with no problem. It wasn't until I went to test using a project that depends on another project. I'm guessing at this point Eclipse needed "jar" to put together the compiled code from the separate projects.

Anyway, once I installed the jdk I still wasn't quite there. I had to edit my Windows Environment PATH variable to have the path to the jdk bin directory. In my case it was:

C:\Program Files\Java\jdk1.6.0_20\bin

Save the variable change. Restart eclipse, and presto, off to the races.

Stu

Thanks Stu, that worked!
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


OEM Dell 3310 2 in 1 LCD Touch Screen D2TNH NV133FHM-T00 06GHX8 picture

OEM Dell 3310 2 in 1 LCD Touch Screen D2TNH NV133FHM-T00 06GHX8

$54.00



OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5 picture

OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5

$13.81



Dell OEM Latitude Rugged Extreme 7404 Ribbon Cable for ExpressCard Cable G52B00 picture

Dell OEM Latitude Rugged Extreme 7404 Ribbon Cable for ExpressCard Cable G52B00

$9.95



Genuine OEM Dell 2375 B2375dnf B2375dfw 110V Fuser fixing N41P2 sku 724-BBCI picture

Genuine OEM Dell 2375 B2375dnf B2375dfw 110V Fuser fixing N41P2 sku 724-BBCI

$94.99



DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X  - Made By DELL picture

DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X - Made By DELL

$39.98







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.