|
-
Oct 5th, 2002, 10:06 PM
#1
Thread Starter
Ya ya Baby!!!Me is Back
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 ?
-
Oct 6th, 2002, 11:59 AM
#2
Thread Starter
Ya ya Baby!!!Me is Back
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?
-
Oct 7th, 2002, 07:05 AM
#3
Hyperactive Member
What permissions do you have setup for the folder in the web server?
-
Oct 7th, 2002, 08:51 PM
#4
Thread Starter
Ya ya Baby!!!Me is Back
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...
-
Oct 8th, 2002, 05:12 PM
#5
Thread Starter
Ya ya Baby!!!Me is Back
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?
-
Oct 16th, 2002, 08:11 PM
#6
Addicted Member
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...
-
Oct 18th, 2002, 05:43 PM
#7
Thread Starter
Ya ya Baby!!!Me is Back
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|