NXJ 0.4.0 Beta Bug Watch

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

Moderators: imaqine, 99jonathan, roger

User avatar
bbagnall
Site Admin
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

NXJ 0.4.0 Beta Bug Watch

Postby bbagnall » Mon Sep 03, 2007 9:26 pm

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.

User avatar
parmaia
New User
Posts: 5
Joined: Tue Sep 04, 2007 10:50 pm
Contact:

nxjc.bat file

Postby parmaia » Tue Sep 04, 2007 10:57 pm

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.
Naguara, cosa tan wena!

User avatar
bbagnall
Site Admin
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby bbagnall » Sun Sep 09, 2007 5:57 pm

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.

jvance
New User
Posts: 22
Joined: Sun Aug 12, 2007 2:22 am

HI

Postby jvance » Sun Sep 09, 2007 11:42 pm

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

crispn
New User
Posts: 5
Joined: Sun Jul 22, 2007 4:44 pm
Location: Solihull, United Kingdom

Postby crispn » Wed Sep 12, 2007 12:28 pm

Hi V,

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

"Maximum array length is 511"

-Nick

Jannick
New User
Posts: 10
Joined: Sun Sep 16, 2007 3:56 pm

Postby Jannick » Sun Sep 16, 2007 9:39 pm

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.

Jannick
New User
Posts: 10
Joined: Sun Sep 16, 2007 3:56 pm

Postby Jannick » Thu Sep 20, 2007 1:24 am

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

socrates
New User
Posts: 12
Joined: Sun Oct 28, 2007 7:36 pm

Postby socrates » Sun Oct 28, 2007 10:43 pm

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

Bseddon
New User
Posts: 9
Joined: Tue Dec 18, 2007 8:47 pm
Location: UK, Surry, Staines

Trouble getting started

Postby Bseddon » Wed Dec 19, 2007 9:27 pm

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

mdsmitty
Novice
Posts: 78
Joined: Tue Feb 27, 2007 3:07 am
Contact:

Postby mdsmitty » Fri Dec 21, 2007 12:34 am

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.

Bseddon
New User
Posts: 9
Joined: Tue Dec 18, 2007 8:47 pm
Location: UK, Surry, Staines

Help Compile still not working

Postby Bseddon » Fri Dec 21, 2007 5:20 pm

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

roger
Moderator
Posts: 381
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA

Postby roger » Sun Dec 23, 2007 4:31 am

Hi Bseddon:
Do you have the environmental variable NXJ_HOME set?
Roger

Bseddon
New User
Posts: 9
Joined: Tue Dec 18, 2007 8:47 pm
Location: UK, Surry, Staines

It Works!

Postby Bseddon » Sat Jan 05, 2008 4:05 pm

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

oyvindh
New User
Posts: 1
Joined: Sat Jan 05, 2008 4:23 pm

Postby oyvindh » Sat Jan 05, 2008 4:26 pm

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.

molenno
New User
Posts: 1
Joined: Tue Mar 29, 2011 8:53 am

Re: NXJ 0.4.0 Beta Bug Watch

Postby molenno » Tue Mar 29, 2011 1:36 pm

where can I download this version


Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 2 guests