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
Contributor
Amatocianmonk
Posts: 21
Registered: ‎07-26-2010
My Device: Not Specified

I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

This is a frustraiting one, and all of my research online does not look promising.

 

I am working on an application, and as a Software Engineer, my design is very object oriented, which translates to, it has a lot of classes!

 

Today, upon adding a new .java file, i recieved this compile error:

 

Resolving
Optimizing
U:\Workspace\App\src\com\company\mobileadmin\Debugger.java:55: Warning!: method 'com.company.mobileadmin.Debugger.out(String)' not invoked.
U:\Workspace\App\src\com\company\mobileadmin\controller\Cmd_submitNetworkData.java:23: Warning!: member data 'Vector variables' not required in class: com.company.mobileadmin.controller.Cmd_submitNetworkData
U:\Workspace\App\src\com\company\mobileadmin\model\ModelSession.java:5: Warning!: member data 'String userName' not required in class: com.company.mobileadmin.model.ModelSession
U:\Workspace\App\src\com\company\mobileadmin\model\ModelSession.java:12: Warning!: method 'com.company.mobileadmin.model.ModelSession.getUserName()' not invoked.
U:\Workspace\App\src\com\company\mobileadmin\model\ToolRegister.java:64: Warning!: method 'com.company.mobileadmin.model.ToolRegister.deleteAll()' not invoked.
U:\Workspace\App\src\com\company\mobileadmin\uI\basicElements\Input_Text.java:64: Warning!: method 'com.company.mobileadmin.uI.basicElements.Input_Text.setFilter(TextFilter)' not invoked.
U:\Workspace\App\src\com\company\mobileadmin\uI\basicElements\Input_Text_Search.java:50: Warning!: method 'com.company.mobileadmin.uI.basicElements.Input_Text_Search.setFilter(TextFilter)' not invoked.
U:\Workspace\App\src\com\company\mobileadmin\uI\views\ViewBuilder.java:25: Warning!: method 'com.company.mobileadmin.uI.views.ViewBuilder.setTitle(String)' not invoked.
Populating
I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified
Packaging project App failed (took 8.984 seconds) 

 I know that the content of the .java file is not the issue, because even when the file is empty, the compile fails.

 

I did notice that before I added this file, i had 99 files spilt up between 9 packages and the addition of this file pushed me up to 100 files, which I noticed caused someone else to recieve this error in a different thread.

 

I deleted a different .java file elsewhere in my code that was redundant, and the compile worked again...

 

Is there some limit of 99 files per application that I'm not aware of? If so, can this be increased through any options?

 

I would really like a solution to this issue because I cannot continue deleting files whenever I add new ones. I am only about 60% done with my application and have several more classes to create.

 

Since my application is not intended to be sold, I don't mind uploading the source code if it would help with diagnosis of this problem, or if any of you wanted to attempt to compile it on your machines to determine if it is an issue with my setup.

~ Logic and reason above all things ~
http://amatoc.com/
Please use plain text.
Contributor
Amatocianmonk
Posts: 21
Registered: ‎07-26-2010
My Device: Not Specified

Re: I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

So after more searching, I found that one person fixed this issue (too many classes...) by creating a new project in which he put some of his code, and then turned that into a library which his origional project then used.

 

I would be happy to implement this solution, could offer any advice or links to tutorials on creating a library project which other projects can implement?

~ Logic and reason above all things ~
http://amatoc.com/
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

Search the forum - this has been discussed many times.

 

Please use plain text.
Contributor
dpolonsky
Posts: 27
Registered: ‎10-02-2010
My Device: Not Specified

Re: I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

I have just hit that frustrating limitation. 

Thank you for your post !

Please use plain text.
Contributor
maheshqtech
Posts: 43
Registered: ‎11-24-2011
My Device: Perl
My Carrier: BB

Re: I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

if u got the solution to avoid class file creation so plz help me

 

I also fetch the same problem on project there are 100 .class file due to this my project is not loadded on simulator

 

is BB have some restriction to create or have some limit of class files?

 

Plz help me 

 

Thnaks In advance

Mahesh

Please use plain text.
Developer
pankajace12
Posts: 198
Registered: ‎04-30-2011
My Device: BlackBerry Z10
My Carrier: Airtel

Re: I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

Hi

 

move the  C:\Program Files\Java\jdk1.6.0_21\bin\jar.exe to C:\Program Files\Java\jre6\bin\jar.exe

and

 C:\Program Files (x86)\Java\jdk1.6.0_21\bin\jar.exe to C:\Program Files (x86)\Java\jre6\bin\jar.exe

 

It will work fine henceforth.

 

Thanks

Pawan

 


Please use plain text.