Java Networking and policy file

Two part question,
First I writing a applet that is working with sockets, I've compared this and a delphi program and it seems that the delphi program is writing to and recieving from the socket at a faster rate (four second delay for the applet) then the applet. There is no extra code besides opening the client socket and writing and receiving data.
Second question is is there a way to allow an applet to write to a socket below 1024 without having a java.policy file. If I do need the policy file is there a way to change it from the applet, or to set an work around permission. I'm writing an applet to work with a protocal that generally lives on a socket below 1024.
Thanks in advance

There is a way to let an applet access the lower sockets, but you need to sign it. And in order to sign it you need a key from verisign or Thawte. In fact, there are 2 different keys you need, one for Netscape and one for MS. But the netscape one might be the only one that you need.
Other then signing it, you have to edit your browser preferences to let applets have full access to your system. sorry :(

Similar Messages

  • Books on java networking and swings

    hi,
    im looking for free (e-books) on java networking and swings any help in this regard will be appreciated
    regards

    try "CORE JAVA" from SunSoft press. Written by the makers of the language
    themselves, it is worth every penny.
    cheers.

  • Java Kernel and the "Unlimited Strength Java Crypto Extension Policy Files"

    Is Java Kernel able to download and install on-demand the "Unlimited Strength Java(TM) Cryptography Extension Policy Files"?
    Currently, I have to instruct the users of my applications to download those policy files from Sun's website and follow the installation instruction. I haven't received any positive feedback from my users when I told them to do this task. I understand them. Manual installation of this files really suck especially for lay men.
    So, with Java Kernel, what's the plan? Can I hope for something better?

    I believe, for US export-control reasons, the Unlimited Strength JCE policy files are never automatically downloadable by the JVM - they have to be explicitly downloaded and configured. However, you could download it yourself, configure the JVM with the policy files, create your own ZIP/JAR file and internally distribute it to your users through your intranet. But, if you do this, you are responsible for complying with the applicable export laws of your country, and perhaps, Sun licensing terms for redistributing the JVM.

  • Java Web Start and Policy File

    Hi,
    I've a problem for Java Web Start (JWS) in working with Policy File.
    I like to apply a policy file for a JWS application to fine tune the secuirty setting instead of granting permission in JWS.
    For an applet environment, I can apply policy file like this:
    appletviewer -J"-Djava.security.policy=all.policy" writeFile.html
    However, in JWS environment, I try to apply in JNLP file as below but fail:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+"
    codebase="http://130.18.52.226:8080/testing/"
    >
    <information>
    <title>JWS JFrame App</title>
    <vendor>Java Developer Connection</vendor>
    <homepage href="http://java.sun.com/jdc" />
    <description>Demonstration of JNLP</description>
    <icon href="hsbc.gif" width="32" height="32" />
    </information>
    <resources>
    <j2se version="1.3*" />
    <property name="java.security.manager" value="x" />
    <property name="java.security.policy" value="testing.policy"/>
    <jar href="testing.jar"/>
    </resources>
    <application-desc main-class="JWSJFrameApp" />
    </jnlp>
    The error message like this:
    Java Web Start Console, started Tue Sep 03 09:59:36 CST 2002
    Java 2 Runtime Environment: Version 1.3.0 by Sun Microsystems Inc.
    java.security.AccessControlException: access denied (java.util.PropertyPermission java.security.manager write)
    java.security.AccessControlException: access denied (java.util.PropertyPermission java.security.policy write)
    Could anyone please help on this!
    Many thanks!
    Regards,
    Simon Ho

    There are two problems with what you are trying to do.
    First, setting a property PROP=VALUE in the jnlp file does not mean that java will be launched -DPROP=VALUE, instead, javawebstart will call System.setProperty(PROP,VALUE) before your apps main() is called. The difference is, the property will not be set at the time the VM is initialized.
    Second, the javaws security policy will not allow you to set arbitrary properties in an unsigned application. Only properties begining with "jnlp." or "javaws." (and possibly a few other specific props known to the native javaws code) can be set in an application unless <all-permissions> is specified and the app is signed.

  • How to create a custom java client Security Policy File?

    I have a stand-alone java client which invokes a .NET WSE 3.0 enabled web service. The web service SOAP header requires username token to be passed from my java client.
    Could some one kindly provide a sample of a client-side Security Policy File?
    Your help is very much appreciated.
    Mike

    This is still a workaround...
    But if you put checks on all your forms to see if the user has accepted the terms (assumes there is an attribute tracking this) then you can redirect the user to the terms/conditions forms. Still not spoof-proof, but it would be bookmark proof. (and a pain if you have too many forms)

  • Security Manager and Policy Files

    Hi all,
    I am writing a simple java rmi application, but understand it wont run without a Security Manager installed and a policy file.
    I think I have installed the security manger using the following in the main() method of my client application:
    System.setSecurityManager(new RMISecurityManager());However I am unsure how to use a policy file with this. I have looked on the internet, but it does not seem to be very well documented
    Please could you advise me how to create a policy file that will work for my application and where to place it in my application so that my application can use it.
    Any help would be greatfuly appreciated
    Thanx
    Aaron

    An RMI application doesn't need a security manager unless you are using the codebase feature.

  • Help needed about HTTPS and policy files !!

    Hi everyone,
    my Web Start application crashes with a SSLPeerUnverifiedException when I
    try to connect to the server with HTTPClient :
    // proxy settings
    HTTPConnection.setProxyServer(ipProxy, portProxy);
    // connection
    HTTPConnection con = new HTTPConnection("https", serverName, -1);
    // Post (then there is a SSLPeerUnverifiedException....)
    HTTPResponse rsp = con.Post("/myurl.jsp, toSend, ct_hdr);
    My application runs in a secure environnement configured by the javaws.policy :
    grant codeBase "file:${jnlpx.home}/javaws.jar" {
    permission java.security.AllPermission;
    and the ${user.home}.java.policy (shared by another application, an applet I think) :
    keystore "file:${user.home}/xxxxxxxxxxxxxxxxxxxxx.p7c";
    grant codebase "https://xxxxxxxxxxxxxxx/-" signedby "xxxxxxxxxx" {
    permission java.lang.RuntimePermission "usePolicy";
    permission java.lang.RuntimePermission "accessDeclaredMembers";
    permission java.lang.RuntimePermission "setIO";
    permission java.lang.RuntimePermission "modifyThread";
    permission java.lang.RuntimePermission "stopThread";
    permission java.lang.RuntimePermission "accessClassInPackage.sun.security.provider";
    permission java.lang.RuntimePermission "loadLibrary.*";
    permission java.security.SecurityPermission "insertProvider.SUN";
    permission java.security.SecurityPermission "insertProvider.JCRYPTO";
    permission java.security.SecurityPermission "insertProvider.JCRYPTO_PKCS11";
    permission java.security.SecurityPermission "putProviderProperty.JCRYPTO";
    permission java.security.SecurityPermission "putProviderProperty.JCRYPTO_PKCS11";
    permission java.security.SecurityPermission "removeProviderProperty.JCRYPTO";
    permission java.security.SecurityPermission "removeProvider.JCRYPTO";
    permission java.security.SecurityPermission "removeProvider.JCRYPTO_PKCS11";
    permission java.security.SecurityPermission "removeProvider.SUN";
    permission java.util.PropertyPermission "*", "read,write";
    permission java.io.FilePermission "<<ALL FILES>>", "write,read,delete";
    permission java.net.NetPermission "specifyStreamHandler";
    permission java.net.SocketPermission "localhost:1024-", "listen";
    permission java.net.SocketPermission "*", "connect,accept,listen,resolve";
    permission java.awt.AWTPermission "accessClipboard";
    permission java.lang.RuntimePermission "queuePrintJob";
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    grant codebase "file:/myApplication/-" {
    permission java.security.AllPermission;
    In this file (.java.policy) when I replace "codebase "https://xxxxxxxxxxxxxxx/-""
    by "codebase "http://xxxxxxxxxxxxxxx/-"" everything works fine !! It's very very
    very very strange...
    my application is launched by Web Start 1.2 and use JRE 1.4.1
    Any ideas ? Please, I become crazy...

    In this file (.java.policy) when I replace "codebase
    "https://xxxxxxxxxxxxxxx/-""
    by "codebase "http://xxxxxxxxxxxxxxx/-"" everything
    works fine !! I am not so sure that a code source cares for whether the resource is downloaded with s-http or normal http. Is the distinction important for the policy file?
    You could go digging in the RFC that describes what a URL is (because that is what the code source is).
    Also you could switch on a nice flag in you server environment that output information if security things go wrong: -Djava.security.debug=failure
    In the output you should see from where your code is loaded. If it says http and not https, then that is what should appear in your policy file.

  • Timestamp in Java log and trace files.

    Hi SAP'ies
    Running PI 7.11 on AIX 6.3 we face an issue with the content of log and trace files from Java.
    Eg.
    The file DefaultTrace_00.0.trc is timestamped 18-05-10 11:16:15. (The same time as the time of the OS/AIX)
    Looking inside the file the last statement is timestamped 2010 05 18 09:16:15.
    How can we ensure that the content of these Java files are timestamped with OS time?
    Looking into ABAP files like dev_w0 the timestamp of the file and the content are equal.
    Best regards,
    Teddy Løv Andersen

    Hello All
    Best way to convert the default trace time is , visit the site
    http://www.csgnetwork.com/epochtime.html
    here enter , for example if you have the following in default trace
    #1.#00265510DE7300120000000F000022030004C77AD7309DF5#1345230317066#com.sap.portal.fpn.rdl
    1345230317066   is time stamp , enter this in the above site to get the time
    Fri Aug 17 2012 21:05:17 GMT+0200
    Regards

  • "The file [name of file] may have been changed by another user since you last saved it." Issue affects both network and local files.

    When a certain user saves a file in Excel 2010, she gets a message: "The file <name of file> may have been changed by another user since you last saved it."  She can choose to save as another file or overwrite with her changes. 
    This just started happening a week or so ago.  She was concerned that someone else was accessing her files, but we did several tests that opened, made a change and saved in a matter of seconds, and she still gets the message.  It happens on
    most files, but not all – both network and local.
    We already tried the QFE_Saskatchewan registry fix.  I also checked the file server for Services for Macintosh.

    You may be confused by the error in Excel saying “another user”. Actually Excel cannot tell who (the real human) is editing the file. Based on my research the No.1 possibility of the error is KB2626998.
    2626998  Connection to a network document is lost in the 2007 Office system or in Office 2010 after the computer resumes from standby
    http://support.microsoft.com/kb/2626998
    For Excel 2010, follow these steps:
    a.  Click Start , click Run , type regedit in the Open box, and then click OK .
    b.  Locate and then select the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Options
    c.  On the Edit menu, point to New , and then click Dword Value .
    d.  Type NetworkAvailableTimeInSeconds , and then press Enter.
    e.  Right-click NetworkAvailableTimeInSeconds , and then click Modify .
    f.  In the Value data box, click Decimal , type a number value, and then click OK .
    Note This registry subkey sets the time, in seconds, that Excel waits for the network to resume. For example, if you type 15 for the number value, Excel waits 15 seconds for the network to resume. You might have to do some tests in your own environment to
    determine an appropriate value. You may have to try multiple numbers.
    g.  Locate and then select the following registry subkey.
    HKEY_CURRENT_USER\Software\Microsoft\office\14.0\common\Internet
    h.  Repeat step 2C through step 2F again. Reuse the same value that you used previously.
    i.  Exit Registry Editor.
    Feel free to post back. Thanks.
    Cheers,
    Tony Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please contact
    [email protected]

  • Java script and css files are not loaded

    I am using 9iAS 1.0.2.2.2a on Windows Server Family 2000. My web application is using bc4j and developed in JDeveloper 3.2. I am also using Apache and web cache and caching js and css files.
    Problem is some times it does not load js files but load css files.
    Some times loads css files but does not load js files.
    Some times does not load js and css files.
    & some times loads both types of files.
    How to control this problem.
    Tahir Pervaiz.

    I'm fairly certain this issue represents a bug in IE 11. The same problem(s) do not occur in IE 9 or IE 10. The same problems occur on unrelated websites accessed from separate machines. Doing a force-refresh (Ctrl+F5) always fixes the issue.
    I took your advice about opening the console to look for error messages during page load. When loading normally (i.e. not doing a force-refresh), the console shows the following:
    HTML1300: Navigation occurred.
    File: TimeEntry
    DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
    File: Dashboard
    SCRIPT70: Permission denied
    File: modernizr-2.5.3.js, Line: 468, Column: 9
    SCRIPT70: Permission denied
    File: jquery-ui-1.10.0.js, Line: 252, Column: 1
    SCRIPT70: Permission denied
    File: knockout-2.2.1.js, Line: 48, Column: 5
    SCRIPT5007: Unable to get property 'extend' of undefined or null reference
    File: knockout.validation.js, Line: 30, Column: 5
    When loading the page via a force-refresh, only the 'Navigation occurred.' message is displayed. It does not make sense that IE would apply a more restrictive security policy to scripts loaded from cache vs. scripts loaded directly from their original location,
    yet that appears to be what is happening.
    Post questions about html, css and scripting for website development to the IE Web Development forum.....WITH A LINK TO YOUR WEBSITE OR A MASHUP THAT SHOWS THE ISSUE...
    looks like you have a sandboxed iframe on your page.
    the first step in troubleshooting IE issues is to test in noAddons mode.
    Rob^_^

  • Java classes and MySql Files

    Hello,
    There is a way to distribute the Mysql db files with yout java application without need to install Mysql in the computer, like in access, you just copy the .mdb file with your java class and create a conection to it.
    Thank You

    No. If you want to do that you should just use Access. mySQL files will not work without the mySQL server.

  • Java proxy and EAR file in NDS

    Hi,
    I'm new in java and also proxy development and I need some help
    I have followed the pdf how to create java proxies in 3.0.
    But i have some doubts:
    Must I delete aii*.jar libraries from the EAR create?
    I have no other .jar archive in that .ear... why? I suppose that is not correct and why my EJB module .jar is not included?
    Thanks
    carme,

    Hi, Shabarish
    I have followed the same steps point out in this two blogs.
    I recreated all my EJB project and application.
    The EAR file created only contains:
    guidgenerator.jar
    aii_utilxi_misc.jar
    aii_proxy_xirt.jar
    aii_msg_runtime.jar
    sda-dd.xml
    application-j2ee-engine.xml
    application.xml
    Sap_manifest.mf
    Manifest.mf
    and also a file WITHOUT NAME and size 0.
    That is not correct... right?

  • Java Class and JSP file

    Hi everyone,
    I build a class in java, and now i wanna use this class in my jsp file.
    I put that class into web-inf/classes in Apache Tomcat, but don't work.... Anyone can help me?
    Greetings!

    Put the class with its package such as com.sun.ejb.MyClass
    -- > /WEB-INF/classes/com/sun/ejb/MyClass.class
    then use it
    http://www.skillipedia.com

  • Java Internationalization and .properties files

    Hi everyone,
    Isn't it problematic that the way to internationalize your java apps ( .properties files ) doesn't support UTF-8 and you have to user gibberish looking unicode escapes. Some will say that you don't need to write and the converters or editors will handle the ascii conversion but the requirement for such a intermediate process doesn't seem right. Sometime you have to edit some string on the server and it should be human readable using text editors that support UTF-8. I thought loadFromXML and storeToXML methods that came with java 1.5 seemed to solve the problem but than noticed that PropertyResourceBundle doesn't support xml properties files. Is backwards compatibility the reason that properties files aren't utf-8 by default?
    Thanks
    Bilgehan

    Try PRBeditor (http://prbeditor.dev.java.net).

  • Java executables and jar files

    I'm new to Java and recently completed a Java training class that involved the creation of a cutomer service application in Microsoft Visual J++. The application ran fine in debug mode. However, no mention was made of how this would be run on a machine without an development tool as J++. How is this done? Can Java programs be compiled into .exe's like C, C++,, abd Visual basic programs? If not, how are the classes called to make use of their code?
    Also, what is a .jar file and how is it used?

    You went to a class and they didn't teach you the answers to these questions? I say go and get your money back: you we're ripped off.
    1) Yes you can turn your java code into an .exe but that would be pointless as java was designed to be "platform independant" and this violates that principle.
    2) jar files are zip files for all intents and purposes. They contain your 'compiled' java byte code.
    3) Microsoft does not support J++ nor does it ship java with its browser anymore so I suggest you download java from this website and use the real thing.

Maybe you are looking for

  • Help, please!

    I have invested many hours on an html-help file. Tried to open it (an .xpj file) this morning and I get the message Open project was cancelled or the application was unable to load database for "C:\Program Files\RoboHelp Office\Vision  Viewer Help\Vi

  • HT1452 I want to reset the permissions on a western digital external hard drive to work between mac and windows... How can I do this easily?

    I have a MacBook Pro and have recently bought a Western Digital external hard drive.  I used it on my windows laptop first and unfortunately now on the Mac it is read only.  How can I set it so that I can use it successfully between the both the Mac

  • Turning the iPod Mini OFF

    Using the click wheel, I can pause easily but turning the iPod off is really difficult. I don't know whether I'm holding the Pause button down too long, not long enough or if there's an easier way. It seems when I turn my iPod off the battery lasts l

  • Failed to load PDF document

    I downloaded the trial version of Acrobat X. I have a couple of documents to load on a website. If the .pdf documents are created in word or from a file there is no problem. They up load and download just fine. If I scan them in Acrobat X, they are c

  • After ios update volume controls not working

    After updating to iOS 7.0.4, when I unlock my phone, the volume buttons no longer work, Ringer window just shows as grey.  Volume works fine to adjust ringer when receiving a call, also works fine within apps.  However, key tones (clicks) no longer f