Results 1 to 5 of 5

Thread: Problems running a jar of RMI

  1. #1
    Join Date
    Jan 2009
    Posts
    143

    Problems running a jar of RMI

    Hello everyone,

    Once again I need your help.
    I realized in a java-based java RMI with Netbeans 6.5. If I try to run it from NetBeans I have no problem, but when I create the jar and start running me wrong.
    In particular, I saw that this is an error path, it can not find the file policy.
    To upload the file as the application needs I have used education this.getClass (). GetResourse ("relative path") therefore should not give me these errors.
    Why not work?

    Thanks.

  2. #2
    Join Date
    Feb 2008
    Posts
    129

    Re: Problems running a jar of RMI

    If i am not mistaking then the files inside the jar may get corrupted because of some reason but have u observe that is the policy file is inside the jar?

  3. #3
    Join Date
    Jan 2009
    Posts
    143

    Re: Problems running a jar of RMI

    yes, the file is inside them.
    I try to print the directory where to go find the file and leaves me this:
    c: / Users / Asus / Documents / NetBeansProjects / Ticket_Distributor / dist / Ticket_Distributor.jar! / is / files / server.policy

    that means? why is the. jar?

  4. #4
    Join Date
    Mar 2008
    Posts
    433

    Re: Problems running a jar of RMI

    that means? why is the. jar?
    Precisely because the policy file is inside the jar, right?

    I say maybe, but:

    c: / Users / Asus / Documents / NetBeansProjects / Ticket_Distributor / dist / Ticket_Distributor.jar! / is / files / server.policy
    It's not that is the character '!' immediately after the extension. jar to be the problem?
    What makes us there?

  5. #5
    Join Date
    Feb 2008
    Posts
    121

    Re: Problems running a jar of RMI

    After quick consultation document Sun "Accessing Resources" I think the problem is precisely that '!' in the path of the resource.
    The reason is explained in part highlighted:

    Resources, names, and contexts

    A resource is identified by a string consisting of a sequence of substrings, delimited by slashes (/), followed by a resource name. Each substring must be a valid Java identifier. The resource name is of the form or ShortName shortName.extension. Both ShortName and extension must be Java identifiers.

    The name of a resource is independent of the Java implementation, in particular, the path separator is always a slash (/). However, the Java implementation controls the details of how the contents of the resource are mapped into a file, database, or other object containing the actual resource.

    The interpretation of a resource name is related to a class loader instance. Methods implemented by the classloader class do this interpretation.
    Why in identifier is valid, except for the first character, you have the other characters are letters, numbers, the character '_' or the '$'.

    So it is not the character '!'.

Similar Threads

  1. Problems running DEVIL MAY CRY 4
    By Miquel in forum Video Games
    Replies: 5
    Last Post: 13-10-2010, 12:30 AM
  2. Having Problems running PC games?
    By Sarasija in forum Video Games
    Replies: 6
    Last Post: 08-09-2010, 10:48 PM
  3. Problems while running Bash script with Perl
    By Tajdar in forum Software Development
    Replies: 5
    Last Post: 02-09-2010, 04:22 PM
  4. Problems while running Battlefield 2
    By Paulino in forum Video Games
    Replies: 4
    Last Post: 03-03-2010, 12:28 PM
  5. Problems after running CCleaner
    By dalsandhu in forum Windows Software
    Replies: 3
    Last Post: 09-04-2009, 12:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,043,485.87972 seconds with 17 queries