Error Parsing File

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

Moderators: 99jonathan, roger, imaqine

Error Parsing File

Postby Zetlin » Tue Dec 20, 2011 9:17 pm

OK so I am working in Netbeans, I have the plugin installed, and I am using 0.9.

The problem is that when I open the samples folder in Netbeans to look at all the projects, the samples folder has the red icon with an exclamation mark saying that it "Contains files with errors", so I open the samples folder and the projects with problems are: CommandLine, SocketTest, SoundSample, and TimeTest. The main class within all these projects also has the red icon with an exclamation mark saying "Error parsing file." I think that the problem is that Netbeans is confusing the methods from the standard jdk and the NXJ API.

For example in the CommandLine class the first line is "import java.io.*;" later on in the class this is used: "f.exec();", f is a File object, now what I presume to be the problem is that in the standard jdk 7 api(what I'm using) the class File doesn't have an exec() method, but the NXJ API does, so Netbeans is having a problem finding which one the code is referring to, but it is using the standard jdk as default thus giving me an error.

Any help on solving this reference problem would be greatly appreciated.

Thanks
Zetlin
New User
 
Posts: 3
Joined: Mon Sep 26, 2011 4:30 am

Re: Error Parsing File

Postby s.frings » Sun Dec 25, 2011 7:09 pm

I can confirm this, have the same issue. It's only a minor thing, since compilation works fine anyway.
s.frings
Active User
 
Posts: 131
Joined: Tue Jul 20, 2010 2:01 pm

Re: Error Parsing File

Postby skoehler » Sun Dec 25, 2011 10:08 pm

Zetlin wrote:I think that the problem is that Netbeans is confusing the methods from the standard jdk and the NXJ API.


You are correct. Without a proper plug-in, which we currently don't provide, Netbeans is not an ideal IDE for developing leJOS programs. It will simply assume that java.io.File refers to the class of the JDK, and not the class of the very same name in the leJOS runtime.

At the moment, Eclipse is the best IDE for developing leJOS programs. I recommend switching to Eclipse (with the leJOS plug-in) or writing a proper leJOS plug-in for Netbeans. However, we currently don't have the manpower/expertise for the latter.
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm


Return to NXJ Software

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests

more stuff