Home » Newcomers » Newcomers » Importing program, trouble with libraries most likely
Importing program, trouble with libraries most likely [message #674836] |
Sat, 28 May 2011 20:36 |
Eclipse User Messages: 1 Registered: May 2011 |
Junior Member |
|
|
Hello all,
I am brand new to blackberry/java eclipse development. I did some searching, but nothing has worked for me so far.
I have an existing project that I imported somewhat successfully. The first problem I had was that, though the .java files show up in the file tree, the location was incorrect. I figured out that Eclipse was looking for them in C:\sites while i had them located elsewhere.
I manually moved them to C:\sites, and that solved that issue. Where would I change the setting, however, in Eclipse if I wanted to?
Next issue... Opening up my main .java file (the one with the main method, and that extends UIApplication) led me to see a bunch of red Xs for many classes. For example, java.lang.String could not be resolved. I found that once i went to project properties, and java build path, that i could add the library for jdk1.6.0_25
Once this was done, half of these errors went away. Was this the correct way to do this?
Unfortunately, now the other half of the classes that are not resolving are still an issue. It seems that I cannot resolve the classes for the blackberry (for example UIApplication is not resolving). I tried to add the JAR (net_rim_api.jar) but it doesn't clear the errors.
It sort of helped, however, as one of the fixes that is now available (if i click on the red error "X") is to "import UIApplication from net.rim.device.api.ui
I could, i think, go through and add a bunch of imports so that these classes will resolve, but i do not want to change the code in that way, and want to figure out how to add all of these classes to the build path instead. I assume I should be able to compile (build) this project as is by simply changing the setup appropriately.
Can someone point me in the right direction? Maybe there is a standard setup that i am missing.
Here is what i have installed.
blackberry JDE 6.0.0
Blackberry simulator 9650
Java 6 update 25
java SE development kit 6 update 25
Thanks
Chris
|
|
|
Re: Importing program, trouble with libraries most likely [message #674851 is a reply to message #674836] |
Sat, 28 May 2011 23:02 |
|
On 2011.05.28 14:36, forums-noreply@eclipse.org wrote:
> [snip]
>
> I have an existing project that I imported somewhat successfully. The
> first problem I had was that, though the .java files show up in the file
> tree, the location was incorrect. I figured out that Eclipse was looking
> for them in C:\sites while i had them located elsewhere.
> I manually moved them to C:\sites, and that solved that issue. Where
> would I change the setting, however, in Eclipse if I wanted to?
Depending on how you include library JARs in your Eclipse project, the
..classpath may not be totally portable. If you open this file and see
full paths in it, these are what makes it non-portable. Right-click on
the project and choose Build Path -> Libraries to correct where your
supporting JARs are coming from. This isn't only the case for BlackBerry
work.
> Next issue... Opening up my main .java file (the one with the main
> method, and that extends UIApplication) led me to see a bunch of red Xs
> for many classes. For example, java.lang.String could not be resolved. I
> found that once i went to project properties, and java build path, that
> i could add the library for jdk1.6.0_25
I'm guessing this is related to the first issue. The supporting JARs
aren't wired up which leads to undefined symbols.
> Once this was done, half of these errors went away. Was this the correct
> way to do this?
>
> Unfortunately, now the other half of the classes that are not resolving
> are still an issue. It seems that I cannot resolve the classes for the
> blackberry (for example UIApplication is not resolving). I tried to add
> the JAR (net_rim_api.jar) but it doesn't clear the errors.
BlackBerry support is separate from Eclipse. You may need to speak with
that community to resolve such issues. Given the precarious way
BlackBerry development is set up for Eclipse, I wouldn't consider
anything particularly "portable". However, I'd be surprised if you
couldn't ultimately work out the problems using Build Path.
Adding JARs to BlackBerry isn't something I ever succeeded in doing. Ask
the community. Eclipse doesn't support BlackBerry; the BlackBerry
community supports developing BlackBerry applications on Eclipse.
I have some links to BlackBerry sites:
http://www.javahotchocolate.com/tutorials/blackberry.html#links
> [snip]
|
|
|
Goto Forum:
Current Time: Thu Apr 18 04:25:59 GMT 2024
Powered by FUDForum. Page generated in 0.03801 seconds
|