brew install leiningen
I got
Compiling joy.gui.DynaFrame
Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath:
Exception in thread "main" java.io.FileNotFoundException: Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath: , compiling:(/private/var/folders/zm/swyymlvn4l7__d1rln_n391r0000gn/T/form-init7580966196782799989.clj:1:124)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath:
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$compile$fn__5071.invoke(core.clj:5652)
at clojure.core$compile.invoke(core.clj:5651)
at user$eval20$fn__29.invoke(form-init7580966196782799989.clj:1)
at user$eval20.invoke(form-init7580966196782799989.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 11 more
Compilation failed: Subprocess failed
I tried to reinstall but the issue does not solved.
When I type,
lein version
I got this:
Leiningen 2.9.1 on Java 12 Java HotSpot(TM) 64-Bit Server VM
I installed Java correctly but not sure where to start to fix this problem.
I looked around and it seems you are trying to run an old example from The Joy of Clojure, right?
The example needed a minor touch-up for me to be able to run it.
I created a new Leiningen project first with lein new app dynademo.
Inside the new project folder, I created the directories for the namespace: mkdir -p src/joy/gui
Created the file src/joy/gui/DynaFrame.clj
The Leiningen project that we just created with lein new ... uses Clojure 1.10, which doesn't seem to like one thing:
Replace the line with :prefix df- with :prefix "df-" (eg. wrap the value df- in quotes)
Save the file, and now you can launch the window from the REPL, like this:
$ lein repl
nREPL server started on port 44037 on host 127.0.0.1 - nrepl://127.0.0.1:44037
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
dynaframe.core=> (compile 'joy.gui.DynaFrame)
joy.gui.DynaFrame
dynaframe.core=> (def hello-frame (joy.gui.DynaFrame. "Hello"))
#'dynaframe.core/hello-frame
dynaframe.core=> (.show hello-frame)
nil
It looks like this:
(you will need to move/resize the window a bit, but you get the idea). Note: I'm using Java 8 (JDK 1.8.0_191) but it should work the same in JDK 12.
Related
I'm trying to notarize a DMG via "xcrun altool" in Terminal but it fails with the output below.
In fact it even running iTMSTransporter directly it crashes:
/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/bin/iTMSTransporter
Error: Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
Caused by: java.lang.ClassNotFoundException: 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
What I have done to troublehshoot:
Updated to Xcode 12.3
Updated and installed latest commandline tools for Xcode
Tried two different SDK/JDK/JRE versions of Java, currently using java 15.0.1 2020-10-20
Java(TM) SE Runtime Environment (build 15.0.1+9-18)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)
Tried declaring JAVA_HOME
Looked for iTMSTransporter cache file or folder (in case sensitive and lowercase) in /, ~/ and /Library and ~/Library ~/.itmstransporter in order ot delete it, there is none.
I'm on macOS Big Sur 11.1
I have never had two name versions of Xcode, so I have not had a different name for the app. I tried renaming it for troubleshooting and reverting back to original Xcode name but this also did not help.
Tried reinstalling iTMSTransporter
Error output below:
2020-12-24 10:39:03.442 altool[10776:511525] Sending request to iTunesTransporter…
2020-12-24 10:39:03.442 altool[10776:511525] Command: /usr/local/itms/bin/iTMSTransporter
2020-12-24 10:39:03.442 altool[10776:511525] Arguments: -m upload -u 'XXX' -vp json -DTxHeaders=XXX= -sessionid #env:XXX -sharedsecret #env:XXX -itc_provider '-f' -f '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/XXX-72174C6DE294/com.XXX.XXX.itmsp' -indicator true -v eXtreme -Dtransporter.client='altool' -Dtransporter.client.version='4.029 (1194)'
2020-12-24 10:39:04.331 altool[10776:511518] Error: Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
2020-12-24 10:39:04.331 altool[10776:511518] Caused by: java.lang.ClassNotFoundException: 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
2020-12-24 10:39:04.336 altool[10776:511525] Error:
Error: Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
Caused by: java.lang.ClassNotFoundException: 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.
2020-12-24 10:39:04.336 altool[10776:511525] Out:
2020-12-24 10:39:04.337 altool[10776:511525] Errors: (
"Error Domain=ITunesTransporterErrorDomain Code=-18000 \"Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.\" UserInfo={NSLocalizedRecoverySuggestion=Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:., NSLocalizedDescription=Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:., NSLocalizedFailureReason=Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.}"
)
2020-12-24 10:39:04.378 altool[10776:511518] *** Error: Unable to notarize app.
2020-12-24 10:39:04.378 altool[10776:511518] *** Error: code -18000 (Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:.)
Issue was fixed after commenting out the line starting with:
JVM_LIB_PATH
in:
/usr/local/itms/bin/iTMSTransporter
It seems the way this line was setting the java related paths to iTMSTransporter was causing it to look in wrong places.
After commenting out this line iTMSTransporter reconfigured itself during launch and notarization submission was successful.
I'm trying to use JPL with SWI-Prolog on macOS High Sierra and I'm having troubles. In fact, at first the libjpl.dylib was not found so I added the path to it to java.library.path via
java -Djava.library.path=/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin15.6.0/
Now the library is found but I get another error:
java.lang.UnsatisfiedLinkError: /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin15.6.0/libjpl.dylib: dlopen(/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin15.6.0/libjpl.dylib, 1): Library not loaded: #executable_path/../swipl/lib/x86_64-darwin15.6.0/libswipl.dylib
Referenced from: /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin15.6.0/libjpl.dylib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
...
From what I understand, this is caused by this version of SWI-Prolog being relocatable (and thus having path relative to the executable).
The output of otool -L of the libjpl.dylib give me this output:
/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin15.6.0/libjpl.dylib:
#rpath/libjsig.dylib (compatibility version 1.0.0, current version 1.0.0)
#rpath/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0)
#executable_path/../swipl/lib/x86_64-darwin15.6.0/libswipl.dylib (compatibility version 0.0.0, current version 7.6.4)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
So one way of fixing it would be to install a not relocatable version via macport or homebrew.
The thing is, neither the MacPorts nor the Homebrew version of SWI-Prolog contains the libjpl.dylib library :/
Am I missing something here? What can I do to make this work?
On macOS 10.13.6 (High Sierra), I regularly compile the SWI-Prolog 7.x sources using:
$ make distclean && ./build && swipl -g "jpl_config_dylib" -t halt
The jpl_config_dylib/0 finds and fixes the Java paths. You should also be able to call it from the top-level after you start the SWI-Prolog.app application.
To whomever this might be useful, as it is not a 100% match to the content of the question asked, but is a 100% match to the title of the question asked.
When installing (at least a recent version of) SWI-Prolog using Homebrew, attempting to use_module(library(jpl)) will result in an error:
ERROR: /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/library/jpl.pl:5428: Initialization goal raised exception:
ERROR: source_sink `jar('jpl.jar')' does not exist
ERROR: In:
ERROR: [48] throw(error(existence_error(source_sink,...),_109418))
ERROR: [44] jpl:add_jpl_to_classpath at /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/library/jpl.pl:3979
ERROR: [43] jpl:setup_jvm at /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/library/jpl.pl:4168
ERROR: [42] '$run_init_goal'(jpl:setup_jvm) at /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/boot/init.pl:796
ERROR: [41] catch(system:'$run_init_goal'(...),error(existence_error(source_sink,...),context(_109584,_109586)),system:'$initialization_error'(...,...,...)) at /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/boot/init.pl:546
ERROR: [40] catch_with_backtrace(system:'$run_init_goal'(...),error(existence_error(source_sink,...),context(_109660,_109662)),system:'$initialization_error'(...,...,...)) at /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/boot/init.pl:614
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
ERROR: Exported procedure jpl:jpl_c_lib_version/1 is not defined
true.
Also, executing the goal jpl_config_dylib results in an error:
?- jpl_config_dylib.
ERROR: Unknown procedure: jpl_config_dylib/0 (DWIM could not correct goal)
The MacPorts version of SWI-Prolog does not have this problem. The solution is to copy the relevant files from under the MacPorts version to under the Homebrew version of SWI Prolog:
$ cp /Applications/SWI-Prolog.app/Contents/swipl/lib/jpl.jar /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/lib/
$ cp /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/libjpl.dylib /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/lib/x86_64-darwin/
$ cp /Applications/SWI-Prolog.app/Contents/swipl/library/jpl.pl /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/library/
$ cp /Applications/SWI-Prolog.app/Contents/swipl/library/jpl_config.pl /usr/local/Cellar/swi-prolog/8.4.0/libexec/lib/swipl/library/
After which loading library(jpl) will work fine:
?- use_module(library(jpl)).
true.
?- jpl_new('java.lang.Object', [], JRef).
JRef = <jref>(0x7fbefb086318).
I've been trying to load the qdap package, searching on here and troubleshooting, - realised Java couldn't be found. Uninstalled and downloaded Java - assuming I've done the correct 64 bit version as I am assuming I have RStudio 64 by checking
> R.Version()
$platform
[1] "x86_64-w64-mingw32"
I'm using "R version 3.4.3 (2017-11-30)" and Windows 10
Followed the advice here and set the following
Sys.setenv(JAVA_HOME='C:\\Program Files(x86)\\Java\\jre1.8.0_181')
ran this
find.java <- function() {
for (root in c("HLM", "HCU")) for (key in c("Software\\JavaSoft\\Java
Runtime Environment",
"Software\\JavaSoft\\Java
Development Kit")) {
hive <- try(utils::readRegistry(key, root, 2),
silent = TRUE)
if (!inherits(hive, "try-error"))
return(hive)
}
hive
}
Got this
find.java()
> find.java()
$`Security Baseline`
$`Security Baseline`$`1.4.2`
[1] "1.4.2_99"
$`Security Baseline`$`1.5.0`
[1] "1.5.0_99"
$`Security Baseline`$`1.6.0`
[1] "1.6.0_201"
$`Security Baseline`$`1.7.0`
[1] "1.7.0_191"
$`Security Baseline`$`1.8.0`
[1] "1.8.0_181"
Assumed this means Java can now be found. Also did this to check.
> system("java -version")
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) Client VM (build 25.181-b13, mixed mode, sharing)
So try to load rJava again.
> library(rJava)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object
'C:/Users/grant/OneDrive/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: The specified module could not be found.
In addition: Warning message:package ‘rJava’ was built under R version 3.4.4
I've tried to follow the advice given in here and as shown above I know I have Java and a Java Run Time Environment and I have followed some of the suggested fixes already. I haven't done the PATH fixes as I'm not sure what exactly my PATH is, if it's wrong and how to change the PATH or put server in path. I've got as far as this but not sure how to decipher it.
> Sys.getenv("Path")[1] "C:\\Rtools\\bin;C:\\Program Files\\R\\R-3.4.3\\bin\\x64;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\grant\\AppData\\Local\\Microsoft\\WindowsApps;"
I've also tried downloading and using Dependency Walker and didn't understand it.
Have I made an error in my assumptions? Is there an issue with my Path and if so how does Path get changed? Or is there anything else I can try?
I have Ubuntu 16.04. I downloaded and installed bazel according to the official bazel guide and after that I downloaded the first tutorial for building a Java project but it didn't work. I got this exception:
unexpected pipe read status: (error: 2): No such file or directory
Server presumed dead. Now printing '/home/jingw222/.cache/bazel/_bazel_jingw222/ada033fd33c06190d78b77ab4907f1d0/server/jvm.out':
java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.ensureError(J9VMInternals.java:141)
at java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:130)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.skyFunctions(SkyframeExecutor.java:348)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.init(SkyframeExecutor.java:586)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutor.init(SequencedSkyframeExecutor.java:252)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutor.create(SequencedSkyframeExecutor.java:211)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutor.create(SequencedSkyframeExecutor.java:162)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutorFactory.create(SequencedSkyframeExecutorFactory.java:48)
at com.google.devtools.build.lib.runtime.WorkspaceBuilder.build(WorkspaceBuilder.java:81)
at com.google.devtools.build.lib.runtime.BlazeRuntime.initWorkspace(BlazeRuntime.java:204)
at com.google.devtools.build.lib.runtime.BlazeRuntime.newRuntime(BlazeRuntime.java:1023)
at com.google.devtools.build.lib.runtime.BlazeRuntime.createBlazeRPCServer(BlazeRuntime.java:850)
at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:789)
at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:570)
at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:56)
Caused by: java.lang.ClassCastException: com.ibm.lang.management.UnixExtendedOperatingSystem incompatible with com.sun.management.OperatingSystemMXBean
at com.google.devtools.build.lib.util.ResourceUsage.<clinit>(ResourceUsage.java:45)
... 13 more
What can caouse the problem?
I found this issue, and finally I realized, that I need to download the jdk manually. So I used this command:
sudo apt-get install openjdk-8-jdk
After that I built it again, and it worked well.
I am coding a RMI program with 3 JAR:
RMIServer, contains server-side classes
RMIClient contains client-side classes
RMIResource contains server & client shared content (interfaces, custom exceptions)
To make separate JAR files, I created 3 projects in NetBeans, then I declared the shared Jar in the "Libraries/Build" section of the other 2 projects.
Everything just build-up fine, no error.
But when I try to launch the server through the command-line, which was simple before I had the idea to put the shared files in a distinct JAR, this is suddenly pain in the a**...
Here are a few examples of commands I tried:
Keeping the ClassPath pointing to the server resources, but using dual CodeBase
java -cp ~/NetBeansProjects/RMIServer/dist/RMIServer.jar -Djava.rmi.server.codebase="file:/home/myuser/netbeansprojects/rmiserver/dist/rmiserver.jar file:/home/myuser/netbeansprojects/rmiserver/dist/lib/rmiresource.jar" rmiserver.Shop
Result:
Network exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: rmiresource.BookingManager
...
Using dual ClassPath but keeping the CodeBase pointing to the server resources
java -cp "~/NetBeansProjects/RMIServer/dist/RMIServer.jar;~/NetBeansProjects/RMIServer/dist/lib/RMIResource.jar" -Djava.rmi.server.codebase=file:/home/myuser/netbeansprojects/rmiserver/dist/rmiserver.jar rmiserver.Shop
Result:
Exception in thread "main" java.lang.NoClassDefFoundError: rmiserver/Shop
Caused by: java.lang.ClassNotFoundException: rmiserver.Shop
...
Using dual ClassPath & dual CodeBase
java -cp "~/NetBeansProjects/RMIServer/dist/RMIServer.jar;~/NetBeansProjects/RMIServer/dist/lib/RMIResource.jar" -Djava.rmi.server.codebase="file:/home/myuser/netbeansprojects/rmiserver/dist/rmiserver.jar file:/home/myuser/netbeansprojects/rmiserver/dist/lib/rmiresource.jar" rmiserver.Shop
Result:
Exception in thread "main" java.lang.NoClassDefFoundError: rmiserver/Shop
Caused by: java.lang.ClassNotFoundException: rmiserver.Shop
...
EDIT:
I am working on the local computer, simulating distant connections. Thus I use 'file' protocol and not 'http'.
Am I missing something? Thanks for any help you would provide
I tested out again my 1st solution since it was the most promising:
java -cp ~/NetBeansProjects/RMIServer/dist/RMIServer.jar -Djava.rmi.server.codebase="file:/home/myuser/netbeansprojects/rmiserver/dist/rmiserver.jar file:/home/myuser/netbeansprojects/rmiserver/dist/lib/rmiresource.jar" rmiserver.Shop
It still failed.
Then I tested out on Windows:
Setup the rmiregistry with an empty classpath (and cd to the java/bin directory)
set CLASSPATH=""; export CLASSPATH
start rmiregistry
Launch the server with an equal command as before (moduo the Win env changes)
java -cp c:/NetBeansProjects/RMIServer/dist/RMIServer.jar -Djava.rmi.server.codebase="file:/c:/netbeansprojects/rmiserver/dist/rmiserver.jar file:/c:/netbeansprojects/rmiserver/dist/lib/rmiresource.jar" rmiserver.Shop
And... It worked!
I cleaned-up/rebuilt the solution both on Linux & Windows and it is still not working on Linux and working on Windows... I use the same Netbeans version on both!
Can someone explain that to me? I am using the JDK 6 on Linux & JDK 7 on Windows: would that have an impact?
A file: codebase can't work out of the local machine. You need to use HTTP. You could possibly use a file: URL pointing to a shared directory, such that the URL makes sense at a client, but this won't work outside the LAN.
Unless you are using the codebase feature, the RMI Registry needs access to the shared classes via its classpath: rmiregistry -J-Dclasspath=... It's simpler to use LocateRegistry.createRegistry(), then it's in the same JVM as your remote objects and uses the same classpath of course.