rmi problem passing object from server class to application
I have a jukebox application written in java, I want to be able to remotely select a song from a client to the server.
The problem I have is you have to run the server as a seperate process/application via "java Server" this ofcourse means that the server application has the object passed to it via remote method, which would be the song file to play. However, the Jukebox application is running at the same time and this is where all audio processing and playing is carried out.
So, the question is, how do I get the file object from the Server application to the Jukebox application.
I tried instantiating the Server as an internal class within the Jukebox application code, e.g. JukeboxServer js1 = new JukeboxServer();
public class JukeboxServer
RemoteMusicImp remote1 = new RemoteMusicImp();
System.out.println("JukeboxServer exception could not instantiate");
System.out.println("jukebox server started and listening on port 1099");
This fails to start the Server, it works only if I run it as a seperate application, but then i can't get the song file object passed to the Jukebox application.
Am I missing something obvious? Please help if you can.
Thanks in advance Steve
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL