Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-07-2008, 12:09 AM
Member
 
Join Date: Mar 2008
Posts: 1
sina is on a distinguished road
a simple code (cldc or midp) to write a text file ouside of the application package
hello all friends,
assume my midlet is located in c:/myprojects/mymidlet.jar. now i want to add one or more lines of code so it will creat a text file in d:/somefolder/text.txt.
I just dont know how should I do this as it requires playing with absolute paths. please write me the required statments.
thank a million
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-07-2008, 11:43 AM
Member
 
Join Date: Mar 2008
Posts: 5
sk_shadul is on a distinguished road
hi,

If you want to create a text file, create an object of a file which should have an argument of full path where you want to create.

import java.io.File.*;
File newFile= new File("FullPath");
// operations

Hope, this information will help you.

Regards,
sk_shadul
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 03-13-2008, 11:33 AM
aibtus's Avatar
Member
 
Join Date: Mar 2008
Location: Randburg, South Africa
Posts: 9
aibtus is on a distinguished road
Send a message via Yahoo to aibtus Send a message via Skype™ to aibtus
I hope you have a good reason to do so. Most midlets will be used on mobile phones and not the desktop environment, where they are developed and tested on, thus rendering your absolute path useless on the phones.

I would think you want to write the text file to some location on the mobile device. It's just my point of view
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What are you using to write your code? CaptainMorgan New To Java 137 07-04-2008 10:30 AM
how do i write to a text file from an arraylist? otoro_java New To Java 3 01-30-2008 07:53 AM
Simple JSF Application (Part I) JavaForums Java Blogs 0 12-13-2007 03:21 PM
simple code elizabeth New To Java 1 08-07-2007 07:49 PM
Write an application that displays the numbers 1 to 4 on the same line toby New To Java 1 07-23-2007 05:33 PM


All times are GMT +3. The time now is 03:05 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org