compilation error: cannot access Byte

This is where you talk about the RCX software itself, installation issues, and programming talk.

Moderator: roger

New User
Posts: 5
Joined: Thu Oct 25, 2007 2:59 pm
Location: Salzhemmendorf, Germany

compilation error: cannot access Byte

Postby fschuett » Fri Nov 11, 2016 9:16 am

I'm working with lejos for rcx quite some years and never had problems.

Recently I discovered I cannot compile the simple TextLCD program

Code: Select all

fschuett@pc319-03:~/java/rcxproject1/src> cat

import josx.platform.rcx.*;

 * @author fschuett
public class newRCXJava {
    public static void main(String[] args) {

On compilation the following error messages pops up: error: cannot access Byte
class file for java.lang.Byte not found
1 error

I don't understand the error because Byte is not the required type, String is.

Has anybody experienced this problem?

Thanks for any help.


New User
Posts: 1
Joined: Fri Jun 09, 2017 2:09 pm

Re: compilation error: cannot access Byte

Postby mrlem » Fri Jun 09, 2017 2:13 pm

Same issue here, in the end I gave up using TextLCD, the rest seems to work (including plain old LCD). I suspect that is related to the JRE version.

User avatar
leJOS Team Member
Posts: 5789
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: compilation error: cannot access Byte

Postby gloomyandy » Sat Jun 10, 2017 5:59 pm

I suspect this is caused by using a more recent Java compiler then the one used when leJOS for the RCX was being developed. More recent compilers will perform various forms of type conversion (boxing and unboxing) which requires the class library to have the correct classes to support these operations.Normally this will in effect be invisible as the standard class library will match the compiler, but leJOS for the RCX and NXT uses a replacement class library that has much simpler versions of many of the classes. I seem to remember added extra classes and methods to support these boxing operations on the NXT.
leJOS news

Return to “RCX Software”

Who is online

Users browsing this forum: No registered users and 1 guest