Page 2 of 2 First 12
  1. #16
    Ollie's Avatar
    Registered
    27/07/02
    Posts
    644
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/0
    Als ik mij niet vergis mag een applet zich enkel connecteren met de server vanwaar hij gedownload is (waarop hij dus gehost is).
    no votes  

  2. #17

    Registered
    03/08/02
    Location
    Gavere
    Posts
    37,519
    iTrader
    23 (100%)
    Mentioned
    57 Post(s)
    Reputation
    0/1281
    Hmm, idd:

    Network Restrictions

    The network restrictions in Java may seem a little overboard, but they are there for good reason. The general philosophy of network security is that applets can only make network connections back to the Web server they were loaded from. An applet may not listen for incoming socket connections, nor can it listen for datagrams (connectionless network data) from anywhere but its home server. It also can only send datagrams back to its home server.

    These security restrictions are intended to protect organizations that have Internet firewalls set up. In case you are unfamiliar with the intricacies of Internet security, many companies have large internal IP networks (the main networking protocol of the Internet). These networks are connected to the rest of the world through machines called "firewalls." A firewall's job in life is to protect the internal IP network from prying eyes in the outside world while allowing people on the inside to access data out on the Internet. These firewalls usually render the internal network invisible to the rest of the world. Given the clever ways people have found to attack systems, it is best to not give out any information about host names or addresses on the internal network.

    The problem with Java is that applets run inside the firewall on your local machine. This means that without any network restrictions, your entire network is exposed to any malicious applets. You might be thinking that it would be nice if you could just tell your browser the names of hosts that you trust. It would not be difficult for the security system in Java to handle that, but it would keep your poor network administrator on a steady supply of indigestion medication, wondering when someone will trust an untrustworthy host. If you're an administrator at a site using HotJava, go ahead and get yourself a good spoonful of Maalox-you can completely turn off the networking restrictions in HotJava! Keep in mind, also, that Internet Explorer also lets you turn off all security restrictions. Netscape does not support such an option, however.

    If your applet is loaded from the local filesystem, you can get around these security restrictions. You may have to set the appletviewer.security.mode system property to unrestricted to completely get around these restrictions. Because one of the other restrictions on applets is that they cannot change the system properties, you'll have to come up with unique ways of getting around this.
    Achja. Applets, who needs them
    no votes  

  3. #18
    D3C0Y's Avatar
    Registered
    07/08/03
    Location
    Gent
    Posts
    5,859
    iTrader
    1 (100%)
    Mentioned
    0 Post(s)
    Reputation
    1/14
    mja tis voor school
    het werkt nu ondertussen half en half

    ik heb het inlezen van die xml werkende gekregen, maar nu krijg ik lwjglexceptions (lightweight)
    Mr Veko
    no votes  

  4. #19

    Registered
    18/05/04
    Location
    antwerpen
    Posts
    174
    iTrader
    1 (100%)
    Mentioned
    0 Post(s)
    Reputation
    0/1
    probeer eens een java.policy file met rechten voor bestanden of streams er in in de folder bij te zetten zo heb ik ooit eens een applet gemaakt dat een bestand met parameters moest inlezen werkend gekregen.

    Hier probeerd iemand iets gelijkaardigs.

    How to get a File object from a InputStream or BufferedReader? (Java in General (intermediate) forum at JavaRanch)

    meer info

    JavaRanch FAQ : How Can An Applet Read Files On The Local File System
    Last edited by daigon; 09-12-2008 at 16:06.
    no votes  

  5. #20
    D3C0Y's Avatar
    Registered
    07/08/03
    Location
    Gent
    Posts
    5,859
    iTrader
    1 (100%)
    Mentioned
    0 Post(s)
    Reputation
    1/14
    ziet er belovend uit, ksnap wel niet goed waar ik die policy file moet steken en hoe die aangeroepen wordt.
    Stel mijn applicatie noemt "Test" dan maak ik een policy file zoals deze ?

    Code:
    grant codeBase "File:/P:/School/Integration 3/Project 2 - Facebook Game/Assembla/Source/Test.jar" {
      permission java.io.FilePermission "<<ALL FILES>>", "read,write,execute";
    };
    hoe bepaal ik hiermee dat die files (bv. http://users.telenet.be/decoy/Facebo...BulletType.xml) kan aanroepen op mijn webspace, want ik vermeld toch nergens de url van mijn space ?
    Mr Veko
    no votes  

  6. #21
    D3C0Y's Avatar
    Registered
    07/08/03
    Location
    Gent
    Posts
    5,859
    iTrader
    1 (100%)
    Mentioned
    0 Post(s)
    Reputation
    1/14
    Alright DE ultieme oplossing was dus mijn .jar signen , nu werkt alles naar behoren.
    merci allemaal voor de pogingen tot hulp die er uiteindelijk toch tot geleid hebben dat het nu werkt
    Mr Veko
    no votes  

Posting Permissions

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

Log in

Log in