leJOS.org Forum Index leJOS.org
Java for LEGO NXT and RCX
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NXJ 0.4.0 Beta Bug Watch

 
Post new topic   Reply to topic    leJOS.org Forum Index -> NXJ Software
View previous topic :: View next topic  
Author Message
bbagnall
Site Admin


Joined: 04 Aug 2006
Posts: 363

PostPosted: Mon Sep 03, 2007 9:26 pm    Post subject: NXJ 0.4.0 Beta Bug Watch Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
parmaia
New User


Joined: 04 Sep 2007
Posts: 2

PostPosted: Tue Sep 04, 2007 10:57 pm    Post subject: nxjc.bat file Reply with quote

Hi, I be testing 0.4 beta release and notice (at least for me) an error in the file nxjc.bat:

Quote:
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:

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


and all work for me.
_________________
Naguara, cosa tan wena!
Back to top
View user's profile Send private message Visit poster's website
bbagnall
Site Admin


Joined: 04 Aug 2006
Posts: 363

PostPosted: Sun Sep 09, 2007 5:57 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
jvance
New User


Joined: 12 Aug 2007
Posts: 22

PostPosted: Sun Sep 09, 2007 11:42 pm    Post subject: HI Reply with quote

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
Back to top
View user's profile Send private message
crispn
New User


Joined: 22 Jul 2007
Posts: 5
Location: Solihull, United Kingdom

PostPosted: Wed Sep 12, 2007 12:28 pm    Post subject: Reply with quote

Hi V,

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

"Maximum array length is 511"

-Nick
Back to top
View user's profile Send private message
Jannick
New User


Joined: 16 Sep 2007
Posts: 10

PostPosted: Sun Sep 16, 2007 9:39 pm    Post subject: Reply with quote

I've had a problem accessing protected fields from a subtype. My seup was something like this

Code:

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.
Back to top
View user's profile Send private message
Jannick
New User


Joined: 16 Sep 2007
Posts: 10

PostPosted: Thu Sep 20, 2007 1:24 am    Post subject: Reply with quote

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:

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 Very Happy
Back to top
View user's profile Send private message
socrates
New User


Joined: 28 Oct 2007
Posts: 12

PostPosted: Sun Oct 28, 2007 10:43 pm    Post subject: Reply with quote

Hi,

I am having a similar problem, see http://lejos.sourceforge.net/forum/viewtopic.php?t=540.

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

Cheers,
Rupert
Back to top
View user's profile Send private message
Bseddon
New User


Joined: 18 Dec 2007
Posts: 9
Location: UK, Surry, Staines

PostPosted: Wed Dec 19, 2007 9:27 pm    Post subject: Trouble getting started Reply with quote

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 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
Back to top
View user's profile Send private message
mdsmitty
Novice


Joined: 27 Feb 2007
Posts: 67

PostPosted: Fri Dec 21, 2007 12:34 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Bseddon
New User


Joined: 18 Dec 2007
Posts: 9
Location: UK, Surry, Staines

PostPosted: Fri Dec 21, 2007 5:20 pm    Post subject: Help Compile still not working Reply with quote

Hi

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



Quote:
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
Back to top
View user's profile Send private message
roger
Moderator


Joined: 01 Jun 2007
Posts: 204
Location: Berkeley, CA

PostPosted: Sun Dec 23, 2007 4:31 am    Post subject: Reply with quote

Hi Bseddon:
Do you have the environmental variable NXJ_HOME set?
Roger
Back to top
View user's profile Send private message
Bseddon
New User


Joined: 18 Dec 2007
Posts: 9
Location: UK, Surry, Staines

PostPosted: Sat Jan 05, 2008 4:05 pm    Post subject: It Works! Reply with quote

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/masterClassLego/javaInstallNXT/index.html

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

Thanks for all your help
Back to top
View user's profile Send private message
oyvindh
New User


Joined: 05 Jan 2008
Posts: 1

PostPosted: Sat Jan 05, 2008 4:26 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    leJOS.org Forum Index -> NXJ Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group