3
votes

I just created a new project in the eclipse and as soon as it was created, it is created with the error below

InvalidRegex:
Pattern value '([a-zA-Z_]{1,63}[\s-a-zA-Z_0-9.]{0,63}[;]?)*' is not a valid
regular expression.
The reported error was: ''-' is an invalid character range.
Write '\-'.' at column '{2}'.
BlackBerry_App_Descriptor.xml Unknown XML Problem.

This is the problem which we will get when there is jre7 in our system which is not supported by eclipse

enter image description here

What is the problem here? How can i rectify this? thank you

1
The actual content of your Blackberry_App_Descriptor.xml file would be much more helpful in finding the problem than this screenshot. - Filburt
But there is nothing to see in it. I didnt create the file. It is automatically created by eclipse - Pramod
Well obviously eclipse is unhappy about something in this file and if you expect us to help we need to see it. - Filburt
Can you please tell me what you are interested in seeing? - Pramod
If I have a free wish I'd like this screenshot replaced by the actual error message so this question can by found by others facing the same problem. - Filburt

1 Answers

5
votes

Google shows this is related to Java 7. Check these two links: http://supportforums.blackberry.com/t5/Java-Development/problem-with-the-BlackBerry-App-Descriptor-xml-in-Eclipse-Plug/td-p/959029 and http://cdrussell.blogspot.com/2011/09/blackberry-eclipse-error-invalid-regex.html

The second one tells:

Turns out this could be caused by having Java JRE 7 installed on your machine. The BlackBerry plugin doesn't support this yet, Eclipse might be trying to use that.

The fix? You simply have to edit the eclipse.ini that will live in the same directory as your eclipse.exe that you use to start the IDE. Closing Eclipse and making a backup of eclipse.ini before you do this would be a good idea.

Find the line "openFile" and immediately after, add the following:

-vm C:/Program Files/Java/jre6/bin/javaw.exe [or wherever your jre6 directory might be]

Cross your fingers and restart Eclipse. Rebuild your projects.