Results 1 to 6 of 6
  1. #1
    _rapt0r_ is offline Member
    Join Date
    Nov 2011
    Posts
    24
    Rep Power
    0

    Default problem with start rmiregistry

    I put this code in build.xml file to run the rmiregistry easily. Resulted perfectly on my computer but on another computer can not run the rmiregistry and causes this error all

    build.xml code
    Java Code:
     <target name="startRMI" depends="init">
    <exec executable="rmiregistry" dir="${build.classes.dir}">
    </exec>
    </target> 
    </project>
    errors


    init:
    startRMI:
    C:\Users\Nuno\Documents\NetBeansProjects\JavaAppli cation3\build.xml:75: Execute failed:
    java.io.IOException: Cannot run program "rmiregistry" (in directory "C:\Users\Nuno\Documents\NetBeansProjects\JavaAppl ication3\build\classes"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java :1029)
    at java.lang.Runtime.exec(Runtime.java:615)
    at org.apache.tools.ant.taskdefs.Execute$Java13Comman dLauncher.exec(Execute.java:862)
    at org.apache.tools.ant.taskdefs.Execute.launch(Execu te.java:481)
    at org.apache.tools.ant.taskdefs.Execute.execute(Exec ute.java:495)
    at org.apache.tools.ant.taskdefs.ExecTask.runExecute( ExecTask.java:631)
    at org.apache.tools.ant.taskdefs.ExecTask.runExec(Exe cTask.java:672)
    at org.apache.tools.ant.taskdefs.ExecTask.execute(Exe cTask.java:498)
    at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
    at sun.reflect.GeneratedMethodAccessor46.invoke(Unkno wn Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:39 0)
    at org.apache.tools.ant.Target.performTasks(Target.ja va:411)
    at org.apache.tools.ant.Project.executeSortedTargets( Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project .java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.execut eTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Projec t.java:1251)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl .run(BridgeImpl.java:284)
    at org.apache.tools.ant.module.run.TargetExecutor.run (TargetExecutor.java:539)
    at org.netbeans.core.execution.RunClassThread.run(Run ClassThread.java:153)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:189)
    at java.lang.ProcessImpl.start(ProcessImpl.java:133)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java :1021)
    ... 22 more
    BUILD FAILED (total time: 0 seconds)



    can you help me??

  2. #2
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default Re: problem with start rmiregistry

    The error you are getting is that the folder does not exist (on the other Computer).

    It is looking for this path:
    "C:\Users\Nuno\Documents\NetBeansProjects\JavaAppl ication3\build\classes"

    which it cannot find because I guess the files in that path are situated on the other computer.

  3. #3
    _rapt0r_ is offline Member
    Join Date
    Nov 2011
    Posts
    24
    Rep Power
    0

    Default Re: problem with start rmiregistry

    No, the files are exactly the same and exactly the same path: \

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,305
    Blog Entries
    7
    Rep Power
    20

    Default Re: problem with start rmiregistry

    No matter what, the system can't find an executable file named 'rmiregistry.exe'. What happens when you try to manually start it from that same directory you program runs in?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    _rapt0r_ is offline Member
    Join Date
    Nov 2011
    Posts
    24
    Rep Power
    0

    Default Re: problem with start rmiregistry

    i found the problem, i have to boot rmic manually.

    Tks

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,305
    Blog Entries
    7
    Rep Power
    20

    Default Re: problem with start rmiregistry

    Quote Originally Posted by _rapt0r_ View Post
    i found the problem, i have to boot rmic manually.
    How strange; rmic is the rmi-compiler: it generates stubs (and skeletons in the past). It can't be 'booted' and we don't need it anymore ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. problem with illegal start of expression methdo
    By lathspell in forum New To Java
    Replies: 1
    Last Post: 12-15-2011, 05:29 PM
  2. Need Help please don't know where to start.
    By JR2010 in forum New To Java
    Replies: 7
    Last Post: 04-06-2011, 11:30 PM
  3. Replies: 1
    Last Post: 01-18-2011, 06:27 PM
  4. Replies: 5
    Last Post: 03-20-2009, 10:04 PM
  5. Problem to start with GUI
    By alfie71 in forum New To Java
    Replies: 0
    Last Post: 07-15-2008, 01:52 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
  •