documentation missing in eclipse - eclipse

I'm new to eclipse/java Mobile development and all the rest of the keywords.
I have just downloaded the eclipse pulsar package, and installed it, i also downloaded the 'java me sdk 3.0' and installed it and linked it in eclipse. now i can create a new midlet and i'm using the splash template as a start.
now i typed: g.drawString(...) and i have like a string argument which is supposed to be the string to display. and other three integers.
Now the problem is that there's no documentation at all. it's like you have to guess each argument is what.
I'm sure there's something called documentation right? but i don't what where is it's the sdk ? is it eclipse? where can i fix that?
even the 'string' type i couldn't find it's documentation.
EDIT:
now in my installed jres i have only jre6, though i also have installed jdk1.6.0 but it's not appearing i added it now...
But the main thing here, is that i had to download something called 'sun java wireless toolkit' which suggested to download the new feature 'sun_java_me_sdk-3_0-win.exe'. and i did, when i installed it i have a new section 'window->preferences->javame' which also contains missing configurations.
but there's a section in it called 'device management' (meaning the device that i need to work against, like standard hansets configurations) each with a set of jars. And very few jars have javadoc location set.
i know where the javadoc is now, but it's not covering all the jars i'm working with.
so to recap: i think i'm working against swt sdk and i need to link the libraries taht i'm working against to their corresponding javadoc. but not sure since it's not supposed that 'Graphics' class or 'string' class be used from this sdk and not the default java sdk 1.6.0?
i think i'll take this day to try to fix all this and really understand what libraries i'm working with and if i can download the rest of the javadocs and use them.
if it didn't work i'll go with netbeans. they say it's much easier to deploy
I did install netbeans, and the documentation is working. i saw inside netbeans that they are integrating the 'Java_ME_platform_SDK_3.0' but i don't know from where they provide the javadoc.

I have a simple walkaround that fix this problem. Just go to the library setting, you will see the javadoc of cldc11api.jar is missing, give it the same location as midp21api.jar, restart eclipse. Hope this work for you.

I don't have first-hand experience with Java ME development in Eclipse, but I will tell you how javadoc hookup works in Eclipse and you can investigate further.
Go to Window -> Preferences -> Java -> Installed JREs. You should find your Java ME install listed here.
Select it and hit Edit.
Expand various jar nodes under JRE system libraries. You will see source attachment and javadoc location.
If you don't see a location listed under javadoc, select that tree entry and hit Javadoc Location button to edit the location.
For me, using Java SE, I see location specified like this: http://java.sun.com/javase/6/docs/api/
It is possible that Eclipse simply doesn't know where to find Java ME javadoc. If you know the location, you can specify it in the above dialog. This could be a local or a remote URL.
If the location is specified and appears correct, the problem could be with network connectivity. If you are behind the proxy, make sure that it is correctly specified under Window -> Preferences -> General -> Network Connections.

my question is close to this question, you can refer to
Attach Javadoc to Eclipse for Java ME
anyway
Konstantin Komissarchik has also answered correctly to how you set the javadoc location.
Now the problem is with the 'Java_ME_platform_SDK_3.0', anyway through setting manually the configurations of javadoc location, igot it working after i restarted the eclipse with -clean argument.

Related

Support for Java Decompiling in current Eclipse IDE

I am currently looking for the latest version of the decompiler plugin for Eclipse (Kepler). Does this tool still exist?
I have downloaded jd.ide.eclipse.feature_0.1.5.jar and placed it in my plugins folder for eclipse but it does not seem to work. I have also copied JAD.exe into my local file and I point to that location for Path to Decompiler in JadCliple preferences. I have also set File Associations to read *.class as JadClipse Class File Viewer to default. Is there something else I am missing here? I have read past posts on this website and I see that access to the website has been the main problem. If anyone can guide me in the right direction this would be great.
I keep getting this error, The Class File Viewer cannot handle the given input ('org.eclipse.ui.ide.FileStoreEditorInput').
Instead of using JD-GUI or other GUI based tools, you may want to consider command-line decompilers that are frequently updated like the ones below:
Procyon
CFR
Both of these (should) support new Java 8 additions and other things that JD-GUI usually fails on.

Attach jdk source for 1.6.0_37-b06-434 and javadoc in Eclipse Juno on OS X 10.7 Lion

I have just installed the Java for OS X 2012-006 Developer Package from developer.apple.com and updated Eclipse Juno (the Springsoure toolsuite 3.1.0 version which is built on top of Juno) to use this JRE as the Execution environment and I also updated my projects to use this jdk.
In the JRE Definition dialog I attached source to classes.jar which is now pointing to /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home/src.jar
In this dialog I've tried letting the Javadoc point to Oracle online, to /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home/docs.jar OR /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home/Appledocs.jar
Yet, it seems impossible to get to the source when I need to, both in debug view or when just clicking on the class. I get "Source not found" all the time.
In addition when selecting classes.jar in package view and then "open attached javadoc" from the "Navigate" menu, a browser window opens that seems to point to the proper localhost URL (via http://127.0.0.1:59109/help/nftopic/jar:file:/[local path to docs.jar] ) but the window is empty.
I've read several suggestions here on stackoverflow and on blogs, somewhat recent I think, and still I can't get this to work this time. You have any suggestions for a different approach?
Update One thing that actually does work is hovering over source code with some class or interface from the JDK which give me the javadoc in the little yellow popup window and if I doubleclick the class I get the source for that class. And now seeing source code in debug view seem to work fine too. Hmmm.
So my expectations on how to get to source and javadoc in Eclipse is erroneous?
Well, it seems everything was done right after all with pointing the javadoc to /Library/Java/JavaVirtualMachines/[jdk-version]/Contents/Home/docs.jar. and so on. It seems I have to read up on when I can see source and javadoc in Eclipse.
I'l leave this as is if someone else need to know how to do this currently.

Eclipse JRE Definition not including core classes

I am trying to lnclude an additional JDK (really JRE) to my eclipse project as i need to build against the IBM Java 5 JRE.
When I add the root folder of the jre it appears as if the core java class jars are not being added and only the jars in \lib\ext are being added. That is problem 1.
The next issues is I can't even manually add the jars by adding external jars to the runtime library. The reason being when I hit ok to save off the changes and then hit ok to the preferences dialog. The changes do not truly save. I open up the jre definition dialog again and only the jars in \lib\ext are there again.
Is this an eclipse bug? Is anybody finding similar results?
I'd really like to figure out where these preferences are stored so I can manually edit the file if need be.
As a side note, I have had a similar experience with not being able to save .pmd rule preferences and having to edit them manually in the backend. Though I suspect that bug is on the PMD developers.
Anyway any help on this is greatly appreciated.
Thanks.

Mysterious Eclipse javadoc problem

I had a problem with finding Java docs in Eclipse. I seem to have fixed the problem, but I'm posting this for two reasons: I would like to know why I had the problem in the first place and perhaps my method of fixing it might be useful to someone else having a similar problem.
I created a simple Java project in Eclipse (Helios on Windows 7) and selected the JavaSE-1.6 JRE. Then I created a source file and imported java.util.GregorianCalendar. When I hovered over GregorianCalendar, I was getting the message:
This element has no attached source and the Javadoc could not be found in the attached Javadoc
None of the methods of GregorianCalendar seemed to have any Javadoc, either. Other standard Java classes (even others in java.util, like ArrayList) didn't have this problem; only GregorianCalendar. Everything seemed set up properly in the project settings. The Javadoc location set in the Java Build Path was http://java.sun.com/javase/6/docs/api/.
I managed to restore correct behavior by temporarily switching to JavaSE-1.7 and then back. Evidently something got reset and all is well. While I'm happy that things are now working, I don't like being clueless as to how they got messed up in the first place.
Can anyone provide any insights into this?
I think general support relies on the presence of a src.zip in your JDK directory, which is detected when you autosearch a directory for Java installations. It could be missing. Not sure if online Javadocs are used.
I'm using Eclipse Juno on a Windows 7 64-bit (with a 32-bit JDK) but i think it will also apply to your Eclipse version:
Download JDK docs zip file to your Desktop folder;
Right-click on the file, choose Properties and unblock it;
Move the file to a location of your choice. I normally move it to the JDK folder;
Open Eclipse and go to Window->Preferences->Java->Installed JREs;
Select your JDK installation and press Edit;
Select the rt.jar file and click "Javadoc Location..." button;
Select the "Javadoc in archive" radio button;
Set the archive path by browsing to the JDK docs zip file;
Set the "Path within archive" to "docs/api" (without the quotes).
Enjoy! ;)

Unable to install updates or plugins in Eclipse

At work we use Adobe Coldfusion Builder and got no problem installing plugins like MercurialEclipse. But at home I would like to use Eclipse itself, but am running into many many problems. When I try to contact http://cbes.javaforge.com/update it just says "Unable to read repository at http://cbes.javaforge.com/update/content.jar. Installing updates result in an endless ...pending...
What is going wrong here? I thought it would be the firewall. Turned it off, no succes. Tried reading all the articles about this problem, could not find my solution there as well.
Hopefully someone can pinpoint me to the right direction.
Thanx!!
Maarten
Are you using a different version of Eclipse? Try opening the transfers tab before you update and seeing if it's blocking on something like downloading content.jar. If so, the problem is that the repository only supports classic update sites, while Eclipse is only using p2.
As to solving it... I noticed this wasn't working on very recent builds of Eclipse. According to docs, classic is still supposed to be supported. I don't know if this is a change in behavior or a bug. Workarounds would probably be using an older Eclipse, switching to classic updates in Preferences, General/Capabilities, or possibly placing the plugin's zip in the eclipse dropins folder (eclipse/dropins).
I haven't tried these, but the Preferences seems most likely.
I'm using Eclipse 3.7 build I20110526-1708.
Edited
Yeah, you can tell that it's a p2 problem: http://cbes.javaforge.com/update/content.jar is a 404, while http://cbes.javaforge.com/update/site.xml works fine. site.xml is the classic update mechanism.
According to the wiki:
However, users will rarely have a need for enabling Update Manager, because p2 is able to install from any update site that was designed for Update Manager.
I just tried this out myself, and can verify the Capabilites workaround works: After enabling it, go to Help>Software Updates>Find and Install. Click Search for new Features to install, and add your site as a remote site.
It should successfully find the provided features.
As listed on the wiki, this is a workaround, and shouldn't normally be used. I'm not sure why it's necessary; I couldn't find information about it myself.
As for the dropins dir, I made a mistake: it should be a jar file, not a zip. The plugin's jar, which can be found by looking through the site.xml file. This is probably a worse workaround than the first, though.
It may be proxy related issue. Go to network connections preference page and in active provider select manual. Then select HTTP, click on edit and then provide the necessary details. Do the same for HTTPS also in the preference page. Then close the preference page and try again. It should work.