How can I write to files from applets?

I want to write a capability into a game i'm writing that allows it to keep track of high scores. I am fairly certain that I will need to write to a file separate from the applet and then read it back in later. How can I do this? I don't think typical input/output streams work. Any helps or tips on how to set up a high scores list would be helpful!
thanks a lot!

Hi,
Firts sign the applet or jar file.
public void NxFileOpen(String ElFichero) {
String ElError="";
NxExportarPath=ElFichero;
try {
NxExportarFile = new FileWriter(ElFichero,false);
} catch (IOException NxError) {
ElError="No puedo abrir el fichero :"+NxExportarPath+".";
} catch (SecurityException NxError) {
ElError="No puedo acceder al fichero :"+NxExportarPath+ " para abrir. (Seguridades java)";
} catch (Exception NxError) {
ElError="Error. Fichero = "+NxExportarPath+". Accion = OPEN.";
if (ElError!="") {
System.out.println(ElError);
NxExportarFile = null;
public void NxFileClose() {
String ElError="";
try {
NxExportarFile.close();
} catch (IOException NxError) {
ElError="No puedo cerrar el fichero :"+NxExportarPath+".";
} catch (SecurityException NxError) {
ElError="No puedo acceder al fichero :"+NxExportarPath+ " para cerrar.(Seguridades java)";
} catch (Exception NxError) {
ElError="Error. Fichero = "+NxExportarPath+". Accion = CLOSE.";
if (ElError!="") {
System.out.println(ElError);      
NxExportarFile = null;
public void NxFileSave(int Dato) {
String ElError="";
try {
NxExportarFile.write(Dato);
} catch (IOException NxError) {
ElError="No puedo grabar en el fichero :"+NxExportarPath+".";
} catch (SecurityException NxError) {
ElError="No puedo acceder al fichero :"+NxExportarPath+ " para grabar. (Seguridades java)";
} catch (Exception NxError) {
ElError="Error. Fichero = "+NxExportarPath+". Accion = WRITE.";
if (ElError!="") {
System.out.println(ElError);      
NxExportarFile = null;
I hope help you

Similar Messages

  • How can i write properties file for Hindi font

    Hi All,
    i'm using jdev 11.1.1.5.0
    in my use case i have worked on internationalization where i want to use hindi font
    like this link -
    Majid Hussain: Internationalization of ADF 11.1.1.3 Applications
    as in above post majid used german language and write properties file for german language(which is using english character).
    but my problem is that i want to use hindi language
    so how can i write propery file which support hindi font.
    Manish

    Hi Manish,
    We also had same requirement where we need to show indian local language(Hindi ,Bengali and many more ).
    We had implemented following approach and perhaps it will helpful for you.
    1-First we changed the encoding value in jdeveloper.
       go to jdeveloper --> tools --->preference-->encoding , select to UTF8
    2-We used to get the properties and it's translated value from business and then we were manually put these pair into related resource bundle.
    And using this we were able to implemented multilanguage support.
    Thanks
    Prateek

  • How can I copy mp3 files from my Itunes library to an SD card for use in a non-apple phone?

    How can I copy mp3 files from my Itunes library to an SD card for use in a non-apple phone?  I can physically copy the tunes as mp3's but the phone does not seem to be able to play all of them.   Do I need to copy an entire album or can I just pick & choose individual songs?   The phone is question is an LG running who knows what for an operating system.

    AAC is Advanced Audio Coding.  Basically it's a format that sounds better than MP3 but doesn't take up as much space as a lossless format (like you'd have on a CD).  More than likely you've had that encoding turned on when you ripped your music into itunes (it's the default encoder).  Therefore your LG phone won't play them.
    You need to turn off the AAC format by going to the iTunes menu, Preferences, General (at the top), then clicking the "Import Preferences" button.  Change the AAC Encoder to MP3 Encoder.  After that you'll have to make MP3 copies of your songs by right clicking them and selecting "Create MP3 Version."  You'll get a copy of the song that should transfer to your SD card and have MP3 encoding.  Hopefully your phone will play that.

  • How can I delete a file from Adobe Acrobat Reader DC?

    How can I delete a file from Adobe Acrobat Reader DC?

    What operating system do you use? Where do you store the files?

  • How can I bring a file from a folder on my desktop to this program and make it editable. Like deleti

    How can I bring a file from a folder on my desk top int this program and make it editable., in order to replace words or remove words or texts..?  jn

    Hi,
    FormsCentral cannot be used to edit existing PDF documents. That functionality is available in Adobe Acrobat:
    http://www.adobe.com/products/acrobat.html
    Regards,
    Brian

  • How can i print my files from mi iphone 5 throught the airport express?

    How can i print my files from mi iphone 5 throught the airport express?? i have the last iOS version installed and also the last firmware version of the printer. the printer is already connected to the USB airport express and when i look for printers in airprinter there is no printer found. i have an HP LASERJET P1606dn(i think that is supported by the airprinter).

    In order to function with AirPrint, a printer must connect to the network wirelessly.
    Even if you have an AirPrint compatible printer, iOS devices will not be able to print to the printer when it is connected via USB.
    So, you have two options:
    1) Reconfigure the printer to connect to the network using wireless only and the iOS devices should be able to print that way....assuming that you have up to date drivers for the printer installed.
    2) Leave the printer connected via USB and then use a third party App like Printopia installed on your Mac as a "workaround" to (hopefully) allow the iOS to device to be able to print.  If you want to give this a try, there is a free trial for Printopia, so you will know if it will work before you buy. You must have a Mac running on the network in order for Printopia to function correctly.
    Printopia - AirPrint to Any Printer - Print from iPad - Print from iPhone ...

  • How can I read pdf files from LabVIEW with different versions of Acrobat reader?

    How can I read pdf files from LabVIEW with different versions of Acrobat reader?
    I have made a LabVIEW program where I have possibility to read a PDF document.  When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
    It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
    The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
    Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
    This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
    Jan Inge Gustavsen
    Attachments:
    Show PDF-file - Adobe Reader 7-0-5 - LV61.vi ‏43 KB
    Read PDF file.jpg ‏201 KB
    Show PDF-file - Adobe Reader 5-0-5 - LV61.vi ‏42 KB

    hi there
    try the vi
    ..vi.lib\platform\browser.llb\Open Acrobat Document.vi
    it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • How can I restore iCloud files from my lost iPhone

    I backed up my files to icloud. But I lost my Iphone last week. How can I restore my files from icloud to my macbook ?

    Are you using Photostream?  If yes, then you will be able to see your 1000 most recent photos on your Mac in iPhoto.
    All your contacts, calendar events, emails, etc. will still be on your Mac as part of iCloud.
    If you didn't import your videos from your iPhone to your Mac, then you've lost them unless you can restore your cloud backup to another iOS device.

  • How can I upload raw files from my canon g7x to lightroom5

    How can I upload raw files from my canon g7x to lightroom

    See this thread in the official Adobe feedback forum: Why doesn't my version of Photoshop or Lightroom support my camera?

  • How can I open raw files from my Nikon D7100 in CS4 or CS5?

    How can I open raw files from my Nikon D7100 in CS4 or CS5?

    Andy,
    In the simple and short form, what happens with the ACR (Adobe Camera RAW) module is that it gets updated with regularity, to accommodate the camera mfgr's. changes for their newer models. That ACR works within the host program, such as Ps, PsElements, Lightroom, etc.. At a point, Adobe ceases to support older host program versions. When that happens, the user has a few options:
    Upgrade the host program version
    Use another host program, such as PsElements or Lightroom
    Use the free DNG converter, per Curt's suggestion. That is not host program dependent
    Glad that the DNG Converter works for you.
    Good luck,
    Hunt

  • How can I transfer "Pages" files  from my IPad to my Mac?

    How can I transfer "Pages " files from my IPad to my IMac, I cannot use ICloud because I have Mountain Lion installed on the IMac?

    Actually, you can use iCloud and the way that you so it is to log into iCloud.com on the Mac (use Safari for best results) click on the Pages icon and then drag the Pages files into the browser window. It works the other way around as well. Log into iCloud.com on the Mac and download the files from Pages (that you created on the iPad) in iCloud onto your Mac. You can click on the file in the documents window and select it to Download by clicking on the Gear icon or right click upon the file and select download.
    The files will then sync to the Pages app on the iPad - assuming hat you have use iCloud tuned on in Settings>Pages>Use iCloud>On. I have an iMac running Tiger 10.4.11 that I can still move Pages/Word files back and forth Iike this.
    Also, File Sharing with iTunes is a great way to move the files back and forth.
    iOS: About File Sharing - Support - Apple
    Message was edited by: Demo

  • HOW CAN I TRANSFER VIDEO FILES FROM MY PC TO IPAD MINI VIA ITUNES??? WITHOUT ANY ADDITIONAL DOWNLOADABLE APP

    HOW CAN I TRANSFER VIDEO FILES FROM MY PC TO IPAD MINI USING ITUNES???  i have to google every little thing that has to do with my ipad, why cnt they make it more user friendly???? i have to dl another app just so ican transfer vid files to mu ipad mini. i already converted them to the proper format. i just cant seem to find out how to transfer with with only itunes

    im just new to itunes and ipad mini is my first apple product thats why im really having a hard time with this. i cant transfer the video file to my library... i tried dragging it to the "movies" part in my library but it still doesnt copy to the movie librarry just like how i do it with my songs.. not even the typical list appears.... all it says is movies and studd about the library and itunes, ill post a pic so u can see...

  • How can I delete PDF files from my iMac desktop?

    How can I delete PDF files from my iMac desktop?

    Not on my system,When I try to dump if off in the trash it will not go. I get a message that says this file cannot be removed. I also tried going to File and clicking on Move to Trash. No dice.

  • How can I transmit PDF files from my Mac to my iPad, How can I transmit PDF files from my Mac to my iPad

    How can I transmit PDF files from my Mac to my iPad, How can I transmit PDF files from my Mac to my iPad

    Yes you can definitely do this. You'll need an app on the iPad that handles PDF viewing and editing. There are many around - two of the best I've seen are GoodReader and PDF Expert.
    In iTunes when you iPad is connected to your PC, go to the Apps tab and scroll down and you'll see the File Sharing section. You can drag files to there to share them to your iPad.
    You could also look at online file sync services like PDF to ePub Maker if you prefer not to have to connect your iPad to a PC

  • How can I move mp3 files from my ext.drive to my iPad via MB Air 11 ?

    How can I move mp3 files from my ext.drive to my iPad via MB Air 11 ?
    Thx

    You could drag your files to your macbook air's desktop then plug in you iPad...? I don't really know about this as i don't have a iPad. =S

Maybe you are looking for

  • HT1338 Can't upgrade 10.6.2 to 10.6.8

    Hi, I am trying to upgrade from 10.6.2 to 10.6.8, as a pre-requisite to upgrading to OS X Lion.  I am running the Software update, but this doesn't seem to work.  just prompts meet to restart the computer to finish installation, but no upgrade has oc

  • My smug mug publish plug in did not update.  How can I fix this?

    How can I fix this? The Add-on <smugmug publish plugin> failed to install: General error message.   I was updating Lightroom and Photoshop on my laptop from the cloud, and it seems most things did fine, but not this plug in apparently

  • Request.setAttribute between classes

    Hi I'm trying to keep a userid from a class call ActionLogin to then use it to select products bought by that user request.setAttribute("userid", login);Then I realize that userid isn't keeping anything when I'm tryin got access it with request.getPa

  • Del related and order related billing on the same order - timing problem

    Hi, In our repair process we need to bill out the loaner part (we put the money on the loaner line that gets shipped and create a delivery related billing document)  as well as repaired material when that comes in, goes through the repair and gets sh

  • Bridge CC is constantly asking for reinstall

    When I am trying to brows from PS 2014 in Bridge CC I am asked to reinstall Bridge CC for that version I did it twice without success