To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.javaOpen lugnet.robotics.rcx.java in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / Java / 347
346  |  348
Subject: 
java.lang.NoClassDefFoundError: josx/rcxcomm/RCXPort
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Fri, 12 Nov 2004 11:31:40 GMT
Viewed: 
7345 times
  
Hello,

I am new to Lejos and have been trying PC <-> RCX communications.

Unfortunately the books I am using are out of date, I see now that RCXComm is
being used to Comms.  I followed the Tutorial on the Lejos site, the code
compiles fine, but am recieving the Run time error below:

java.lang.NoClassDefFoundError: josx/rcxcomm/RCXPort
        at RotationNavigation.DisplayMapData.main(DisplayMapData.java:14)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.openide.execution.ThreadExecutor.executeClass(ThreadExecutor.java:132)
        at
org.openide.execution.ThreadExecutor$TERunnable.run(ThreadExecutor.java:209)
        at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:119)


My classpath looks like:

.;D:\Lejos work;C:\Program Files\s1studio_jdk\j2sdk1.4.1;C:\Program
Files\s1studio_jdk\j2sdk1.4.1\lib\comm.jar;c:\lejos\lib\pcrcxcomm.jar;c:\lejos\lib;C:\lejos\lib\classes.jar

My path looks like:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program
Files\s1studio_jdk\j2sdk1.4.1\bin;C:\lejos\bin;C:\lejos\bin\irtower.dll

I am running the code on the PC so I am compiling and executing with the
standard Java 1.4, I take it this is correct.

The code is :

import josx.rcxcomm.*;
import java.io.*;

public class DisplayMapData
{

  public static void main(String [] args)
  {

    try
    {
      RCXPort port = new RCXPort();

      InputStream is = port.getInputStream();
      System.out.print(is.read());

    }
    catch (IOException ioe)
    {

    }
  }
}

Any suggestions would be much appreciated.

Many thanks

Laurence Rochfort



Message has 1 Reply:
  Re: java.lang.NoClassDefFoundError: josx/rcxcomm/RCXPort
 
Hi Laurence, (...) it might be the spaces in your classpath that cause the problem. Jürgen (20 years ago, 12-Nov-04, to lugnet.robotics.rcx.java)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR