Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 05-05-2004, 11:48 PM   #1 (permalink)
Lyliss
Registered User
 
Lyliss's Avatar
 
Join Date: May 2004
Posts: 4
Lyliss is on a distinguished road
Unhappy How to put files in applets??

Hello!!!!

I´m working in a proyect with an applet. I´m almost crazy because i don´t know how to tell the applet to read some proprties files.

If you know any way to do this... I will be very greatfull!! THANK YOU
Lyliss is offline   Reply With Quote
Old 05-06-2004, 05:06 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,148
Belisarius is on a distinguished road
I really wish professors wouldn't assign projects with applets, they're such a pain in the ass.

Here, take a look at this FAQ on applet security. The short answer is, because you're using an applet, you're not suppose to be able to access files.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 05-06-2004, 05:42 AM   #3 (permalink)
Lyliss
Registered User
 
Lyliss's Avatar
 
Join Date: May 2004
Posts: 4
Lyliss is on a distinguished road
Hello Belisarius!!

Thank you for your answer, but I knew that the applets can´t access to the computer. I´m internationalizing the applet (maybe you don´t know what is this, I hope yes), so I need to acces to some properties files, which have all the external strings (what I want to read). And I don´t know how to tell the applet where they are.
I´m going to read the information you have given to me, maybe I find the solution.

THANK YOU VERY MUCH. and sorry if my english is not very good, i´m spanish
Lyliss is offline   Reply With Quote
Old 05-06-2004, 08:20 AM   #4 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,148
Belisarius is on a distinguished road
Well, your English is a lot better than my Spanish (which is non-existant).

I don't know exactly what you mean by internationalizing, but I assume you mean translate into different languages, and you have a property file somewhere that says what to translate it to. You need to set the security permissions for the applet, which is explained in the FAQ. Let me know if I misunderstand.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 05-06-2004, 11:09 PM   #5 (permalink)
Lyliss
Registered User
 
Lyliss's Avatar
 
Join Date: May 2004
Posts: 4
Lyliss is on a distinguished road
I´ve been studing english during more then 11 years, I´m happy with the result, jaja.
That´s it. Intenationalization=cahnge into languages. Ok, I´ll study that theme (FAQ).
Maybe you´re thinking that i´m a bit "stupid" in this area (if you understand me), maybe yes. I´m finishing my studies, in this company, and I arrived here without knowledge of Java and they put me working with an applet directly (this is being very hard for me).
Thank you very much for your attention, really. Usually people in forums don´t answer me. So I´m very pleasant.
GREATINGS FROM SPAIN
<Lydia>
Lyliss is offline   Reply With Quote
Old 05-07-2004, 03:15 AM   #6 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Quote:
Usually people in forums don´t answer me.
Here are a buch of good lads. True dat .
__________________
Valmont is offline   Reply With Quote
Old 05-07-2004, 04:40 AM   #7 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,148
Belisarius is on a distinguished road
Let me know if you don't understand anything in the FAQ, and I'll try and help you out some more. I just figured since the FAQ seemed to cover everything about Applets and security, and came straight from the horses mouth (Sun), it'd be better for you to look for a direct answer there than me just act as a middle man.

And trust me, you're not stupid for not understanding applets. No one in my computer science department, at a school that teaches almost exclusivly in Java, understands applets either.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 05-07-2004, 05:03 AM   #8 (permalink)
Lyliss
Registered User
 
Lyliss's Avatar
 
Join Date: May 2004
Posts: 4
Lyliss is on a distinguished road
Hello again!

I more or less understand what FAQ says, but I don´t really find the solution to my problem. I´ve just looked in the java sun´s page, but either. But don´t worry, I´ll continue looking for information.

Thank you for your attention.
Lyliss is offline   Reply With Quote
Old 05-07-2004, 06:07 AM   #9 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,148
Belisarius is on a distinguished road
Hmmm, how about hosting the properties file on the web? You can then access the properties file by connecting to the server and read the file.

For instance, when a client opens up the applet from "www.foo.com", you can host a translation file at "www.foo.com/translate/spanish.txt". The applet connects to the "spanish.txt" file, reads the information, and translates the applet.
__________________
GitS
Belisarius is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cached files being detected as trojans? sde Java 3 06-16-2004 04:26 PM
Installing and using CMUgraphics library. Valmont Standard C, C++ 12 03-29-2003 08:39 AM
All Class Files mixingsoup PHP 12 12-04-2002 06:49 AM


All times are GMT -8. The time now is 10:54 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting