Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-25-2004
jschina jschina is offline
Registered User
 
Name: Sha Jiang
Organization: CE
Project: None
 
Join Date: Oct 2004
Location: Beijing, China
Posts: 14
Send a message via MSN to jschina
-->
err: java Server

My operation system is Windows XP. I installed Ice-1.5.1 in directory E:\Ice-1.5.1, and have set environment variables as follows,
ICEJ_HOME E:\Ice-1.5.1
Path %ICEJ_HOME%\bin
CLASSPATH .;%ICEJ_HOME%\lib\Ice.jar

I copyed your demo "hello", which is in E:\Ice-1.5.1\deomj\Ice\, and pasted it in G:\.

The follows is result.

G:\hello>mkdir G

G:\hello>slice2java --output-dir G Hello.ice

G:\hello>javac -classpath %ICEJ_HOME%/lib/Ice.jar -source 1.4 Server.java HelloI.java G/*.java

G:\hello>javac -classpath %ICEJ_HOME%/lib/Ice.jar -source 1.4 Client.java HelloI.java G/*.java

G:\hello>java Server
Exception in thread "main" java.lang.NoClassDefFoundError: Hello
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :604)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:260)
at java.net.URLClassLoader.access+100(URLClassLoader. java:56)
at java.net.URLClassLoader+1.run(URLClassLoader.java: 195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 89)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:279)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 35)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:302)
at Server.run(Server.java:16)
at Server.main(Server.java:34)

G:\hello>

The compilation successed, but the execution failed, why?
__________________
a cup of Java, cheers!

Last edited by jschina : 10-25-2004 at 04:25 AM.
Reply With Quote
  #2 (permalink)  
Old 10-25-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
You must include the G subdirectory in your CLASSPATH, so that the compiled Java files are found.
Reply With Quote
  #3 (permalink)  
Old 10-26-2004
jschina jschina is offline
Registered User
 
Name: Sha Jiang
Organization: CE
Project: None
 
Join Date: Oct 2004
Location: Beijing, China
Posts: 14
Send a message via MSN to jschina
-->
Hi, March
"Hello World" was showed. Thanks for your help.
But I used a unwise approach. I copied all files in G directory, and pasted them in hello directory. Then I run command "java Server" in a cmd and run command java Client in another cmd, and followed Client's help, the "Hello World" was showed in Server.

But I don't know how to use classpath in java command.
__________________
a cup of Java, cheers!
Reply With Quote
  #4 (permalink)  
Old 10-26-2004
jschina jschina is offline
Registered User
 
Name: Sha Jiang
Organization: CE
Project: None
 
Join Date: Oct 2004
Location: Beijing, China
Posts: 14
Send a message via MSN to jschina
-->
Additionally, last Friday, I introduced ICE to my mentor and schoolmates in a meeting. Of course, they only know CORBA, but ICE. But when I introduced differences between CORBA and ICE, especially, the superiorities of ICE, some of them became interested in the new distributed middleware. But there is few document on ICE we can obtained.
Because of some of common features between CORBA and ICE, I only read papers on CORBA and the manual of ICE. But I have little knowledge about CORBA, can you give me some suggestions for learning ICE?
Thanks very much!
__________________
a cup of Java, cheers!

Last edited by jschina : 10-26-2004 at 03:39 AM.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pb between C++ client and Java Server arnaud Help Center 17 04-10-2006 05:10 AM
java client with VC6.0 server: unknown c++ exception? claykunz Help Center 15 07-29-2005 11:18 PM
Push Server with Java yazid_next Help Center 2 11-30-2004 06:52 AM
error running Java server on XP dipakyadav Bug Reports 9 02-21-2003 11:42 AM


All times are GMT -4. The time now is 06:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.