JTable and storing up-dated in a file

The first task is to save data entered in the JTable to a file.
I could not do this as I could not access the updated model.
I include the three files. At the moment the method tableChanged is stopping the init method loading because it sees this a table changed.
Any help after a day slogging at this would be most appreciated.
Yours Sincerely,
Kieran A. Murray
package tables;
import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.Vector;
import javax.swing.table.*;
public class PowerFrame extends JFrame
private JFrame PowerFrame;
private JTabbedPane PowerTabPane;
private JMenuItem fMenuOpen = null;
private JMenuItem fMenuSave = null;
private JMenuItem fMenuClose = null;
JavaFilter fJavaFilter = new JavaFilter ();
File fFile = new File ("default.dat");
private Object Vectorin;
private Object v;
public Vector q;
private int count;
private int xcount;
private int qcount;
private int ycount;
private int pcount;
private File file;
BusbarRecords Busbar = new BusbarRecords();
BusbarsUI ui = new BusbarsUI();
public PowerFrame () {
     super("Begin at the Beginning");
     addWindowListener(new WindowAdapter()
     { public void windowClosing(WindowEvent e)
     { System.exit(0);
     PowerTabPane = new JTabbedPane(SwingConstants.RIGHT);
     PowerTabPane.setBackground(Color.blue);
     PowerTabPane.setForeground(Color.white);
     populatePowerTabbedPane();
     buildMenu();
     getContentPane().add(PowerTabPane);
private void populatePowerTabbedPane()
     PowerTabPane.addTab("Busbars", null, new BusbarsUI(), "Data for Busbar");
private void buildMenu()
     JMenuBar mb = new JMenuBar();
     JMenu menu = new JMenu("File");
     setJMenuBar (mb);
     setSize (400,400);
     JMenuItem openitem = new JMenuItem("Open");
     JMenuItem saveitem = new JMenuItem("Save");
     JMenuItem exititem = new JMenuItem("Exit");
     exititem.addActionListener(new ActionListener()
     public void actionPerformed(ActionEvent e)
     System.exit(0);
     openitem.addActionListener(new ActionListener()
     public void actionPerformed ( ActionEvent e ) {
          boolean status = false;
          status = openFile ();
          if (!status)
          JOptionPane.showMessageDialog (
          null,
          "Error opening file!", "File Save Error",
          JOptionPane.ERROR_MESSAGE);
     saveitem.addActionListener(new ActionListener()
     public void actionPerformed ( ActionEvent e ) {
          boolean status = false;
          status = saveFile ();
          if (!status)
          JOptionPane.showMessageDialog (
          null,
          "Error opening file!", "File Open Error",
          JOptionPane.ERROR_MESSAGE);
     menu.add(openitem);
     menu.add(saveitem);
     menu.add(exititem);
     mb.add(menu);
     setJMenuBar(mb);
     * Use a JFileChooser in Open mode to select files
     * to open. Use a filter for FileFilter subclass to select
     * for *.java files. If a file is selected then read the
     * file and place the string into the textarea.
     boolean openFile () {
     JFileChooser fc = new JFileChooser ();
     fc.setDialogTitle ("Open File");
     // Choose only files, not directories
     fc.setFileSelectionMode ( JFileChooser.FILES_ONLY);
     // Start in current directory
     fc.setCurrentDirectory (new File ("."));
     // Set filter for Java source files.
     fc.setFileFilter (fJavaFilter);
     // Now open chooser
     int result = fc.showOpenDialog (this);
     if (result == JFileChooser.CANCEL_OPTION) {
     return true;
     } else if (result == JFileChooser.APPROVE_OPTION) {
     fFile = fc.getSelectedFile ();
               // Invoke the readFile method in this class
     q = (Vector) readFile (fFile);
          System.out.println(q.elementAt(1));
     /*ui.readFileIntoJTable(q);*/
     } else {
     return false;
     return true;
     } // openFile
     boolean saveFile () {
          File file = null;
          JFileChooser fc = new JFileChooser ();
          // Start in current directory
          fc.setCurrentDirectory (new File ("."));
          // Set filter for Java source files.
          fc.setFileFilter (fJavaFilter);
          // Set to a default name for save.
          fc.setSelectedFile (fFile);
          // Open chooser dialog
          int result = fc.showSaveDialog (this);
          if (result == JFileChooser.CANCEL_OPTION) {
          return true;
          } else if (result == JFileChooser.APPROVE_OPTION) {
          fFile = fc.getSelectedFile ();
          if (fFile.exists ()) {
          int response = JOptionPane.showConfirmDialog (null,
          "Overwrite existing file?","Confirm Overwrite",
          JOptionPane.OK_CANCEL_OPTION,
          JOptionPane.QUESTION_MESSAGE);
          if (response == JOptionPane.CANCEL_OPTION) return false;
          return ui.getJTableFields(fFile);
          else{
          return false;
          } // saveFile
     public Object readFile (File file) {
          try{
               FileInputStream fis = new FileInputStream(file);
               ObjectInputStream ois = new ObjectInputStream(fis);
               v = ois.readObject();
               fis.close();
          catch(Exception e){
               System.err.println("Exception:" + e.getMessage());
          return (v);
public static void main(String[] args)
     PowerFrame PF = new PowerFrame();
     PF.pack();
     PF.setSize(765,690);
     PF.setBackground(Color.white);
     PF.setVisible(true);
package tables;
import javax.swing.JTable;
import javax.swing.JScrollPane;
import javax.swing.JPanel;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
public class BusbarsUI extends JPanel implements TableModelListener {
     private boolean DEBUG = true;
private int xcount;
private int ycount;
private int pcount;
private int qcount;
private int y;
private TableModel newmodel;
JTable table;
     BusbarRecords Busbar=new BusbarRecords();
public BusbarsUI() {
     init();
public void init(){
     DefaultTableModel model = new DefaultTableModel();
     model.addTableModelListener( this );
     JTable table = new JTable(model);
     setLayout(new BorderLayout());
     setBackground(Color.white);
     Vector p = Busbar.setJTableFields();
String[] s = initializevector();
System.out.println(p.size());
     for (xcount=1; xcount <= Busbar.columnNames.length;xcount++)
          model.addColumn(Busbar.columnNames [xcount-1]);
     for (qcount=1; qcount <= 5; qcount++)
     model.addRow(s);
          pcount=1;
     while (pcount < (p.size()-1))
          for (ycount=1; ycount <= p.size()/5; ycount++)
               for (xcount=1; xcount <= Busbar.columnNames.length;xcount++)
                    model.setValueAt(p.elementAt(pcount-1), ycount-1, xcount-1);
                    pcount++;
     model.addRow(new Object[]{""});
for (pcount=0; pcount <= p.size()-1; pcount++)
     System.out.println(p.elementAt(pcount));
table.setPreferredScrollableViewportSize(table.getPreferredSize());
JScrollPane scrollPane = new JScrollPane(table);
add(scrollPane, BorderLayout.CENTER);
public void tableChanged(TableModelEvent e)
          System.out.println(e.getSource());
          if (e.getType() == TableModelEvent.UPDATE)
               int row = e.getFirstRow();
               int column = e.getColumn();
                    TableModel model = table.getModel();
                    model.getValueAt(row,column);
                    Vector g = new Vector();
                    for(int i=0; i < model.getRowCount();i++){
                         for(int j=0;j < model.getColumnCount();j++){
                              g.addElement(model.getValueAt(i,j));
private void stopEditing() {
     if (table.getCellEditor() != null)
     table.getCellEditor().stopCellEditing();
private String[] initializevector()
     String[] v = new String[5];
     for (int i=0; i<5;i++)
          v="";
     return v;
     /* public JTable update()
          for (xcount=1; xcount <= Busbar.columnNames.length;xcount++)
               for (qcount=1; qcount <= 5; qcount++)
                    System.out.println(model.getValueAt(ycount-1, xcount-1));
          JTable table = new JTable(model);
          return table;
/* public JTable readFileIntoJTable(Object q)*/
public boolean getJTableFields(File file)
     Vector g = new Vector();
     stopEditing();
     /*for(int i=0; i < model.getRowCount();i++){
          for(int j=0;j < model.getColumnCount();j++){
               g.addElement(model.getValueAt(i,j));
     int numRows=model.getRowCount();
     int numCols= model.getColumnCount();
System.out.println("Value of data: ");
for (int i=0; i < numRows; i++) {
System.out.print(" row " + i + ":");
for (int j=0; j < numCols; j++) {
System.out.print(" " + table.getValueAt(i, j));
System.out.println();
System.out.println("--------------------------");*/
try
          FileOutputStream fos = new FileOutputStream(file);
          ObjectOutputStream object = new ObjectOutputStream(fos);
          object.writeObject(g);
          object.flush();
          object.close();
     catch(Exception ex)
          System.out.println("Exception:" + ex);
          return false;
          return true;
package tables;
import java.io.*;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import java.util.Vector;
public class BusbarRecords implements Serializable
private String firstName, lastName, sport;
private int years;
private boolean vegetarian;
private int xcount;
private int ycount;
private int pcount;
private int y;
private PowerFrame PR;
File file;
String[] columnNames = {"First Name",
"Last Name",
"Sport",
"# of Years",
"Vegetarian"};
Object [][] data = {
{"Mary", "Campione",
"Snowboarding", new Integer(5), new Boolean(false)},
{"Alison", "Huml",
"Rowing", new Integer(3), new Boolean(true)},
{"Kathy", "Walrath",
"Chasing toddlers", new Integer(2), new Boolean(false)},
{"Mark", "Andrews",
"Speed reading", new Integer(20), new Boolean(true)},
{"Angela", "Lih",
"Teaching high school", new Integer(4), new Boolean(false)}
     public Vector setJTableFields(){
          Vector p = new Vector();
     for (ycount =1; ycount <=5; ycount++)
          for(xcount=1; xcount <= columnNames.length; xcount++)
               p.add("one");
     return p;
package tables;
import javax.swing.*;
import java.io.*;
/** Filter to work with JFileChooser to select java file types. **/
public class JavaFilter extends javax.swing.filechooser.FileFilter
public boolean accept (File f) {
return f.getName ().toLowerCase ().endsWith (".java")
|| f.isDirectory ();
public String getDescription () {
return "Java files (*.java)";
} // class JavaFilter

brilliant thanks Dr Clap thats just what i was looking for - ive been wasting time searching thru thr ROME and Informa API's for a way of doing this before realising that i just need to write the URL's into a file and the read from them !!

Similar Messages

  • XML stream and stored as an output XML file

    Dear ALL,
    Could you help me in such situation?
    I need create XML file. I have DTD file. I create XML stream and stored as an output XML file. But all the data of my XML file stored in one line.
    How I can create my XML file according to DTD file?
    Thanks a lot.
    Best regards,
    Igor

    hi
    good
    go through this links,hope these would help you to solve your problem
    http://rustemsoft.com/JSPsample.htm
    http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.etools.xmlbuilder.doc/tasks/txmltask.htm
    thanks
    mrutyun^

  • [svn] 1179: - added setup and storing settings in a separate file to facilitate updates .

    Revision: 1179
    Author: [email protected]
    Date: 2008-04-10 11:58:03 -0700 (Thu, 10 Apr 2008)
    Log Message:
    - added setup and storing settings in a separate file to facilitate updates.
    - fixed support for paths with spaces (i.e diffpack pack "c:/my documents/egeorgie/package")
    - fixed to handle relative paths in the arguments
    - fixed to create and include a .patch file in the package
    - added readme.txt
    Modified Paths:
    flex/sdk/trunk/tools/diffpack/src/diffpack.mxml
    Added Paths:
    flex/sdk/trunk/tools/diffpack/diffpack
    flex/sdk/trunk/tools/diffpack/diffpack.air
    flex/sdk/trunk/tools/diffpack/readme.txt
    Removed Paths:
    flex/sdk/trunk/tools/diffpack/src/diffpack

    Revision: 1179
    Author: [email protected]
    Date: 2008-04-10 11:58:03 -0700 (Thu, 10 Apr 2008)
    Log Message:
    - added setup and storing settings in a separate file to facilitate updates.
    - fixed support for paths with spaces (i.e diffpack pack "c:/my documents/egeorgie/package")
    - fixed to handle relative paths in the arguments
    - fixed to create and include a .patch file in the package
    - added readme.txt
    Modified Paths:
    flex/sdk/trunk/tools/diffpack/src/diffpack.mxml
    Added Paths:
    flex/sdk/trunk/tools/diffpack/diffpack
    flex/sdk/trunk/tools/diffpack/diffpack.air
    flex/sdk/trunk/tools/diffpack/readme.txt
    Removed Paths:
    flex/sdk/trunk/tools/diffpack/src/diffpack

  • Create XML stream and stored as an output XML file

    Dear ALL,
    Could you help me in such situation?
    I need create XML file. I have DTD file. I create XML stream and stored as an output XML file. But all the data of my XML file stored in one line.
    How I can create my XML file according to DTD file?
    Thanks a lot.
    Best regards,
    Igor

    hi
    good
    go through this links,hope these would help you to solve your problem
    http://rustemsoft.com/JSPsample.htm
    http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.etools.xmlbuilder.doc/tasks/txmltask.htm
    thanks
    mrutyun^

  • Strange behavior when getting data and storing it into a tdms file

    Hi
    I am getting data from a VISA device(10bytes every 20ms) in a string buffer and then using indexing array get each element which is 2 bytes , filtering the data in real time using a butterworth filter and then storing the data to a TDMS.
    The problem is that the data goes haywire after a brief the the different elemetns just switch. So for example x becomes resistance, GSR becomes  etc
    I have uploaded the VI and the TDMS file converted to excel format

    You really should be writing to the TDMS file while you acquire the data.  By using the Autoindexing Tunnels to build the arrays, you are causing A LOT of memory allocations, which causes things to really slow down.  I would venture to say that you are missing data, causing what looks like a shift in the data.  But you would need to be looking at the error coming out of the VISA Read to know for sure.
    So look into the Producer/Consumer.  The idea is to use a parallel loop to log the data while your current loop reads and processes the data.  The data is sent to the consumer loop via a queue.

  • Fetching all mails in Inbox from Exchange Web Services Managed API and storing them as a .eml files

    I want to fetch all mails in the Inbox folder using EWS Managed API and store them as .eml.
    I can store file once I get the file content as a byte[] will
    not be difficult, as I can do:
    File.WriteAllBytes("c:\\mails\\"+mail.Subject+".eml",content);
    The problem will be to fetch (1) all mails with (2)
    all headers (like from, to, subject) (I am keeping information of those values of from, to and
    other properties somewhere else, so I need them too) and (3)byte[]
    EmailMessage.MimeContent.Content. Actually I am lacking understanding of
    Microsoft.Exchange.WebServices.Data.ItemView,
    Microsoft.Exchange.WebServices.Data.BasePropertySet and
    Microsoft.Exchange.WebServices.Data.ItemSchema
    thats why I am finding it difficult.
    My primary code is:
    When I create PropertySet as
    follows:
    PropertySet properties = new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.MimeContent);
    I get following exception:
    The property MimeContent can't be used in FindItem requests.
    I dont understand
    (Q1) What these ItemSchema and BasePropertySet are
    (Q2) And how we are supposed to use them
    So I removed ItemSchema.MimeContent:
    PropertySet properties = new PropertySet(BasePropertySet.FirstClassProperties);
    I wrote simple following code to get all mails in inbox:
    ItemView view = new ItemView(50);
    view.PropertySet = properties;
    FindItemsResults<Item> findResults;
    List<EmailMessage> emails = new List<EmailMessage>();
    do
    findResults = service.FindItems(WellKnownFolderName.Inbox, view);
    foreach (var item in findResults.Items)
    emails.Add((EmailMessage)item);
    Console.WriteLine("Loop");
    view.Offset = 50;
    while (findResults.MoreAvailable);
    Above I kept page size of ItemView to
    50, to retrieve no more than 50 mails at a time, and then offsetting it by 50 to get next 50 mails if there are any. However it goes in infinite loop and continuously prints Loop on
    console. So I must be understanding pagesize and offset wrong.
    I want to understand
    (Q3) what pagesize, offset and offsetbasepoint in ItemView constructor
    means
    (Q4) how they behave and
    (Q5) how to use them to retrieve all mails in the inbox
    I didnt found any article online nicely explaining these but just giving code samples. Will appreciate question-wise explanation despite it may turn long.

    1) With FindItems it will only return a subset of Item properties see
    http://msdn.microsoft.com/en-us/library/bb508824(v=exchg.80).aspx for a list and explanation. To get the mime content you need to use a GetItem (or Load) I would suggest you read
    http://blogs.msdn.com/b/exchangedev/archive/2010/03/16/loading-properties-for-multiple-items-with-one-call-to-exchange-web-services.aspx which also covers of paging as well.
    3) offset is from the base your setting the offset to 50 each time which means your only going to get the 50 items from the offset of 50 which just creates an infinite loop. You should use
    view.Offset
    = +50;
    to increment the Offset although it safer to use
    view.Offset  += findResults.Items.Count;
    which increments the offset based on the result of the last FindItems operation.
    5) try something like
    ItemView iv = new ItemView(100, 0);
    FindItemsResults<Item> firesults = null;
    PropertySet psPropSet = new PropertySet(BasePropertySet.IdOnly);
    iv.PropertySet = psPropSet;
    PropertySet itItemPropSet = new PropertySet(BasePropertySet.IdOnly) { ItemSchema.MimeContent, ItemSchema.Subject, EmailMessageSchema.From };
    do
    firesults = service.FindItems(WellKnownFolderName.Inbox, iv);
    service.LoadPropertiesForItems(firesults.Items, itItemPropSet);
    foreach(Item itItem in firesults){
    Object MimeContent = null;
    if(itItem.TryGetProperty(ItemSchema.MimeContent,out MimeContent)){
    Console.WriteLine("Processing : " + itItem.Subject);
    iv.Offset += firesults.Items.Count;
    } while (firesults.MoreAvailable);
    Cheers
    Glen
    .Offset += fiFitems.Items.Count;

  • How to make the result showing one time and make the result to csv file?

    My script having problem of showing out all the AD computer name result  from Active Directory once when running it and storing the result to csv file. I am a newbie in AD and powershell.
    This is the code:
    $strADPathFile = "D:\Powershell for AD\ADPathList.txt"
    $strErrLogFile = "D:\powershell for AD\errorADComputer.log"
    $arrADPath = Get-Content -Path $strADPathFile
    foreach ($strADPath in $arrADPath)
    try
    $objSearch = New-Object DirectoryServices.DirectorySearcher
    $objSearch.Filter = '(objectCategory=computer)'
    $objSearch.SearchRoot = $strADPath
    $objSearch.SearchScope = "Subtree"
    $objSearch.PageSize = 1000
    $objResults = $objSearch.Findall()
    write-host "Retrieving AD computer information in the domain $strDomain"
    write-host "Number of AD Computer Name result: "$objResults.Count
    foreach($objResult in $objResults){
    $objComputer = $objResult.GetDirectoryEntry()
    write-host $objComputer.dNSHostName
    try
    # InsertSQLTable $objComputer
    catch
    write-host $error[0]
    $strError = $objComputer.dNSHostName + " " + $dateNow + $error[0]
    Add-Content $strErrLogFile $strError
    catch
    write-host $error[0]
    Export-Csv D:\PowerShellforAD\test2.csv
    This is the error that I had get is that it will get the result for 2nd time again.
    By the way, what is InputObject about? I had research some of it and still did not quite get it. Can anyone explain? Thanks 

    Hi,
    in the final line you call Export-Csv. which is a great command at exporting information. However, for it to work it needs a path to export to (D:\PowerShellforAD\test2.csv in your case) and Information (InputObject) to export.
    You do not give that command any Information, so it throws an error.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • E26 253 Error while checking in and storing: \\sapserver\file.tif

    Hi Experts,
    I have now been fighting with this problem for a couple of weeks, and not been able to solve the issue.
    My problem is to upload/check-in documents from the application serve in background.
    I have a program to create DIF and attach files using BAPI_DOCUMENT_CREATE2.
    When I'm running the program in foreground there is no problem.
    When I run it in background I get the error message E26 254 Error while checking in and storing:
    sapserver\file.tif
    I have checked that the background process can see the document on the server and that is OK, so the problem must be within the actual storing of the document in DMS in the BAPI.
    Any input to how I can solve this issue is appreciated.
    Thanks in advance,
    Thomas

    Hi All,
    We have now done some testing.
    We got it to work on one of our systems but not on the other
    I ran report RSCMST on both systems with the same backend directory. (A directory on the application server of the one that fails).
    Running this report I get this result on the system that does not work.
    HTTP interface test using function group SCMS_HTTP
    21.06.2010 14:39:01
    serverInfo:
    contRep                   ZEBAN
    contRepDescription        PR Attachments
    serverStatus              running
    serverVendor              Copyright SAP AG, All rights reserved 1998, 2001
    serverVersion             6300
    serverBuild               193
    serverTime                123902
    serverDate                21.06.2010
    serverStatusDescription
    pVersion                  0046
    contRepStatus             data(89%) log(1%)
    contRepStatusDescription
                                                      ok           58.848
    create(1): new doc (frontend)                     ok          445.211
    create(2): new doc (back end)
    check_subrc: subrc     2  instead          0
    check_subrc: HTTP error: 400 Bad Request
    create(2): new doc (back end)                    error
    docGet/create(1): copy document                   ok          105.684
    info(1): existing doc                             ok           26.881
    update(1): new comp                               ok           47.050
    info(2): after update                             ok           30.458
    delete(1): unknown doc                            ok           33.061
    delete(2): unknown comp                           ok           31.669
    delete(3): existing doc                           ok           53.330
    delete(4): deleted doc                            ok           34.781
    delete(5): existing doc                           ok           31.088
    putCert:                                          ok           35.785
             1  errors
    Any ideas to what could be wrong?
    Thanks in advance.

  • Merging and storing files and folders on external hard drive

    Merging and storing files/folders  - I have a MacBookPro3,1 &  a MacBookAir1,1 both running OS10.6.8 and then files from backups and archives on a LaCie 250 and LaCie 500. I want to improve my productivity by merging all files/folder into one place.
    I have a WesternDigital 1T to move files/folders to and do my duplicate deletion work.
    The end result I'm seeking is to have all my files/folders stored on the LaCie 500  - with space for expanding iPhoto Library and Movies then that LaCie 500 Backed up on the 1T.   As my computers are older models the internal drives are smaller - MBA 80GB and MBP160. The Air in particular gets full up quickly and doesn't work efficiently.
    What steps/software have you had experience with, and would recommend to merge all my files/folders, delete duplicates, and get it all in one place - including iTunes, iPhoto. 
    What are the pros and cons of keeping & working with files/folders on an external drive rather than on the internal drive?
    I'm aware of sluggishness in iPhoto if the library is too large, and looked into iPhoto Library Manager as an option for my photos.
    Thanks in advance for your help with this way past due Spring cleaning activity.

    Plugins have to be in specific locations for the application to load them. If you're just storing plugins you're not using you can store them anywhere.

  • Generating a XML file and Storing on the Presentation Server

    Hi Experts,
    I am facing a problem in generating and storing a XML file on Presentation Server.
    I am using Call Transformation as follows:
    CALL TRANSFORMATION id
    SOURCE para = t_xml[]
    RESULT XML xml_string.
    APPEND xml_string TO xml_tab.
    and then using GUID_DOWNLOAD to store the xml file on the PS.
    DATA: xml_string type string,
              xml_tab type table of string.
    now on using GUI_DOWNLOAD, i get the runtime error as Illegal Type Casting.
    On the other hand if i give the data declaration as follows, the code works fine.
    TYPES: begin of ttab,
                       line(65535) type c,
                 end of ttab.
    DATA: xml_string type string,
              xml_tab type table of ttab.
    SInce my data in INternal Table can be very large, 65535 characters are not sufficient for me.
    How do i solve this problem???
    Please help.
    Regards
    Gaurav Raghav
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 4:09 PM

    Hey Gaurav,
    Can you please tell me how did u solve the problem ..
    i am also currently facing the same situation..please help me..
    Regards,
    Jessica Sam

  • Write file in text and stored in seperate folder!

    Hi guys,
    i need a help.
    I want to write a file into an text file and stored it in seperate folder in default colon(ie., if i install an .exe in any colon(c or D:/ or E:/) , then write a string into a text file and save it in .exe instalation colon in seperate folder.
    eg.,
    File f=new File("Survey.txt");
                 FileWriter fw1=new FileWriter(f,true);i want to save survey.txt into a folder storage_folder.
    how can i do it?.

    Thanks for your reply.
    Actually, I want to create an folder automatically without specifing the directory (ie.,not specifying C:/ or D:/ or E:/ ) and store that file.
    ie.,
    File f=new File(" log/text.txt");
    OutputStream f0=new FileOutputStream ("log/text.txt",true);So, the text file stored in log folder (Creats automatically) . The log folder may creat where the installation software installed (Weather it is C:/ or D:/ or E:/).
    pls, clarify my doubt , sir.

  • How best to save photos?  I want to protect my photos (15,000 of them) by putting them on a portable drive and storing it in my safety deposit box.  Is it better to export them all, drag the Photo file, use Time Machine – or are there better alternatives?

    I am a 'newby' to the discussion world.  Hope I am doing this right.  How best to save photos?  I want to protect my photos (15,000 of them) by putting themon a portable drive and storing it in my safety deposit box.  Is it better to export them all, dragthe Photo file, use Time Machine – or are there better alternatives?

    Welcome to the discussions! You can use Time Machine and I would also recommend for you to manually copy your iPhoto Library (on your Pictures folder) to an external drive/thumb drive so you can restore it from there should you loose your TM backup. Exporting them from iPhoto would not preserve the libraries' integrity neither your originals, should you choose to edit them in iPhoto.
    Regards.

  • Where Client ID and Client Secret of SharePoint .app file will be stored

    Where Client ID and Client Secret of SharePoint .app file will be stored, i had published my app in the production, and now i need to enhanced the app, and i want to publish my app again, so where can i get my previous Client ID and Client Secret

    If it's provider hosted app, then you can find ClientId in a AppManifest.xml, and in a web.config of your web project.
    [custom.development]

  • My Xtreamer media player won't read srt sub files downloaded from my iMac and stored in a 1Tb seagate external disk. However, the Xtreamer Elvira media player will read all the .avi files I have loaded in the external disk. Any ideas?

    My Xtreamer media player won't read srt sub files downloaded from my iMac and stored in a 1Tb seagate external disk. However, the Xtreamer Elvira media player will read all the .avi files I have loaded in the external disk. Any ideas?

    I am experiencing the same issue with a new external DVD burner, a Sony DRX-840U. When I load a CD into this external drive it appears in iTunes but when you go to import or play the CD iTunes indicates playing or importing for each individual track for just a moment. The end result is that nothing is ever imported or played. I am experiencing this on two different systems. One a notebook running Win2K and the other a desktop running XPpro. If I use the internal DVD drives on either of these systems everything work just fine. Yet I am able to use this new external DVD drive with every other application. For example Window Media Player has no problem playing or importing the same CD that iTunes fails on. The last person indicated that if one set the DVD drive in question to be the drive of choice under preferences>advanced>burning that all was ok. I my case this Sony external drive is the drive listed as the drive of choice for burning yet the issue still exists.
    As this appears to be an issue that others are also experiencing help from Apple Tech Support would be greatly appreciated.

  • I have lost the app that opened and stored my PDF files

    I thought this app came preloaded. Can't remember the name (brain freeze). It opened and stored all the PDF files attached to email. The icon had the look of newsstand. Naturally I lost my PDF files as well.

    Apple's iBooks app does this, but a PDF email attachment is not automatically copied to the iBooks app when opened with the email. You must manually select "open in iBooks".
    The iBooks app can be deleted and re-downloaded from the iTunes app store and is a free app.

Maybe you are looking for

  • Apple Id for App updates

    Hello, I have a question - my ex boyfriend set up my Iphone when I got it so he used his Apple Id (he has a macbook) but since then we broke up and I hav ecreated my own Apple Id but all of a sudden, my phone is asking me of his Apple Id to update my

  • ORA-12801: error signaled in parallel query server

    Hi all What are the basic reasons of this error: ORA-12801: error signaled in parallel query server I have received this error while running report

  • Custom field in BP_PDBGP table not getting updated

    Hi, i am working in Contract management in SRM 7.0 Pack 6. I have aadded a custom field in partner table which appears in the partner table of contract header. It is a checkbox. when i check it the value gets saved in BBPPDBGP table for the first tim

  • Problem with "Database Gateway for SQL Server"

    Hello, i am testing the different technologies for connecting an oracle database with a sql-server database. The way using 10g-generic-connectivity with ODBC works fine, but the 11g-DG4MSQL makes problems. Environment: Server PEGASUS (32bit Windows S

  • Window 8.1 Reset automatically

    Dear Sir, I have windows 8.1 pro. and its automatically recovered / Reset / Refresh every day after shut down or restart machine just like (Fresh copy installed)