Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Distributed Java and the fly likes RMIC Error: Could not find Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMIC Error: Could not find Class" Watch "RMIC Error: Could not find Class" New topic
Author

RMIC Error: Could not find Class

Lindsay Fester
Greenhorn

Joined: Nov 05, 2010
Posts: 9
This is for an assignment that uses JSP and RMI. A bat file is used to create the stub using RMIC. This should NOT be a coding issue as the code work's fine on my partner's laptop. Our code from the previous assignment used to work on my computer, but somewhere between the first and second assignment, it stopped working. What's wrong with my computer?

I have the following directories:

\WEB-INF\classes\beans\*.classes
\WEB-INF\src\beans\*.java
\WEB-INF\lib
\WEB-INF\setup.bat
\WEB-INF\startup.bat

I have a .bat file that sets up the remote server, again shouldn't be the issue.

Startup.bat


Setup.bat


I would appreciate any tips on making the .bat files better (I know there are Java commands to help organize the directory structure), but more importantly, what is wrong with my computer? O_o

Lindsay Fester
Greenhorn

Joined: Nov 05, 2010
Posts: 9
Update:


Okay so after numerous trial and error, online research, and bugging a very kind classmate for help, and finally consulting my instructor, I've solved the issue.

RMIC works on my computer, exact same code, if I specify the exact classpath when I call RMIC.

New call to RMIC line in the batch file.


But, when I try to start the server using "startup.bat", it crashes. Turns out it wasn't the beans.Server class it couldn't find, but classes that my Server was using because I didn't have the jar file in my class path and my partner did. I'm not getting a ClassNotFoundException. I've moved the server to a seperate folder, as it's not meant to be run from within the tomcat directory.

The problem is with RMIC and the classpath. I have all the proper Environment Variable set on my machine for it, but RMIC can't seem to find anything! It won't compile the most basic server because it can't find ANY class paths.
Lindsay Fester
Greenhorn

Joined: Nov 05, 2010
Posts: 9
Update:

I've fixed the problem. There was nothing wrong with my RMIC after all.

The problem was with my JDBC driver. I had to move the driver jar file into my "jre6\lib\ext" directory.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMIC Error: Could not find Class