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
Posts: 92
Registered: ‎02-22-2011
My Device: Not Specified
Accepted Solution

Too many files to compile

Hi!

 

I've created a lot of files on my project, and I also use the Facebook SDK. Now when trying to compile it allways throws me this error:

 

I/O Error: Cannot run program "jar": CreateProcess error=2

 

I've read in the forum that the problem is that there are too many files in the project. Wich is the solution to this problem? Shouldn't I be able to create as many files as i desire?

 

Thanks!!

Developer
Posts: 16,838
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Too many files to compile

according to a quick search it might be related to the jdk not correctly installed/configured (PATH not set) or a file not being found.

 

see

http://supportforums.blackberry.com/t5/Java-Development/I-O-Error-CreateProcess/ta-p/445949

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 92
Registered: ‎02-22-2011
My Device: Not Specified

Re: Too many files to compile

Hi Simon!

 

I read this yesterday, but it doesn't make sense because all my app compile and work correctly Smiley Frustrated

 

 

Cause 1

The Java® software development kit (Java SDK/JDK) is not installed on the computer, or an incorrect version of the Java SDK is installed on the computer

 

The Cause 1 shouldn't be my problem, i have the SDK and JDK installed Smiley Frustrated

 

 

So i suposse it should be the Cause 2...

 

Cause 2

The environment variable for the Java SDK is not set correctly.

 

I set my PATH variable like this:

 

C:\Archivos de programa\Java\jdk1.6.0_20\bin;C:\Archivos de programa\PC Connectivity Solution\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Archivos de programa\MySQL\MySQL Server 5.1\bin;C:\Archivos de programa\Mercurial\;c:\Archivos de programa\Microsoft SQL Server\90\Tools\binn\;C:\Archivos de programa\TortoiseSVN\bin;C:\Archivos de programa\QuickTime Alternative\QTSystem\

 

It does not work, it continues throwing me the same error.

 

 

I/O Error: Cannot run program "jar": CreateProcess error=2, El sistema no puede hallar el archivo especificado
Packaging project MyProject failed (took 2.453 seconds) 

 

Developer
Posts: 16,838
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Too many files to compile

 

the error message says "file not found". maybe you can check what file is not found by using FileMon or a similar tool (microsoft sysinternals) if the error message does not specify the file in question.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520
My Carrier: T-Mobile

Re: Too many files to compile

The usual suggested solution in this forum and similar is to add the bin folder for the jdk in use, to your Path Environment Variable in Control Panel -> System -> Advanced on MS OSes

 

In my case this is C:\Program Files\Java\jdk1.6.0_17\bin  which worked for me.

Developer
Posts: 92
Registered: ‎02-22-2011
My Device: Not Specified

Re: Too many files to compile

Hi Paul, i think i just did that by setting my PATH variable to my JDK forlder C:\Archivos de programa\Java\jdk1.6.0_20\bin;

 

I tryed to execute FileMon, but it crashes and my Visual Studio Debugger pops up xDDD

Developer
Posts: 92
Registered: ‎02-22-2011
My Device: Not Specified

Re: Too many files to compile

[ Edited ]

Just an appointment, could the problem be the Facebook SDK? I'm trying to compile it in another project and it throws me the same error!

Highlighted
Developer
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520
My Carrier: T-Mobile

Re: Too many files to compile

Sorry, should have read your post/path variable more closely. Yes, that looks to be the same as what I have.  Finger in the breeze stuff, but have you tried a shutdown and restart since setting the variable?

Developer
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520
My Carrier: T-Mobile

Re: Too many files to compile

Probably a silly question, but C:\Archivos de programa\Java\jdk1.6.0_20\bin; is a valid path on your machine, and does contain the executable jar.exe?

Developer
Posts: 92
Registered: ‎02-22-2011
My Device: Not Specified

Re: Too many files to compile

Yes! My path is valid since i have Windows in spanish and it contains jar.exe Smiley Tongue

I don't have any Pogram Files folder

 

 

The solution for me was setting the PATH variable and RESTARTING! Hahaha, i didn't do it before.

 

Thanks Paulkayuk!!