Results 1 to 3 of 3

Thread: Testing the "printer" example in java?

  1. #1
    zyoracle is offline Registered User
    Join Date
    May 2005
    Posts
    1

    Testing the "printer" example in java?

    env: windows xp, jdk5.0, eclipse3.1, apache-ant-1.6.4
    Ice-2.1.1(vc71)
    steps:
    1, do what the "readme.txt" said, and run printer example in the demoj folder.
    ------ok
    2 , create two projects-"client" and "server" in eclipse,copy the source code
    correctlly,add the "Ice.jar" into projects, run in eclipse...
    ------ok, the server printed "Hello World!"
    3, create the jar file using eclipse-export tool, and i get "server.jar" whose MANIFEST.MF points the right mainclass and the jar does not contain the
    Ice.lib
    ------ok
    4, in the cmd window, enter the right dir, "java -jar .\server.jar",run...
    -----wrong, "Exception in thread "main" java.lang.NoClassDefFoundError: Ice/Object"

    question: it seems that i can not find Ice/Object class, but all envs has been configed correctlly followed by "readme.txt",why please?

  2. #2
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    The Ice.Object class is included in the Ice.jar file. I'm not very familiar with eclipse and its export tool but if this class isn't found this means that the Ice.jar is most likely not in your CLASSPATH.

    Benoit.

  3. #3
    Narendranath is offline Registered User
    Join Date
    Jun 2005
    Posts
    8

    This might help

    Hi ,
    I think that you must have found the solution by now but I think that you have yet to add the ice jar file.
    This can be done by right clicking the Project on the Navigator window of Eclipse3.1 and going to properties. select java Build path and then select the Libraries Tab.
    There the jar file can be added either through "Add Jars" or "Add External Jars" and add the Ice.jar

    Cheers,
    Narendranath

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-31-2011, 07:32 PM
  2. Replies: 1
    Last Post: 01-28-2009, 06:15 AM
  3. Unknow exception in "Printer" sample code
    By wangh705 in forum Help Center
    Replies: 6
    Last Post: 10-26-2006, 12:01 PM
  4. Replies: 4
    Last Post: 10-26-2006, 11:23 AM
  5. starting "ice" process (node/admin etc) via Java
    By BobDeAnna in forum Help Center
    Replies: 6
    Last Post: 01-04-2005, 09:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •