I have gwt-maps-3.0.2b.gwt22.jar, but I wanted to test code from http://code.google.com/p/gwt-maps-api/source/browse/trunk/Apis_Maps_Test/src/com/gonevertical/maps/testing/client/maps/DrawingMapWidget.java. I have problem, because my IDE saied me unknown imports:
import com.google.gwt.maps.client.drawinglib.DrawingControlOptions;
import com.google.gwt.maps.client.drawinglib.DrawingManager;
import com.google.gwt.maps.client.drawinglib.DrawingManagerOptions;
import com.google.gwt.maps.client.drawinglib.OverlayType;
I dont know to find some documentation. I dont understand that Do I need some another libraries or jar files ? How do I use drawing libraries in GWT Java ?
The JAR file you have (gwt-maps-3.0.2b.gwt22.jar) is from this project: gwt-google-maps-v3. However, the sample code you are trying to use is from this project: gwt-maps-api. These are different projects and the example from gwt-maps-api won't compile against the gwt-google-maps-v3 library.
If you really want to use the example code from the gwt-maps-api project, you will need to also download the rest of it as a library and import it into your project somehow. This is probably going to be hard since the library is only in an alpha state currently, and the author has not packaged it yet.
Related
I am using Play Framework 2.5 and ReactJS and I would like to be able to use importin my .jsx files but it seems like I am not allowed to do it because it throws an error in the javascript console saying that import is not recognized.
I added the sbt-reactjs to my build.sbt and I see that ReactJS compiles files each time they are changed, however I still have this importerror.
It can be really problematic as my application will grow because the components will become bigger and for example I would like to divide my navbar and to have Nav.jsand NavItem.js and I want to be able to call any component I have created in any *.js file of my application.
I have heard about babel that could transpile my code in pure javascript code but I would like to have more information about it, more precisely, can it works with Play (ie. will the files be transpiled during the assets command ?).
So my question is: Can I use the import with only the libs I have installed or do I have to add something else to my build.sbt ?
Thank you for your time
Well, from searching on the net, there seems there are lot of ways of doing it. I also ran into same problem. The best example I found was to use webpack for building the jsx files. The following git repo has all u need.
https://github.com/nouhoum/play-react-webpack
I notice that there are a lot of old tutorials from about 2010 that use
com.google.zxing.client.j2se.MatrixToImageWriter
to write 2D barcodes to files.
Also, I notice a lot of old tutorials specify the use of Android.
I am using Eclipse on Linux Mint, not Android.
Eclipse will happily import the main src tree of java files and show them as available packages. For example, I can get all the packages under zxing/core/src/main/java to show up; I can import classes from those packages and compile them.
However, I can't seem to import the com.google.zxing.client.j2se package when I have the core packages imported, and vice versa.
If there is a way to write BitMatrix objects to files without using
com.google.zxing.client.j2se
that would simplify matters.
Alternatively, if there is some way to get Eclipse to import both sets of packages, that might be an alternative. I have already tried modifying the "filters" under the "properties" tab, on the theory that if I can use two filters, the first can pick up
core/src/main/java
and the second can pick up
/javase/src/main/java/
But that didn't work for me.
Suggestions are welcome. Thanks.
Ran into the same problem with the import. It appears that we both forgot to add the javase.jar into the project. Download it from here, import and you will be able to import MatrixToImageWriter.
I have created a class in Java that I need to import into NetBeans and use in a GUI. What I have done so far is add the jar file containing the classes to the library in my project. I can look inside the jar file and see the classes I need inside the . I have looked around online and know that the best to way import these classes is to move them to another package that isn't the .
My problem is that I do not know how to do this. I saw that I can create a package in netbeans, but it is gray when it appears and I can't seem to do anything with it. I basically have no idea how to create packages that I can use to import classes If someone could please walk me through step by step I would greatly appreciate it. I have looked at the other posts on this site and other places online, but they seem to skip over somethings I am not sure about. My teacher didn't mention anything about packages either, so I am really in the dark.
You can copy your source files (*.java) in your project's src folder, then use refactoring to change the package.
Right-click your java file, then select Refactor > Move and type your new package name.
Hi! I am new to intelij IDEA, and I cannot get google reflection library to work inside intelijIDEA.
I've tried adding it as recommender in many sites, by going to the module configuration, then dependency, clicking on the add library icon and giving the jar file.
It gets recognised in the editer (not underlined with red), but when I try running the problem it throws a java.lang.NoClassDefFoundError: com/google/common/base/Predicate
so I am guessing that the import did not work.
Thanks in advance for any help.
Sure, you need to add the guava library as well, and probably other libraries.
I would search for it using mvnrepository.com, and than download the appropriate binary and add it as library.
If you're not using maven already, try it, it would save you a lot of time. otherwise, look at the pom.xml of the Reflections library, and decide which other libraries you might need at runtime.
Lets say I have a import line in my class:
import org.apache.log4j.Logger;
How can I know from which library does it come from? Lets say I have maven folder, that contains tons of libraries.
Why?
I want to use this class/library in my other project, but I don't know which JAR to copy.
Open type (Ctrl-Shift-T) enter org.apache.log4j.Logger, and you'll see which jar it belongs to (in gray).