Problems with file (save, open)

I save a file with my dates. (You can see save.vi, it's ok)
Then, I open file but it'snt ok.
Why? I don't know.
After, I'd like search one determinate value.
Can you help me?
Attachments:
save.vi ‏31 KB
open.vi ‏20 KB

Hola Carlos.
Lo que escribes en el fichero es texto, ya que los numeros los conviertes a string.
Para determinar el punto de algo en un fichero de texto, tienes que leerlo usando "read characters from file" y a continuacion "scan from string",que te devuelve el comienzo de la string que buscas.
No me consta que en Labview exista algun scan file que te devuelva el puntero a lo que buscas. No obstante, dado que parece que escribes lineas, puedes leerlas de 1 en 1 y buscar lo que quieres.
Espero que te sirva de ayuda
Alipio
"Qod natura non dat, Salmantica non praestat"

Similar Messages

  • Problem with file in open dataset

    Hi experts ,
    i m  getting output in a standard way . all the fields are displaying in one column .
    this is my code .
      DATA: L_DATA LIKE RLGRAP-FILENAME VALUE '/usr/sap/dev/sys/global/substanc' .
      OPEN DATASET L_DATA FOR OUTPUT IN TEXT MODE ENCODING DEFAULT  .
      IF SY-SUBRC <> 0.
        MESSAGE E208(00) WITH 'Error Opening File'.
      ENDIF.
      LOOP AT I_DOWNLOAD INTO I_WA.
        TRANSFER I_WA-WERKS TO L_DATA.
        TRANSFER I_WA-MATNR TO L_DATA .
        TRANSFER I_WA-MAKTX TO L_DATA.
        TRANSFER I_WA-MEINS TO L_DATA.
        TRANSFER I_WA-PQTY TO L_DATA.
        TRANSFER I_WA-FKLMG1 TO L_DATA.
        TRANSFER I_WA-DQTY TO L_DATA.
        TRANSFER I_WA-DOFORCAST TO L_DATA.
        TRANSFER I_WA-DUFORCAST TO L_DATA.
        TRANSFER I_WA-WAQTY TO L_DATA.
        TRANSFER I_WA-OFORCAST TO L_DATA.
        TRANSFER I_WA-UFORCAST TO L_DATA.
      ENDLOOP.
      CLOSE DATASET L_DATA.
      IF SY-SUBRC <> 0.
        MESSAGE E208(00) WITH 'Error Closing File'.
      ENDIF.
    Thanks,
    Ashish Gupta
    Moderator Message: Basic and Duplicate Post.
    Edited by: kishan P on Dec 10, 2010 3:05 PM

    Hi Sravan,
    Thanks for replay .
    I did the same but  i was getting error message .
    "I_WA" cannot be a table, a reference, a string, or contain any of
    these objects. any of these objects
    This is my internal table and work area definition.
    DATA : I_DOWNLOAD TYPE TABLE OF TY_DOWNLOAD WITH HEADER LINE,
           I_WA TYPE TY_DOWNLOAD.
    Thanks ,
    Ashish Gupta

  • FM9: Problem with File- Save as PDF

    Hello,
    I'm using a German installation fo FrameMaker9 and will try to translate the actions and messages.
    When I try to save my document  as pdf I get a message telling me to clear the printer option "rely on system fonts only". When I do that for the Adobe PDF printer everything seems to work fine.
    But: The default printer on my laptop isn't (and shouldn't be) Adobe PDF, and  it looks like I have to manually select "Adobe PDF" in File->Print Setup everytime (i.e . at least once after starting FrameMaker) before I want to "save as pdf", which is annoying. Is there any way to get rid of this?
    Software Versions:
    FM 9.0p255
    Adobe Reader 9.4.4
    Adobe Acrobat 9 Pro 9.4.4
    OS: Windows 7
    Thanks in advance for any advice given,
    JF

    First thing I'd try is the SetPrint plugin, which sets your default printer to Adobe Acrobat/PDF printer in Frame ONLY.
    http://www.sundorne.com/FrameMaker/Freeware/setPrint.htm

  • Error while opening pdf in reader in windows 8:Can't open this file. There's a problem with file format

    I have a problem with a pdf file which does not open with reader in windows 8 but it opens properly with adobe pdf reader. All other pdf can be opened in reader.But when i open a pdf(see this link for pdf for which i got error http://incometaxsoft.com/temp/Form.pdf)
    it gives error as "Can't open this file. There's a problem with file format".
    The same file opens properly in adobe pdf reader.You can check the pdf file which i have mentioned in the link above.But the reader which comes with windows 8 can open some other pdf in the same PC.What may be the error causing this??

    This has turned out to be an enormous issue for me as I sell PDF files as ebooks. I have done a fair amount of investigating this for my system.
    My files have to be compatible not just across readers but across operating systems.
    To date, I have over 200 PDFs that have functioned flawlessly across Mac, PC (Windows 7 and below), Android, iPhone/iPad, Linux.
    I personally test my PDFs using a variety of readers and PDF editors including
    PDF XChange (my favorite)
    Foxit (runner up for me and I recommend for most people)
    Adobe (the bloated monster)
    Nitro 9 (great for moving graphical elements around)
    ABBYY
    And the Nuance PDF Create toolsets
    Those are off the top of my head. There are a bunch on Android that I test with too.
    I am running the Windows 10 Pro Tech Preview and I have this same problem so I know it isn't fixed yet in any kind of pre-release way (-sigh-)
    Here is what I've learned for my situation
    The PDFs I created using NUANCE'S PDF CREATE PROFESSIONAL VERSION 8
    all fail using the built-in Windows 8/10 PDF reader.
    When I look at the PDF properties for these Nuance created files, the underlying engine used to write them is called "ImageToPDF". Using ABBYY it indicates their own engine as does everyone else that I've tried. It is easy for you to check to see
    what created your PDF by doing a "Control D" (look at the document properties). Perhaps there's a common engine causing issues.
    If I use the exact same source files to create a PDF using any of my other tools I have no issues. I checked the PDF versions made by the tools and they are all set to 1.5.
    A customer mentioned being able to convert them in a way they worked by saving them without having to do any kind of extraction, but I have not been able to duplicate that. Perhaps he did a "print" which seems like it could work.
    In summary, the workaround everyone is talking about, using an alternate reader, of course works. But not everyone wants to change.
     The culprit I have found is my Nuance PDF Creation tools that are using the ImageToPDF engine.
    I hope it gets FIXED as I really don't want to have to regenerate all of my PDF files.

  • When I open Firefox the following alert appears: "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory." There is a solution in the forum but only for Windows based

    When I open the application the following alert appears: "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory." There is a solution on the support site but only for Windows-based Firefox, and I'm a Mac user. I have plenty of room on my hard disk.
    == This happened ==
    Every time Firefox opened
    == Two days ago, for no apparent reason.

    In Mac OS X v10.7, the $HOME/Library folder is a hidden folder.
    Open Finder and use one of these:
    * Go > Go To Folder (Shift-Command-G) and in the dialog type: ~/Library
    * Open the "Go" menu and hold down the Option key to make the Library appear
    You can also use this command in a Terminal window to remove the hidden flag.
    * Mac HD > Applications > Utilities > Terminal
    * chflags nohidden ~/Library

  • Why  would an error pop up saying the installer is damaged. The Installer can't open the package. There may be a problem with file ownership or permissions. when trying to install java 7?

    why  would an error pop up saying the installer is damaged. The Installer can’t open the package. There may be a problem with file ownership or permissions. when trying to install java 7?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select
    /var/log ▹ install.log
    from the hierarchical list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar. Then select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, click the Clear Display button in the toolbar of the Console window and then try the installation again.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

  • Mac OS 10.7.4, installing Microsoft Office 14.2.7, error "The Installer can't open the package. There may be a problem with file ownership or permissions."

    Mac OS 10.7.4, updating new version Microsoft Office 14.2.7, ERROR "The Installer can’t open the package. There may be a problem with file ownership or permissions."
    The Apple Installer version is Version 5.0.1 (537).
    When I check the Installer Log, I find only these two messages that I do not understand.
    Jul 12 09:29:13 Bruces-MacBook-Pro Installer[423]: Install's runner tool is not properly configured as a setuid tool.
    Jul 12 09:29:13 Bruces-MacBook-Pro Installer[423]: Unable to create InstallController
    I changed all the permissions for all the Microsoft Office Folder users to Read and Write.
    Restart, same error

    See:
    https://discussions.apple.com/thread/1948155?threadID=1948155&tstart=1
    I had identical Installer Log failure notices: I used Houdini to view the invisible files and per Limnos' suggestion cautiously dragged
    user > library > preferences > com.apple.installer.plist out of that folder onto my desktop and double-clicked on the .pkg file again and it opened and installed properly.
    My Installer now works properly on all .pkg files.

  • Problems with File Transfers Over Firewire 800

    Problems with File Transfers Over Firewire 800.
    Over the past month, I have had problems when transfering files from my harddrive, over Firewire 800 to a portable drive. I usually transfer very large files (20gb or more) to the portable drives for moving files around. When I drag a file over to copy onto a drive, the transfer starts normally. If I drag more files to copy over, the computer screen goes darker and a large icon comes up that looks like a power button icon. It tells me to restart, so I have to do a hard shut down on my G5. Weird. I also get the dark screen of death sometimes when I am transfering those large files and open another application to do some work while it's copying. It's killing me. I am having to sit here and wait for the transfer to finish before I can do anything.
    Any thoughts...
    Dual 2.7 GHz PowerPC G5
    Mac OSX 10.4.3
    Dual 2.7 GHz PowerPC G5   Mac OS X (10.4.3)  

    Have you run the Apple Hardware Test? Sounds like it could be a RAM problem.

  • I suddenly have this error message on FireFoxthis message pops up: "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no re

    I suddenly encounter this error message from Fire Fox.
    Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features.
    I uninstalled the browser and download a new version but it does not resolve the issue.
    I know my hard disc has ample space. I do NOT know where to find the Profile directory to fix the read restriction box.
    == This happened ==
    Every time Firefox opened
    == After something about security add-on of Norton pop up by itself. ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; MSN Optimized;US)

    This link shows things to check - https://support.mozilla.com/kb/Could+not+initialize+the+browser+security+component

  • Unable to download from AppStore, updates,etc.Messages 'the installer is damaged' to 'there might be a problem with file ownership and permissions.' I am the owner and only user of a new MBP. What could be going on?

    Is anyone having the same type of problems I'm having with Lion. I have a new MacBook Pro, received 7 weeks ago, preinstalled with Leopard 10.6.7. I didn't migrate anything from my old iMac, wanted a clean install from the Apple Store. While there, I asked for the upgrade to Lion 10.7, however their system was down.
    I  installed it myself, wirelessly about a week later, and Apple emailed me a receipt. Now, I've had to call support directly last week when I lost Mail, Address Book, was unable to open Preview or iTunes, among other problems. Seemed fixed after a session that baffled even the store tech.  Now I am unable to download or install the recent Mac updates for Lion, from the App Store, could not install Adobe Reader, etc. Messages range from 'A network error has occured - Check your Internet connection and try again' to 'The Installer is damaged and cannot open the package. There may be a problem with file ownership or permissions.'  All fail and I'll probably have to call Apple again. I am frustrated beyond words.  Logs 'Install's runner tool is not properly configured as a setuid tool', domain errors, 'attempt to write a readonly database, and on and on. I have barely done a thing on this computer except search online for help with these problems. Safari gives me a 'You are not connected to the internet' too often. Diagnostics disagrees. I do see wi-fi problems in the forum. Disk and permissions were fine at the beginning of the earlier problems, checked first by support tech. I'm not sure if support tech even knew. I was just happy they were fixed. Anyone have these download and/or install problems after a 'clean bill of health' so to speak, only a week ago?

    Let's try the following user tip with that one:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • Problem with file permissions

    Hello all,
    I am making a simple HttpServlet, which takes input
    from html page and saves in to a file, but I'm having a
    bit of a problem with file permissions.
    I'm getting the following exception
    java.security.AccessControlException: access denied (java.io.FilePermission ./data/result read)
         java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         java.security.AccessController.checkPermission(AccessController.java:427)
         java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         java.lang.SecurityManager.checkRead(SecurityManager.java:871)
         java.io.File.exists(File.java:700)
         SyksyHTTPServlet.doPost(SyksyHTTPServlet.java:31)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)The exception seems to occur when I'm trying to check whether the file already
    exists or not.
    The data directory has all permissions (read, write and execute) set for all users,
    and I have made an empty file called result inside the data directory for testing.
    This file has read and write permissions enabled for all users.
    Here's my code
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.Enumeration;
    import java.util.List;
    import java.util.ArrayList;
    public class SyksyHTTPServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              int totalCount = 0;
              List list;
              String song = request.getParameter("song");
              PrintWriter out = response.getWriter();
              File file = new File("./data/result");
              if(file.exists())  // this is line 31, which seems to cause the exception
                   list = readFile(file);
              else
                   file.createNewFile();
                   list = new ArrayList();
              list.add(song);
              writeFile(file, list);
              for(int i = 0 ; i < list.size() ; i++)
                   out.println(list.get(i));
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              doPost(request, response);
         private List readFile(File file)
              List list = null;
              try
                   FileInputStream fis = new FileInputStream(file);
                   ObjectInputStream ois = new ObjectInputStream(fis);
                   list = (ArrayList)ois.readObject();
                   ois.close();
              catch(Exception e)
                   e.printStackTrace();
              return list;
         private void writeFile(File file, List list)
              try
                   FileOutputStream fos = new FileOutputStream(file);
                   ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(list);
                   oos.flush();
                   oos.close();
              catch(Exception e)
                   e.printStackTrace();
    }I'm using Tomcat 5.5 on Ubuntu Linux, if that has anything to do with this.
    I'll appreciate all help.
    kari-matti

    Hello again.
    I'm still having problems with this. I made
    a simple servlet that reads from and writes
    to text file. The reading part work fine on my
    computer, but the writing doesn't, not even
    an exception is thrown if the file exists that
    I'm trying to write to. If I try to create a new
    file I'll get an exception about file permissions.
    I also asked a friend of mine to try this same
    servlet on his windows computer and it works
    as it should.
    Here's the code
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class ReadServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              String s = "";
              PrintWriter out = response.getWriter();
              String docroot = getServletContext().getRealPath( "/" );
              out.println("docroot: "+docroot);
              File file = new File(docroot+"test.txt");
              if(file.exists())
                   s = readFile(file);
                   out.println(s);
              else
                   out.println("file not found");
                   //file.createNewFile();                    // causes exception
                   //out.println("new file created.");
              writeFile(file, "written by servlet");
              out.println("Now look in the file "+file.getPath());
              out.println("and see if it contains text 'written by servlet'");
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              doPost(request, response);
         private String readFile(File file)
              FileInputStream fis = null;
              BufferedInputStream bis = null;
              DataInputStream dis = null;
              String s = "";
              try
                   fis = new FileInputStream(file);
                   bis = new BufferedInputStream(fis);
                   dis = new DataInputStream(bis);
                   s = dis.readLine();
                   fis.close();
                   bis.close();
                   dis.close();
              catch(Exception e)
                   e.printStackTrace();
              return s;
         private void writeFile(File file, String s)
              FileOutputStream fos = null;
              BufferedOutputStream bos = null;
              DataOutputStream dos = null;
              try
                   fos = new FileOutputStream(file);
                   bos = new BufferedOutputStream(fos);
                   dos = new DataOutputStream(bos);
                   dos.writeChars(s);
                   fos.flush();
                   bos.flush();
                   dos.flush();
                   fos.close();
                   bos.close();
                   dos.close();
              catch(Exception e)
                   e.printStackTrace();
    }And if someone wants to test this servlet I can
    give a war package.
    Any advices?
    kari-matti

  • Problem with file vault

    One of the desktops on my macbook 2007 steel case will not open.
    The message i get on screen at login is that there is a problem with file vault.
    my dissertation is on that desktop.
    all other desktops/user accounts are unaffected and i have admin permissions on them
    i recently upgraded to osx 10.9.4
    how can i get back in?
    chaiman 22

    If you restored the account to which the FileVault protected Home folder belonged, then you need to log into that account and enable FileVault.
    If you just need access to the data in the FV protected Home folder, then locate the sparsebundle disc image file that contains the encrypted folder. Double-click on it as if to mount it. You will then need to enter the FV password associated with the account to gain access (this is NOT the admin nor login password.)

  • Problem with file descriptors not released by JMF

    Hi,
    I have a problem with file descriptors not released by JMF. My application opens a video file, creates a DataSource and a DataProcessor and the video frames generated are transmitted using the RTP protocol. Once video transmission ends up, if we stop and close the DataProcessor associated to the DataSource, the file descriptor identifying the video file is not released (checkable through /proc/pid/fd). If we repeat this processing once and again, the process reaches the maximum number of file descriptors allowed by the operating system.
    The same problem has been reproduced with JMF-2.1.1e-Linux in several environments:
    - Red Hat 7.3, Fedora Core 4
    - jdk1.5.0_04, j2re1.4.2, j2sdk1.4.2, Blackdown Java
    This is part of the source code:
    // video.avi with tracks audio(PCMU) and video(H263)
    String url="video.avi";
    if ((ml = new MediaLocator(url)) == null) {
    Logger.log(ambito,refTrazas+"Cannot build media locator from: " + url);
    try {
    // Create a DataSource given the media locator.
    Logger.log(ambito,refTrazas+"Creating JMF data source");
    try
    ds = Manager.createDataSource(ml);
    catch (Exception e) {
    Logger.log(ambito,refTrazas+"Cannot create DataSource from: " + ml);
    return 1;
    p = Manager.createProcessor(ds);
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Failed to create a processor from the given url: " + e);
    return 1;
    } // end try-catch
    p.addControllerListener(this);
    Logger.log(ambito,refTrazas+"Configure Processor.");
    // Put the Processor into configured state.
    p.configure();
    if (!waitForState(p.Configured))
    Logger.log(ambito,refTrazas+"Failed to configure the processor.");
    p.close();
    p=null;
    return 1;
    Logger.log(ambito,refTrazas+"Configured Processor OK.");
    // So I can use it as a player.
    p.setContentDescriptor(new FileTypeDescriptor(FileTypeDescriptor.RAW_RTP));
    // videoTrack: track control for the video track
    DrawFrame draw= new DrawFrame(this);
    // Instantiate and set the frame access codec to the data flow path.
    try {
    Codec codec[] = {
    draw,
    new com.sun.media.codec.video.colorspace.JavaRGBToYUV(),
    new com.ibm.media.codec.video.h263.NativeEncoder()};
    videoTrack.setCodecChain(codec);
    } catch (UnsupportedPlugInException e) {
    Logger.log(ambito,refTrazas+"The processor does not support effects.");
    } // end try-catch CodecChain creation
    p.realize();
    if (!waitForState(p.Realized))
    Logger.log(ambito,refTrazas+"Failed to realize the processor.");
    return 1;
    Logger.log(ambito,refTrazas+"realized processor OK.");
    /* After realize processor: THESE LINES OF SOURCE CODE DOES NOT RELEASE ITS FILE DESCRIPTOR !!!!!
    p.stop();
    p.deallocate();
    p.close();
    return 0;
    // It continues up to the end of the transmission, properly drawing each video frame and transmit them
    Logger.log(ambito,refTrazas+" Create Transmit.");
    try {
    int result = createTransmitter();
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Error Create Transmitter.");
    return 1;
    } // end try-catch transmitter
    Logger.log(ambito,refTrazas+"Start Procesor.");
    // Start the processor.
    p.start();
    return 0;
    } // end of main code
    * stop when event "EndOfMediaEvent"
    public int stop () {
    try {   
    /* THIS PIECE OF CODE AND VARIATIONS HAVE BEEN TESTED
    AND THE FILE DESCRIPTOR IS NEVER RELEASED */
    p.stop();
    p.deallocate();
    p.close();
    p= null;
    for (int i = 0; i < rtpMgrs.length; i++)
    if (rtpMgrs==null) continue;
    Logger.log(ambito, refTrazas + "removeTargets;");
    rtpMgrs[i].removeTargets( "Session ended.");
    rtpMgrs[i].dispose();
    rtpMgrs[i]=null;
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Error Stoping:"+e);
    return 1;
    return 0;
    } // end of stop()
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
    Logger.log(ambito,refTrazas+"\nControllerEvent."+evt.toString());
    if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
    stateTransitionOK = true;
    waitSync.notifyAll();
    } else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
    stateTransitionOK = false;
    waitSync.notifyAll();
    } else if (evt instanceof EndOfMediaEvent) {
    Logger.log(ambito,refTrazas+"\nEvento EndOfMediaEvent.");
    this.stop();
    else if (evt instanceof ControllerClosedEvent)
    Logger.log(ambito,refTrazas+"\nEvent ControllerClosedEvent");
    close = true;
    waitSync.notifyAll();
    else if (evt instanceof StopByRequestEvent)
    Logger.log(ambito,refTrazas+"\nEvent StopByRequestEvent");
    stop =true;
    waitSync.notifyAll();
    Many thanks.

    Its a bug on H263, if you test it without h263 track or with other video codec, the release will be ok.
    You can try to use a not-Sun h263 codec like the one from fobs or jffmpeg projects.

  • NT security problems with file I/O

    I have 2 problems with file I/O. When I read from a file I use the getAbsolutePath() method that is part of the File class to find what directory the files are currenlty. The problem is that the returned path says that the file is on the desktop no matter what directory the file really is in. The second problem is that I am unable to save files anywhere but the desktop. I must run the class files from the desktop too to get it to work.
    I am using NT 4.0 for development. I'm guessing that these problems might be NT security related. Could someone help me?
    Code below:
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.io.File;
    import java.awt.event.*;
    //import java.security.*;
    //import sun.security.*;
    //import java.awt.Window;
    //import com.ms.security.*;
    public class Edit extends Applet implements ActionListener, ItemListener
    String Gselect;
    reader readit;
    int mhz, khz;
    TextField textField1;
    String freq = "000.000";
    String data;
    Choice freqC;
    Button ActivateB, SaveB, /*CancelB, HelpB,*/ DeleteB;
    Checkbox SetC;
    int NotUsedReply[] = new int[200];
    int HwListReply[] = new int[200];
    public void init()
    readit = new reader();
    String myFile="satellite.st1";
    // myFile = myFile.concat(Gselect);
    File satellite = new File(myFile);
    textField1 = new TextField();
    textField1.setText( "(void) " );
    add( textField1 );
    SetC = new Checkbox("TRAP-RX");
    add(SetC);
    SetC.addItemListener(this);
    freqC = new Choice();
    freqC.setSize(20,50);
    freqC.add("000.000");
    add(freqC);
    freqC.addItemListener(this);
    ActivateB = new Button("Activate");
    add(ActivateB);
    ActivateB.addActionListener(this);
    SaveB = new Button("Save");
    add(SaveB);
    SaveB.addActionListener(this);
    DeleteB = new Button("Delete");
    add(DeleteB);
    DeleteB.addActionListener(this);
         /*CancelB = new Button("Cancel");
    add(CancelB);
    CancelB.addActionListener(this);
         HelpB = new Button("Help");
    add(HelpB);
    HelpB.addActionListener(this);*/
    //textField1.setText( data );
    for(int a = 1; a < 9; a++)
    data = readit.getData(satellite.getAbsolutePath(), a);//("E:\\forte4j\\system\\Projects\\Zebra\\satellite.st1", a);
    freqC.addItem(data);
    textField1.setText(satellite.getAbsolutePath() );
    public void paint(Graphics g)
    //g.drawString("Radio Setup Files",20, 20);
    //g.drawString(getParameter("wse"),20, 20);
    public void actionPerformed(ActionEvent event)
    if(event.getSource() == ActivateB)
    activator();
    if(event.getSource() == SaveB)
    /*if(event.getSource() == CancelB)
    stop();
    if(event.getSource() == HelpB)
    if(event.getSource() == DeleteB)
    public void itemStateChanged(ItemEvent e)
    if(e.getItemSelectable() == SetC)
    textField1.setText("Check box 1 clicked!");
    if(e.getItemSelectable() == freqC)
    freq = ((Choice)e.getItemSelectable()).getSelectedItem();
    public void activator()
    makeMHZ();
    makeKHZ();
    if(mhz > 254)
    int StartLink[]={0x0c,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00};          //New Link Proc Start
    int TrapConfig[]={0x25,0x80,0x00,0x00,0x00,0xb7,0x00,0x0c,0x0b,          //TRAP Configuration
    0x00,0x00,0x00,0xff,0xa0,0xff,0x0d,0xff,0xe8,
    0xff,0x0d,0xff,0x00,0xff,0x15,0xff,0xb0,0xff,
    0xff,0xff,0x94,0x0a,0x01,0x06,0x1a,0x00,0x0d,
    0x2d,0x21};
    TrapConfig[11]=(mhz-255);
    TrapConfig[12]=(khz/5);
    int SetUserOutput[]={0x41,0x42,0x49,0x54,0x52,0x41,0x50,0x20,0x34, //Sets User Output Format
    0x35,0x34,0x35,0x30,0x30,0x2e,0x30,0x4e,0x30,
    0x38,0x32,0x34,0x35,0x30,0x30,0x2e,0x30,0x57,
    0x30,0x31,0x30,0x30,0x2e,0x30,0x30,0x4b,0x4d,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00};
    sendget CmdFunc;
    CmdFunc=new sendget();
    try
    //PolicyEngine.assertPermission(PermissionID.SYSTEM);
    Socket h = new Socket("192.9.200.155",9000);
    Socket s = new Socket("192.9.200.155",9001);
    Socket t = new Socket("192.9.200.155",9002);
    int j;
    CmdFunc.SendCmd(h,0,0x01,null);
    CmdFunc.GetCmd(h,HwListReply);
    CmdFunc.SendCmd(s,9,0x1e,StartLink); //New Link Proc Start
    CmdFunc.GetCmd(s,NotUsedReply);
    CmdFunc.SendCmd(s,37,0x00,TrapConfig); //TRAP Configuration
    CmdFunc.GetCmd(s,NotUsedReply);
    CmdFunc.SendCmd(s,155,0x03,SetUserOutput);//Sets User Output Format
    CmdFunc.GetCmd(s,NotUsedReply);
    catch(Exception e){}
    else
    textField1.setText( "000.000 is the null choice. Try another." );
    public void receiveText1( String select )
    Gselect=select;
    public void makeMHZ()
    String y = freqC.getSelectedItem();
    y = y.substring(0,3);
    mhz = Integer.parseInt(y);
    //textField1.setText( y );
    public void makeKHZ()
    String y = freqC.getSelectedItem();
    y = y.substring(4,7);
    khz = Integer.parseInt(y);
    //textField1.setText( y );
    import java.awt.*;
    import java.applet.*;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.LineNumberReader;
    import java.awt.event.*;
    import com.ms.security.*;
    import netscape.security.*;
    import netscape.util.*;
    public class saver extends Applet implements ActionListener
    String nameS = "Data.txt";
    String dataS = "Default Data";
    Button saveB;
    public void init()
    saveB = new Button("SaveFile");
    add(saveB);
    saveB.addActionListener(this);
    public void actionPerformed(ActionEvent event)
    if(event.getSource() == saveB)
    RandomAccessFile RAF;
    byte array0[] = dataS.getBytes();
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    if(Class.forName("netscape.security.PrivilegeManager") != null)
    netscape.security.PrivilegeManager.enablePrivilege("UniversalFileWrite");
    catch (Throwable cnfe)
    try
    RAF = new RandomAccessFile(nameS, "rw");
    // RAF.writeUTF(dataS);
    RAF.write(dataS.getBytes());
    RAF.close();
    catch(Exception e)
    public void receiveND(String name, String data)
    if(name != null)
    nameS = name;
    dataS=data;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.LineNumberReader;
    //import java.security.*;
    import com.ms.security.*;
    import netscape.security.*;
    import netscape.util.*;
    public class reader
    //Signature sig;
    public String getData(String filename, int pass)
    //String nameS = "Data.txt";
    String dataS = "Default Data Sucks";
    String comma = ",";
    int get = pass, count=0, top=0, bottom=0;
    char[] work;
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    if(Class.forName("netscape.security.PrivilegeManager") != null)
    netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");
    catch (Throwable cnfe)
    try
    //sig.sign();
    //nameS = filename;
    RandomAccessFile RAF = new RandomAccessFile(filename, "r");
    // dataS = RAF.readUTF();
    dataS = RAF.readLine();
    RAF.close();
    catch(Exception e)
    return e.toString();
    work = dataS.toCharArray();
    for(int i = 0; i < dataS.length(); i++)
    if( work[i] == ',' )
    count++;
    if(get == count)
    bottom = i + 1;
    if( (work[i] == ',') && (count > get) && (top == 0) )
    top = i;
    dataS = dataS.substring(bottom,top);
    return dataS;
    }

    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.io.File;
    import java.awt.event.*;
    //import java.security.*;
    //import sun.security.*;
    //import java.awt.Window;
    //import com.ms.security.*;
    public class Edit extends Applet implements ActionListener, ItemListener
    String Gselect;
    reader readit;
    int mhz, khz;
    TextField textField1;
    String freq = "000.000";
    String data;
    Choice freqC;
    Button ActivateB, SaveB, /*CancelB, HelpB,*/ DeleteB;
    Checkbox SetC;
    int NotUsedReply[] = new int[200];
    int HwListReply[] = new int[200];
    public void init()
    readit = new reader();
    String myFile="satellite.st1";
    // myFile = myFile.concat(Gselect);
    File satellite = new File(myFile);
    textField1 = new TextField();
    textField1.setText( "(void) " );
    add( textField1 );
    SetC = new Checkbox("TRAP-RX");
    add(SetC);
    SetC.addItemListener(this);
    freqC = new Choice();
    freqC.setSize(20,50);
    freqC.add("000.000");
    add(freqC);
    freqC.addItemListener(this);
    ActivateB = new Button("Activate");
    add(ActivateB);
    ActivateB.addActionListener(this);
    SaveB = new Button("Save");
    add(SaveB);
    SaveB.addActionListener(this);
    DeleteB = new Button("Delete");
    add(DeleteB);
    DeleteB.addActionListener(this);
    /*CancelB = new Button("Cancel");
    add(CancelB);
    CancelB.addActionListener(this);
    HelpB = new Button("Help");
    add(HelpB);
    HelpB.addActionListener(this);*/
    //textField1.setText( data );
    for(int a = 1; a < 9; a++)
    data = readit.getData(satellite.getAbsolutePath(), a);//("E:\\forte4j\\system\\Projects\\Zebra\\satellite.st1", a);
    freqC.addItem(data);
    textField1.setText(satellite.getAbsolutePath() );
    public void paint(Graphics g)
    //g.drawString("Radio Setup Files",20, 20);
    //g.drawString(getParameter("wse"),20, 20);
    public void actionPerformed(ActionEvent event)
    if(event.getSource() == ActivateB)
    activator();
    if(event.getSource() == SaveB)
    /*if(event.getSource() == CancelB)
    stop();
    if(event.getSource() == HelpB)
    if(event.getSource() == DeleteB)
    public void itemStateChanged(ItemEvent e)
    if(e.getItemSelectable() == SetC)
    textField1.setText("Check box 1 clicked!");
    if(e.getItemSelectable() == freqC)
    freq = ((Choice)e.getItemSelectable()).getSelectedItem();
    public void activator()
    makeMHZ();
    makeKHZ();
    if(mhz > 254)
    int StartLink[]={0x0c,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00}; //New Link Proc Start
    int TrapConfig[]={0x25,0x80,0x00,0x00,0x00,0xb7,0x00,0x0c,0x0b, //TRAP Configuration
    0x00,0x00,0x00,0xff,0xa0,0xff,0x0d,0xff,0xe8,
    0xff,0x0d,0xff,0x00,0xff,0x15,0xff,0xb0,0xff,
    0xff,0xff,0x94,0x0a,0x01,0x06,0x1a,0x00,0x0d,
    0x2d,0x21};
    TrapConfig[11]=(mhz-255);
    TrapConfig[12]=(khz/5);
    int SetUserOutput[]={0x41,0x42,0x49,0x54,0x52,0x41,0x50,0x20,0x34, //Sets User Output Format
    0x35,0x34,0x35,0x30,0x30,0x2e,0x30,0x4e,0x30,
    0x38,0x32,0x34,0x35,0x30,0x30,0x2e,0x30,0x57,
    0x30,0x31,0x30,0x30,0x2e,0x30,0x30,0x4b,0x4d,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00};
    sendget CmdFunc;
    CmdFunc=new sendget();
    try
    //PolicyEngine.assertPermission(PermissionID.SYSTEM);
    Socket h = new Socket("192.9.200.155",9000);
    Socket s = new Socket("192.9.200.155",9001);
    Socket t = new Socket("192.9.200.155",9002);
    int j;
    CmdFunc.SendCmd(h,0,0x01,null);
    CmdFunc.GetCmd(h,HwListReply);
    CmdFunc.SendCmd(s,9,0x1e,StartLink); //New Link Proc Start
    CmdFunc.GetCmd(s,NotUsedReply);
    CmdFunc.SendCmd(s,37,0x00,TrapConfig); //TRAP Configuration
    CmdFunc.GetCmd(s,NotUsedReply);
    CmdFunc.SendCmd(s,155,0x03,SetUserOutput);//Sets User Output Format
    CmdFunc.GetCmd(s,NotUsedReply);
    catch(Exception e){}
    else
    textField1.setText( "000.000 is the null choice. Try another." );
    public void receiveText1( String select )
    Gselect=select;
    public void makeMHZ()
    String y = freqC.getSelectedItem();
    y = y.substring(0,3);
    mhz = Integer.parseInt(y);
    //textField1.setText( y );
    public void makeKHZ()
    String y = freqC.getSelectedItem();
    y = y.substring(4,7);
    khz = Integer.parseInt(y);
    //textField1.setText( y );
    import java.awt.*;
    import java.applet.*;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.LineNumberReader;
    import java.awt.event.*;
    import com.ms.security.*;
    import netscape.security.*;
    import netscape.util.*;
    public class saver extends Applet implements ActionListener
    String nameS = "Data.txt";
    String dataS = "Default Data";
    Button saveB;
    public void init()
    saveB = new Button("SaveFile");
    add(saveB);
    saveB.addActionListener(this);
    public void actionPerformed(ActionEvent event)
    if(event.getSource() == saveB)
    RandomAccessFile RAF;
    byte array0[] = dataS.getBytes();
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    if(Class.forName("netscape.security.PrivilegeManager") != null)
    netscape.security.PrivilegeManager.enablePrivilege("UniversalFileWrite");
    catch (Throwable cnfe)
    try
    RAF = new RandomAccessFile(nameS, "rw");
    // RAF.writeUTF(dataS);
    RAF.write(dataS.getBytes());
    RAF.close();
    catch(Exception e)
    public void receiveND(String name, String data)
    if(name != null)
    nameS = name;
    dataS=data;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.LineNumberReader;
    //import java.security.*;
    import com.ms.security.*;
    import netscape.security.*;
    import netscape.util.*;
    public class reader
    //Signature sig;
    public String getData(String filename, int pass)
    //String nameS = "Data.txt";
    String dataS = "Default Data Sucks";
    String comma = ",";
    int get = pass, count=0, top=0, bottom=0;
    char[] work;
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    if(Class.forName("netscape.security.PrivilegeManager") != null)
    netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");
    catch (Throwable cnfe)
    try
    //sig.sign();
    //nameS = filename;
    RandomAccessFile RAF = new RandomAccessFile(filename, "r");
    // dataS = RAF.readUTF();
    dataS = RAF.readLine();
    RAF.close();
    catch(Exception e)
    return e.toString();
    work = dataS.toCharArray();
    for(int i = 0; i < dataS.length(); i++)
    if( work == ',' )
    count++;
    if(get == count)
    bottom = i + 1;
    if( (work == ',') && (count > get) && (top == 0) )
    top = i;
    dataS = dataS.substring(bottom,top);
    return dataS;

  • I keep getting this diologue box as I start up Firefox "Could not initialise the application's security component. The most probable cause is problems with files in your browser's profile directory. ... what should I do exactly?

    I keep getting the following dialogue box when I start Firefox " Could not initialise the application's security component. The most probable cause is problems with files in your browser's profile directory. Please check that this directory has no read/write restrictions." I am not sure how to find or change the profile directory. I have gone to the Options: General: Save files to ...box but it wont allow me to browse to another file and the box remains blank. ideas please!

    See [[Could not initialize the browser security component]]
    Continue here: [/questions/780717]

Maybe you are looking for

  • How to minimize without crashing?

    Howdy Adobe! Is there a way I can minimize the program window without having the program crash? Or is that just too much to ask? I believe you call it Adobe Digital Editions, version 4.0.3. Build 110333... ish? It totally sucks! Let me tell ya! I had

  • How to edit cell in a Data Grid

    Hai     I have pasted the mxml below.    I need how to edit a cell in a datagrid.   1. Run the mxml, enter the values in the textbox and click add button.   2. then click AND button, now u can see the values displayed in the grid. 3. Then again chang

  • Dynamic Storage Bin

    I receive materials in storage type 902 with movement type 101 with dynamic storage bin = purchase order number. Now I have to transfer this material to storage type 002 again with dynamic storage bin to be entered manually. This dynamic bin can have

  • Fault Device Manager 4.1.0 and C4503E devices

    Dears, I am working with LMS 4.1 and FDM 4.1.0. If I ask to the Supported Device Finder Portlet about C4503-E (SysObjectId: 1.3.6.1.4.1.9.1.874), it tells that this device is supported by DFM 4.1.0. Nevertheless, in DFM module each one devices appear

  • Using iDVD templates

    Is there any way I can use iDVD templates in DVD SP? Thanks much. Best. Tom