• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in basics

 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to J2ME i am having problem in compiling. I have included
java.io.File to my midlet. But it shows importing problem.

Following code retrives filenames in some folder



Suggest me any study material regarding this issue
>
 
Tim Holloway
Bartender
Posts: 18470
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think java.io.File is part of the JME package set. JME is a stripped-down version of Java, with many packages and methods removed. A lot of the stuff in J2SE isn't part of the smaller J2ME kit. Check the separate JME javadocs when developing, not the full JSE docs.

As a side note, not every mobile device even has what you'd call files. For example, the Palm devices have an integrated DBMS, bit no filesystem. Since Java is intended to be "write once, run anywhere", it wouldn't be appropriate to include inapplicable features into the core package set.
 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Tim Holloway

Actually i have came across importing java classes in midlet, thats what i questioned here

Can you suggest any material regarding this issue?

 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!