# [SOLVED] Error: "package com.hdcookbook.grin.util does not exist"...

micah.quinn
Offline
Joined: 2012-12-12

Hello,

This may be a symptom of my inexperience with GRIN and BDJ in general, but after successfully building GRIN from the HDCookBook SVN repository, I wanted to use the GRIN library in my own app. I'm using Chihiro's NetBeans BDJ project plugin to create a new BDJ project. I've managed to build a simple BDJ app that changes the background color based on the colored remote button that is pressed.

Now when I add "import com.hdcookbook.grin.utility.Debug ;" to my source file, I get the build error "package com.hdcookbook.grin.util does not exist". In NetBeans, on "Project Properties"->"Java Sources Classpath" I've added the fully qualified path to ".../hdcookbook~svn/trunk/bin/GrinLibrary/JavaME/", however the build still fails. In fact, NetBeans will resolve the declaration inside the IDE, so I'm pretty sure pathing is correct. My only change to the build.xml was to set bdj.classes to the fully qualified path of my "classes.zip" file.

At any rate, I'm pretty stumped on this one. My best guess at this point is that NetBeans is using ANT to build this project and ANT is not using the classpath in the project settings.

Does anyone have a suggestion on how to get GRIN imported into a NetBeans BDJ created project? And thanks Chihiro for a very nice addition to NetBeans.

micah.quinn
Offline
Joined: 2012-12-12

Just wanted to post that I've solved this issue. For some reason, the classpath settings in the project properties are not being picked up by the ANT build system. I modified the build.xml file to include the GRIN library path and it now builds correctly.

Specifically:

1.  Edit build.xml and find the &lt;target name="compile" ...&gt; section.2.  Inside the "&lt;javac ...&gt;" section, add a the following:  &lt;classpath&gt;    &lt;pathelement path="\${grin.classes}"&gt;  &lt;/classpath&gt;3.  Edit build.properties and add the following:  grin.classes=c\:\\path\\to\\your\\grin\\libraries\\