Getting a lot of "<classname> cannot be resolved to type" when installing SBT - eclipse

I have Eclipse Juno 4.2.1 installed on my Win7 x64 machine, and try to install "Social Business Toolkit SDK - 20131012". I unpack the content to C:\ ending up with C:\sbtsdk. Then I run the initWin.cmd to create the junction point (success), and unpack tomcat (jar doesn't exist, so I must unpack manually). Loading the workspace gives a lot of " cannot be resolved to type". Most certainly this is a kind of noob-error from my side where something isn't properly defined. On the other hand, in this video http://www.youtube.com/watch?v=MsHxrccnO28, Bhavesh Shah, states that it should be extremely simple and fast to get going with the toolkit (fast forward to ~ 25:00 to see Shah's installation of Eclipse and toolkit). Anybody got any ideas on how to get past the front-door of SBT?
Update:
I saw another thing. For example, in the package com.ibm.sbt.core's com.ibm.sbt.services.client package I got an error referencing the Response-variable. It turned out that the Response.java file was actually located right in this package at location C:\sbtk\source\com.ibm.sbt.core\src\com\ibm\sbt\services\client, but for some reason wasn't referenced in the package.
By adding Response.java to the package, the error went away (BTW, I didn't find "Add file to package" in Eclipse, so I had to copy the content to clipboard, delete the Response.java file, and then manually add a new file to the package with the correct name, and then paste the content. Probably a much better way to do this :-).
But it is strange that the Response.java file wasn't referenced in the package, wasn't it?

Related

Keep Getting Error When Trying to Run Javafx on Eclipse with Mac

So I keep getting this error when trying to run my program:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.controls not found
I'm using a mac with eclipse, and my VM argument is:
--module-path /Users/myname/Desktop/javafx-sdk-11.0.2_3/lib --add-modules javafx.controls,javafx.fxml
I've tried everything, javafx.controls.jar and the other .jar file are in my lib folder. I've reinstalled the javafx program, changed my file path around hundreds of times, and I've tried to install plugins. Does anyone have any idea as too what can be happening? JavaFX is also an added library in my project, and all the .jar files assocated with it are added to it. Please let me know if anyone has an idea. Best!
I had success with the following additional step.
In the Run Configuration->Dependencies tab, click the "ModulePath" and then add the JavaFX JDK's jars (or the /lib folder that holds the jars) to the list.
You can inspect the generated command line, and check that these are included in the -p option.
IDK why this step should be needed. I would think Eclipse should be smart enough to include something on the dependency module path if it were in the project's Build Path Library list.
I have questions about this at eclipse.org and gluon. Maybe there will be an explanation, or fix so that this step isn't needed, or an edit to the documentation to let us know we need to do this.

eclipse projects build path is driving me nuts

I have this number of apps/libraries which I set up in different projects. Development and refactorings are mostly simultaneous so I don't want to "build library, deploy to lib folder of depending projects, rebuild depending projects".
At the leaf of the dependency tree is CLIENT. I only have the JRE library in Libraries->Module Path. Builds just fine. (CLIENT has a module.info that exports its packages.)
One depending app is DBROWSER. Requires only JRE+CLIENT, so I have CLIENT in Projects->Module Path and JRE in Libraries->Module Path. Builds fine. DBROWSER has a module.info that requires what it needs, and exports nothing (it's a main GUI app.)
Other depending app is SERVER. Requires only JRE+CLIENT, so I have CLIENT in Projects->Module Path and JRE in Libraries->Module Path. Refuses to build. Error message is "The project was not built since its build path is incomplete. Cannot find the class file for java.util.Set. Fix the build path then try building this project". I've tried cleaning dozens of times, only results in seemingly random shifting around to other error messages, mostly "could not be resolved" and "indirectly referenced from existing .class files".
What am I missing ?
EDIT
I also found this
"It sounds like this has been a known issue (Bug 67414)that was resolved in 3.0 ... someone has commented that it's occurring for them in 3.4 as well.
In the mean time, the work around is to remove the JRE System Library from the project and then add it back again."
at
Eclipse error: indirectly referenced from required .class files?
Didn't work either.
From the symptom I'd guess that this is https://bugs.eclipse.org/547181 which is fixed in current milestone / integration builds, so please try installing 2019-09 M2

google-api-client-java eclipse build path and google app engine

I am trying to follow the instructions here:
http://android-developers.blogspot.ca/2013/01/verifying-back-end-calls-from-android.html
I have decided to download the google-api-java-client library and see if I can instantiate the code on the bottom half of the page referenced above. I have imported libraries in eclipse in my app engine project so that eclipse doesn't complain about anything BUT when I try this:
GoogleIdToken token = GoogleIdToken.parse(mJFactory, tokenString);
eclipse complains with red underlining on 'GoogleIdToken.parse()' and this text
The project was not built since its build path is incomplete. Cannot find the class file for com.google.api.client.auth.jsontoken.JsonWebSignature. Fix the build path then try building this project
and
The type com.google.api.client.auth.jsontoken.JsonWebSignature cannot be resolved. It is indirectly referenced from required .class files
I have gone to this site and have followed the instructions as closely as I can, but the error remains.
http://code.google.com/p/google-api-java-client/wiki/Setup#Download_Library_with_Dependencies
can anyone tell me how to get rid of this error?
see this link:
http://code.google.com/p/google-api-java-client/
The jars with version 1.12.0-beta were not working for me, (as described above) but 1.13.2-beta was released and seems to work fine.
BTW, I was willing to try anything, including different versions of eclipse and wiping my eclipse workspace metadata. I even tried older versions of the google api library, which actually worked. I was going to go with 1.9, but I found out the last one (1.13) had some useful options that I wanted to take advantage of. 1.13.2-beta got rid of the eclipse errors for me.

Referencing a GWT project from another GWT one - Problems

I am already using an open source GWT project (iServe) and I would like to integrate into it another open source GWT project (PetalsBPM), by which I mean being able to call it and reference its methods.
I have imported iServe in Eclipse (it has multiple modules) as separate Maven projects referencing its other and can run it successfully through Runas -> Web application in development mode.
If I do that and run the other project through the console as mvn gwt:run, I call initiate PetalsMBP through iServe. However, that means that the two programs have to run as is, without communication with each other.
I have also imported the second project into eclipse as a java project successfully (converting into a Maven one causes problems - various lifecycle configurations ones), but whenever I try to add to to iServe through Properties -> Java Build Path -> Projects, although it does not cause any errors immediately, I cannot launch iServe anymore. It produces the following error:
"Exception occurred executing command line.
Cannot run program "C:\Program Files\Java\jre7\bin\javaw.exe" (in directory "C:...iserve-sal-gwt-1.0.0-SNAPSHOT"): CreateProcess error=206, The filename or extension is too long"
Are my problems related to the fact that PetalsBPM is not a Maven project in Eclipse (I doubt it)?
Am I doing something wrong, i.e., this is not the way to reference a project from another one? should I add a reference to the first project's (iServe) gwt.xml file?
Is there a way to do what I want without having to wrap the second project as a jar and calling it from iServe? I would prefer not to, since producing a jar every time I make a slight change is not exactly efficient!
P.S: The second project is a regular GWT project with an entrypoint, not just a module. Should I remove this?
UPDATE: Trying to figure out the source of this error, I attempted to simplify the problem, so I performed the following moves:
I created two new simple GWT projects and tried to reference one
from the other. Worked fine
I referenced the project I actually want
to use (PetalsBPM) from the simple one I just created. Also works
fine.
I referenced the new simple project from the original one I
want to use (iServe). Also works fine.
Tried doing what I actually
want to do, copying the settings from 2&3. Produces the same error
"CreateProcess error=206, The filename or extension is too long" if
I reference PetalsBPM (does not when I remove it from the referenced
projects)
So, I tried switching workspaces. I created a new workspace in C:\, and moved the actual projects there. Still it did not work. :(
Any more ideas?
I met the same type of error "Create Process, error=206, path too long etc." a hundred times.
Then, I found a solution/explanation in google-groups, it solved my problem.
I post the content and link as it might help others.
This website (StackOverflow) really helped me a thousand times.
Thanks to you all !
solution/explanation :
(Response from Stephen Johnson)
(...) if you're using eclipse plugin go to Project | Properties, choose
Google \ App Engine \ ORM and only include directories that you have
classes that you want enhanced. By default it does the entire project
so that includes a lot of needless files. (...)
Link :
original post # google-groups
Read the exception message again. Somewhere along the way Maven is generating a path that is too long for (some) Windows API to handle, try moving your workspace to a directory straight below C:\.
I just tried "skolima" reply and it worked for me. In Eclipse I clicked File->Switch Workspace.
Three things to note:
After I created the workspace in "C:\workspace" I had to update my Project->Properties > Java Build Path > Libraries > Add External JARs...
I'm using Windows 7.
I'm using "Eclipse Java EE IDE for Web Developers"
I hope this others.

How to add a library into Processing from Eclipse platform?

I installed the Processing plugin for Eclipse. it works fine. But then i copied the folder gifAnimation into C:\Program Files\eclipse\plugins\processing.plugin.core_0.2.5.1\Resources\libraries. All the other libraries are there.
but "import gifAmination.*;" does not work.
and gives the following error.
Library import "gifAnimation" could not be found. Check the library folder in your sketchbook.
It's been awhile since I used Processing in Eclipse, but I think you need to add libraries explicitly to the build path. There is a tutorial here which will walk you through the whole process of getting Eclipse working with Processing, including adding extra libraries. The main thing you need to do is browse to your added libraries, and use Eclipse's 'Add to Build Path" menu option.