Results 1 to 7 of 7

Thread: applet

  1. #1

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362

    applet

    Can someone tell me how can I open a file on the server and to open it with the applet.

    I have a HTTP server in my computer and I want to load a *.txt to the program. The *.txt is in my computer and I do not need to open something on the client machine... I juste want to use the test file in the same directory of my .class. How can I do that ?

  2. #2

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    My program work when I execute it with the appletviewer in JBuilder7 but in the html file it doesn't... what do I have the have the permission?

  3. #3
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    What permissions do you have setup for the folder in the web server?

  4. #4

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    The problem is the code to load the .txt to my java doesn't work and I have a message who tell me in the Internet status bar that the .class cannot be instancied or something like that...

  5. #5

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    I juste open the file like usuall and I put the *.txt in the same folder of the .*class...and it doesn't work. Do i have to open it with a socket?...Like by FTP?

  6. #6
    Addicted Member Virtual24's Avatar
    Join Date
    May 2001
    Posts
    228
    I'm not quite sure if this would work ( because you accessing from an applet on the web ), but you could try using the FileInputStream class ( along with others, like BufferedReader ) to read text from a file anywhere. Once you deveop a class, you just pass it the full file name ( path\filname ). I developed a class that does that and it works for console programs.
    To protect time is to protect everything...

  7. #7

    Thread Starter
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Cool but the problem is applet have more security than console application. I might try your suggestion but I do not think that the way to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width