I have done simple java app for blackberry, while building am getting following error.
"Building Hisantosh
C:\BlackBerryJDE4.5.0\bin\rapc.exe -quiet import=..\lib\net_rim_api.jar codename=Hisantosh Hisantosh.rapc warnkey=0x52424200;0x52525400;0x52435200
"C:\Documents and Settings\Santosh\My Documents\Downloads\greetingscreen.java"
"C:\Documents and Settings\Santosh\My Documents\Downloads\helloworld.java"
I/O Error: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
Error while building project "
I have set all path variables.
Make sure you have your environment variables setup, you'll need to set up 'PATH' environment variable, the path will be something like: C:\Program Files\Java\jdk1.6.0_07\bin; depending on where you have installed your JDK files.
If this is setup, check out this link from Blackberry knowledge centre
Related
enter image description here
I have installed appium in windows 8, Getting error as Not find jar executable file in your path.
You have to simply add C:\Program Files\Java\jdkx.xx.x_\bin to Windows' PATH variable.
That is the location where jar.exe is located on Windows (yours may differs, depending on JDK version, etc.)
You'd have to start a new command prompt (assuming you're using Windows'cmd) for the new PATH variable to reflect the change.
I am trying to compile some java code on Windows 7 pc, I have installed java JDK and I am trying to use the javac command in cmd but I get output saying that
'javac' is not recognized as an internal or external command,
operable program or batch file.
What do I have to do to enable compiler in cmd or is it possible to do in Windows?
1)Go to properties by right click on icon Computer , then navigate to Advanced System Settings.
2)Click Environment Variables.
3)Click on New , set Variable name as path and Variable path as the path of java jdk installation directory which could be something like this -
C:\Program Files\Java\jdk1.6.0_23\bin;
where C:** is the drive where JDK is installed and **Program Files\java is the directory where it resides.
look out for semi-colon(;) at the last.
4)Click ok
5)Restart cmd and run javac , it should work now.
Look for Screenshots here for more help.
Regards
Anshul
you have to set a new system variable for your JAVA_HOME in windows.
See here for further information.
Add the path to bin folder of JDK in your PATH variable. For instructions to set PATH variable follow this tutorial.
Your java directory is not on the path. Here are some helpful screenshots to show how to set it up:
http://vietpad.sourceforge.net/javaonwindows.html
I am developing a BlackBerry Application with a number of class files in it; 16 java classes at the moment and they keep increasing as this App is complex with a lot of screen and features. I am working in Eclipse with the BlackBerry Java Plug-in. I am using BlackBerry JRE 6.0. I have recently started getting the following error:
Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified
I have Google for this error and many suggest this is caused by Java Environmental Variable path. However, I have checked and everything seems to be fine at my end regarding that. I have noticed that when the number of classes is increased or a class becomes more lengthy, this error occurs. I get rid of the error by reducing the number of classes in a project. I created separated projects dividing the classes between each and it compiled fine. So I can believe that there is no issue with the source code.
Can anyone guide how to overcome this error in a single project that contains several classes. Please help.
EDIT: I came across the following on BlackBerry Support Forums:
"I think the most common reason for this (assuming that you have the JDK installed) is a large number of files in the project, and/or a project directory that is very far from the root.
The issue is that the RAPC compiler calls the JAR utility, building a command line that consists of all the class files in the application. If the command line length exceeds the maximum length allowed by the system, you will get this error."
How to work around this IF this is whats causing it.
I was lucky to resolve this error. This link has been very helpful from BlackBerry Support Forums. For anyone else facing the same issue, the following steps resolved my issue:
Right Click My Computer. Go To Properties.
Click Advanced System Settings.
Click Environment Variable
Highlight PATH and click Edit. Add C:\Program Files (x86)\Java\jdk1.6.0_26\bin; to the start of the PATH.
Step 4 adds the java jar file to the PATH variable and adds it closer to the root. Adding closer to the root is helpful when compiling a project with several classes.
As the error says Cannot run program "jar" under Windows that means it cannot find the jar.exe executable file.
The problem, at least in my case, was that JAVA_HOME was pointing to the JRE on my computer (where there is no jar.exe in its "bin" folder) and not to the JDK where the jar.exe resides under its "bin" folder.
The solution was very simple - changed JAVA_HOME to point to the JDK root folder - in my case that was "C:\Program Files\Java\jdk1.7.0_15".
I am trying to run a sample of xmlBeans to compile a xsd and create a jar corresponding to that but I am getting this error again & again
java.io.Exception: Cannot run program "filelocation\javac": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start
............
It might be related to my "path" or "classpath" environment variable. Please suggest something.
I found the solution to the issue
I was using a command
scomp -out automobile-policy.jar automobile-policy.xsd
but there was some problem with the javac location in the path variable i guess
So I gave this command
scomp -compiler "c:\Program Files\Java\jdk1.6\bin\javac.exe" -out
automobile-policy.jar automobile-policy.xsd
and it gave the desired automobile-policy.jar at the location.
Please note that the location of the javac.exe might be different.
When I run my simulator I obtain an error that java 1.6 cannot found for launching MDS-CS
Can any one help me ? What should I add to run MDS-CS?
open command prompt and type java. If you get "java not recognized as an internal or external command" , you havent set the path. MDS-CS needs JDK path to be set. So as Farid farhat told you,set the path in environment variables to point to bin folder in JDK.