• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why isnt there a Regex class in JME

 
Sandeep Kumar Jakkaraju
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why isnt there a Regex class in JME ?
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because JME was designed to run in a minimum of memory. The more features in the core libs, the bigger they'll get. Eventually, you could add so many features that you'd have J2SE, so there wouldn't even be a point in having JME.

If you look around, you'll probably be able to find a third-party RE package that works in JME, though.
 
Sandeep Kumar Jakkaraju
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Tim

I agree that whole point of making JME different from JSE ........
But I need a Regex .... from SUN ..which is in JME which works on minimal memory of KVM !!!

If the string is big ... it will throw an exception
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The point wasn't big strings, it was big code! On a mobile device like one of the old 2MB Palm devices, including any code that most apps wouldn't use wasn't possible. Out of that 2MB, a LOT of the memory was the Palm databases and the program storage for all the other apps, so you're talking about pinching kilobytes.

There's nothing magic about Sun's regex classes. They're not even an original Java feature. Before about Java 1.4, you had to use something like Apache ORO to handle regexes in Java even on the full JVM.
 
Bod Toki
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey.. Sandeep,

Just google 'regex + j2me' and you'd probably find some place where you can download a regex library that you can package with your application.

SUN can't keep adding all sorts of libraries in Java ME because then it'll become a big problem for smaller phones (and other Java ME things with small memory capabilities).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic