GithubHelp home page GithubHelp logo

java-rmi-example's People

Contributors

rm5248 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

java-rmi-example's Issues

Getting error "Error: Could not find or load main class"

When I try to run the code I get the following error:
Error: Could not find or load main class com.rm5248.rmiserver.RMIServerMain

I built the project with: mvn clean install
Then I ran the code using:

java -Djava.rmi.server.useCodebaseOnly=false -Djava.rmi.server.codebase=file:/Java-RMI-Example/ com.rm5248.rmiserver.RMIServerMain

ANd I get the above error.
Please help

Can't run the server

I compiled everything from the root using mvn package, I ran compile first, but then thought may be I need to package for the modules to work. Then i tried running it. I have rmiregistry running like this

justin@justin-Precision-3520 14:16:42 ~/Repos/Java-RMI-Example/RMIServer 
$ rmiregistry -J-Djava.rmi.server.useCodebaseOnly=false

But trying to run the Server fails like this saying can't find the Interface classes. I am using latest maven btw.

justin@justin-Precision-3520 14:13:58 ~/Repos/Java-RMI-Example/RMIServer/target/classes 
$ pwd
/home/justin/Repos/Java-RMI-Example/RMIServer/target/classes

justin@justin-Precision-3520 14:15:15 ~/Repos/Java-RMI-Example/RMIServer/target/classes 
$ java -Djava.rmi.server.useCodebaseOnly=false -Djava.rmi.server.codebase=file:/home/justin/Repos/Java-RMI-Example/RMIServer/target/classes/com/rm5248/rmiserver/  com.rm5248.rmiserver.RMIServerMain
Exception in thread "main" java.lang.NoClassDefFoundError: com/rm5248/rmiinterfaces/PrintingInterface
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.rm5248.rmiserver.RMIServerMain.main(RMIServerMain.java:28)
Caused by: java.lang.ClassNotFoundException: com.rm5248.rmiinterfaces.PrintingInterface
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 13 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.