Results 1 to 11 of 11
  1. #1
    ElvisMachuca is offline Member
    Join Date
    Jan 2013
    Posts
    32
    Rep Power
    0

    Default My jar files are signed but I still cannot write files to the localhost computer...

    Hi,

    I signed my jar files. Now I am able to see my applet run when connecting with sockets, but there is one thing about the program that still does not perform how I want to.

    For instance, connecting with sockets works. However, when I open a fileoutputstream to the localhost computer, the file is not writen.

    In other words, there is a routine in the application that saves a history of the connections the server application makes with a client. When I close the program and then I look into the folder where the history file of connection should've been saved, there is nothing.

    The applet works when I run it from eclipse, thats obvious. But, as I said, that the jars are signed. When I run the applet from an html, I still get a secondary warning message asking: do you want to block potentially malicious code, also stating, that the applet has signed and an unsigned code, I click no so the applet it not blocked, but then the file that I expect is not write to the computer.

    Can anyone tell me whats up.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,889
    Rep Power
    8

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    Does the rest of the applet run? What error messages are printed out to the java console?

    What exactly does the message prompt ask you?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    ElvisMachuca is offline Member
    Join Date
    Jan 2013
    Posts
    32
    Rep Power
    0

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    Well, there are no console errors...

    The prompt is from the internet browser, asking to block unsafe code.

    If it had been an exception, I had already mentioned it, but it is not an exception error. It is warning prompt from the browser.

  4. #4
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,861
    Rep Power
    19

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    What (full) version of Java have you got running on the browser.
    If it's less than 1.7.0_13 then update it.
    One's prior to that have found themselves blocked by browsers due to the serious security flaw in them when it comes to applets. It could be that that you are encountering.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,889
    Rep Power
    8

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    Quote Originally Posted by ElvisMachuca View Post
    Well, there are no console errors...

    The prompt is from the internet browser, asking to block unsafe code.

    If it had been an exception, I had already mentioned it, but it is not an exception error. It is warning prompt from the browser.
    Actually, I'm asking you to take a look at the Java console, which might not pop up by default. The fact that you aren't seeing any Exceptions doesn't mean that they aren't there, it just means that you might not be looking in the same place.

    But I'll bow out of this one, since you don't seem very amenable to suggestions anyway.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    ElvisMachuca is offline Member
    Join Date
    Jan 2013
    Posts
    32
    Rep Power
    0

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    I am telling you, there is no error, it is a browser prompt.

  7. #7
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,861
    Rep Power
    19

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    See my earlier post.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #8
    ElvisMachuca is offline Member
    Join Date
    Jan 2013
    Posts
    32
    Rep Power
    0

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    I know what you said about the java console...there is no error when the prompt comes up. The program is free of java errors. I know how to turn on the console when the applet starts from an html.

  9. #9
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,861
    Rep Power
    19

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    No.
    My earlier post, not Kevin's.
    Post #4.
    Ensure you have the latest JRE update and plugin, for 1.7 that is u13.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  10. #10
    sabre150 is offline Member
    Join Date
    Jul 2012
    Location
    Earth
    Posts
    75
    Rep Power
    0

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    I know that my signed Applets are able to write to my local computers for Windows XP, Windows 7 and Linux regardless of the JDK and regardless of the Browser (though I have not checked Explorer on Windows 7 recently) so it pretty much has to be something you are doing wrong but since we have no view of your code we can only speculate. Three possibilities occur to me; first, are you looking in the right place for the files you are trying to write, second are are you trying to write to a directory that the OS forbids and finally are you smothering exceptions so they can never be seen? I would love to see the code fragment, including the exception handling, that you are using to write the files so that I could make a more informed speculation.

  11. #11
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,861
    Rep Power
    19

    Default Re: My jar files are signed but I still cannot write files to the localhost computer.

    I'm probably a bit twitchy.
    Just had a conversation somewhere random about Apple locking out the plugin.
    I suspect I just have that stuck in my head when it comes to applets at the moment.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. how to display computer folders and files in GUI
    By nashbender in forum AWT / Swing
    Replies: 12
    Last Post: 04-22-2011, 04:28 AM
  2. Unable to create and write files
    By DrKilljoy in forum New To Java
    Replies: 4
    Last Post: 09-05-2010, 12:55 AM
  3. Read/Write Files
    By FlyNn in forum New To Java
    Replies: 3
    Last Post: 02-06-2010, 08:45 PM
  4. How Read and Write XMl files using Java
    By tjs in forum SWT / JFace
    Replies: 0
    Last Post: 02-23-2009, 12:19 PM
  5. Can I write code in 2 different files ?
    By fartek in forum New To Java
    Replies: 2
    Last Post: 02-14-2009, 03:48 PM

Posting Permissions

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