Page 1 of 2

NXJ 0.4.0 Beta Bug Watch

Posted: Mon Sep 03, 2007 9:26 pm
by bbagnall
leJOS 0.4 is out! The big additions are:
- An amazing set of widgets and graphics classes in the java.microedition.lcdui package.
- NXT to NXT communications

Our main focus will now change from adding functionality to improving things. We have a list of bugs to squash and we also want to make NXJ a whole lot easier to install and use. So the big additions in the future will probably be:
- An Eclipse plugin that installs NXJ in one go and adds user friendly buttons and menu commands.
- A graphical menu interface for NXJ to replace the text only menu

0.4 isn't thoroughly tested, so if you find bugs or errors in our documentation, please let us know in this thread.

nxjc.bat file

Posted: Tue Sep 04, 2007 10:57 pm
by parmaia
Hi, I be testing 0.4 beta release and notice (at least for me) an error in the file nxjc.bat:

javac -source 1.3 -target 1.1 -bootclasspath %NXJ_HOME%\lib\classes.jar;%CLASSPATH% %*


does not have " to enclose CLASSPATH path, that caused for me an error when I try to compile. In the version 0.3 there are " enclosing CLASSPATH route, and that works fine, so i've changed that line to:

javac -source 1.3 -target 1.1 -bootclasspath "%NXJ_HOME%\lib\classes.jar;%CLASSPATH%" %*


and all work for me.

Posted: Sun Sep 09, 2007 5:57 pm
by bbagnall
Can you tell me what operating system you are using? It works fine for Windows XP but I don't think we checked with other versions of Windows.

HI

Posted: Sun Sep 09, 2007 11:42 pm
by jvance
Hi, I'm not sure if this was a problem in the earlier realese or maybe this just a certain restriction of lejos.
But incase it is neither, I found that an int[] cannot hold more than 512 elements.
V

Posted: Wed Sep 12, 2007 12:28 pm
by crispn
Hi V,

Its already noted in the known limitations part of the Readme in the download.

"Maximum array length is 511"

-Nick

Posted: Sun Sep 16, 2007 9:39 pm
by Jannick
I've had a problem accessing protected fields from a subtype. My seup was something like this

Code: Select all

public class OuterClass{

   private abstract class InnerSuperclass{
       protected int value;

       public void useValue(){
           //Used value here
       }
   }

   private class InnerSubclass{
       
       public changeValue(){
           value = 5;
       }
   }

}


The value change from the subclass did not become visible in the superclass. I changed the code to use private properties and setters in the superclass, and that worked. I havnt had time to do further experimentation or a proper testcase yet, but hope to get that done tommorow if it hasnt been looked already at then.

Posted: Thu Sep 20, 2007 1:24 am
by Jannick
Just to confirm. I ran into this issue again today, and I had of course forgotten all about it, so took an hour to track the issue down inside my logging tool. The setup was, with non-related details remove:

Code: Select all

public abstract class BaseChannel{

   protected DataOutputStream nxtOut;

   public BaseChannel(DataOutputStream nxtOut){
      this.nxtOut = nxtOut;
   }
}

public class SomeChannel extends BaseChannel{

   public SomeChannel(DataOutputStream nxtOut){
         super(nxtOut);
   }   

   public writeAndReset(){
        nxtOut.writeByte(....);
   }

}


The above code produced an error number 6 (NoSuchMethodError), when invocation reaced nxtOut.writeByte(....); Ive worked around it by saving a private reference to the instance in all classes that needs it, but its a very annoying bug to run into, since you dont really catch things that go against the java semantics when you look through your code :D

Posted: Sun Oct 28, 2007 10:43 pm
by socrates
Hi,

I am having a similar problem, see viewtopic.php?t=540.

Would you explain how you set a private reference, and to what?

Cheers,
Rupert

Trouble getting started

Posted: Wed Dec 19, 2007 9:27 pm
by Bseddon
Hi

I'm new to Java and the NXT, and I am stuck on compiling my code.
At first javac could not be found but I fixed that problem by downloading a old SDK from http://www.sun.com

I still have two problems, I'm trying to use Eclipse and javac. When I try to compile my code I get an error message from Javac to say the source can't be found. How does Eclipse tell Javac the source file name?

Having failed with Eclipse I tried compiling the Tune example from the Maximum NXT book, and it appeared to compile OK, but insead of the Tune.lej file the book said I should get I got a Tune.class file. Can anyone help me get started please ?

Thank you

Posted: Fri Dec 21, 2007 12:34 am
by mdsmitty
Read the readme file that comes with lejos its very helpful. use nxjc to compile and nxj to link and upload. there is a plugin for eclipse but i haven't used it, i have just been using a term.

Help Compile still not working

Posted: Fri Dec 21, 2007 5:20 pm
by Bseddon
Hi

When I tried to compile Tune.java the way the readme told me to do I got the message.



if "" == "" goto homeless
The system cannot find the batch label specified - homeless


I don't know what is happening so can sombody please help me.


Thank you

Posted: Sun Dec 23, 2007 4:31 am
by roger
Hi Bseddon:
Do you have the environmental variable NXJ_HOME set?
Roger

It Works!

Posted: Sat Jan 05, 2008 4:05 pm
by Bseddon
Hi

Sorry I am replying so late, I was away.

I had set the NXJ_HOME variable

I found how to compile my code without getting all my error messages

I found the anwser on

http://www.bartneck.de/work/education/m ... index.html

I found out you don't have to use lejosjc.bat and nxjc.bat files.

Thanks for all your help

Posted: Sat Jan 05, 2008 4:26 pm
by oyvindh
About the reported bug with nxjc.bat not having quotation marks around classpath setting...

bbagnall wrote:Can you tell me what operating system you are using? It works fine for Windows XP but I don't think we checked with other versions of Windows.


I run XP and have the same problem. You will not see the problem unless you have a classpath with white space inside it.
Try with CLASSPATH=.;C:\Program files\My\Little\Library

Problem solved the way the original bug reporter demonstrated.

Re: NXJ 0.4.0 Beta Bug Watch

Posted: Tue Mar 29, 2011 1:36 pm
by molenno
where can I download this version