Im trying to use EMF Compare in a standalone Java application. In the Eclipse foruns, I was suggested to use the version in the git.
I cloned the repository. Then, I imported all projects in a workspace. I read that I just need the main EMF Compare lib, so I exported the project org.eclipse.emf.compare in a Deployable plugin and fragment, which I put inside the plugins folder in my default eclipse directory.
In my project, I can now import the org.eclipse.emf.compare, but when I run I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Sets
at org.eclipse.emf.compare.scope.AbstractComparisonScope.<init>(AbstractComparisonScope.java:55)
at org.eclipse.emf.compare.scope.FilterComparisonScope.<init>(FilterComparisonScope.java:63)
which is clearly because its not finding this guava google libs.
How should I proceed? Just have to change the way I generate the plugin, or should I generate a jar (and, in this case, how to export the google lib together?)
Thanks in advance,
Dusso
Okay, I am very late in answering (I do not follow the "emf" tag :s), but anyhow: the EMF Compare wiki explains how it can be used standalone, and what the minimal set of dependencies is (See this FAQ entry).
The first Orbit (Eclipse repository containing third-party dependencies) build that contained Guava 11 is here or you can use its p2 update-site directly
The first picture can be found in this website.
Picture 1
https://www.eclipse.org/emf/compare/documentation/latest/FAQ.html
And the second picture is the way what I do.
Picture 2
Related
I made a project in JavaFX in eclipse. I had to reinstall the system which led to the removal of Java and Eclipse. I project files I had saved. I installed everything again, and decided to create a new project based on the files of the previous using the Maven (Java-JavaFX-Maven). And there is a lot of errors.
Eg.
How should the appeal in this case?
I have a
MainView.fxml
application.css
MainViewController.java and a few filse with class in *.java
.
Parent root = FXMLLoader.load(getClass().getResource("MainView.fxml"));
scene.getStylesheets().add("application.css");
Where should be located xml and css files and what appeal set?
catalogs:
src/main/java/com.pezal
src/main/resources
In the MainView.fxml have set a reference to the controller com.pezal.MainViewController
Throws an exception:
I can not find references
Also I can not build a jar using Maven
The question already asked before but no one has answered the question. I thought maybe it was some internal error and reinstall help.
Why I can't build jar in Maven
If someone can look at this link and help I'd be very grateful.
Eclipse needs to be configured to have the JDK used, per default the JRE will get used, which MIGHT WORK to have maven running, but not for compiling.
Some instruction out on the net: http://www.gamefromscratch.com/post/2011/11/15/Telling-Eclipse-to-use-the-JDK-instead-of-JRE.aspx
For having some example for placing fxml-files and using them inside your code, you might want to checkout some example-project of the javafx-maven-plugin: https://github.com/javafx-maven-plugin/javafx-maven-plugin/tree/master/src/it/08-build-with-proguard
Disclaimer: I'm the maintainer of the javafx-maven-plugin
I'll try to explain as much as possible as this is more of a structural problem than code problem, ok, so i have project in which i am using android-support-library-v4, now in the same project i have now added three new libraries, these libraries also include android-support-library-v4, as they are part of their own code framework,
Now the problem is this is causing a jar mismatch in my project because i now have three same android-support-library-v4 in my project.
I tried the solution of removing the android-support-library-v4 jar file from my main project but this does not resolve the jar mismatch from the other libraries i have used in the project, and i cannot delete the android-support-library-v4 jars from the libraries as they would not work without them meaning they will stop functioning...
Simple solution for this problem , What i usually do is , steps are.
Just copy any android-support-library-v4 from any lib project
Then copy and replace this to all other libs projects.
This will remove your mismatch problem
I will suggest you to use Android Studio as Google official IDE.
I did a sample application mentioned in this link using Netbeans Wizard template https://platform.netbeans.org/tutorials/nbm-wizard.html
But how do I export as executable jar. I just want to execute the project independently with out IDE. Any suggestions.
I can't find it in the tutorial that you point to but in order to share your newly created Netbeans plugin you need to export it as a binary NetBeans Module or .nbm file. Right click on your project and select Create NBM. Check this old tutorial here: http://docs.huihoo.com/netbeans/6.0/kb/60/platform/nbm-google.html
For Netbeans 8.0: When the file is created you can then go Tools->Plugins , downloaded tab and then click add plugins
EDIT (based on your comments)
The tuturial you point to guides you to build a custom Netbeans module (in this case a Wizard). The module is packaged as a .nbm file which you can then distribute it so that it can be installed to any Netbeans IDE.
As it turns out you need something like a "Java swing wizard" application. By searching google you can find some results that fit your needs (these are from the first google results):
http://www.oracle.com/technetwork/articles/javase/wizard-136789.html
https://code.google.com/p/cjwizard/
http://www.javaworld.com/article/2077850/java-se/open-source-java-projects-the-wizard-api.html
http://sourceforge.net/projects/jwf/
Similar question (maybe you can post a comment asking for details there):
https://softwareengineering.stackexchange.com/questions/132723/is-there-a-java-library-to-create-assisted-wizard-flow-into-your-desktop-applica
Hope I am not leading you to the wrong way but another thing you can also have a look at, (haven't checked it myself but you might find it useful) is how to create OSGI modules and the posibility of converting Netbeans modules to OSGI modules.
Look here: http://wiki.netbeans.org/OSGiAndNetBeans.
I am trying to reference a pure java-Project in my Android-Project -> The Java-Project has a whole bunch of classes I need to use. Oh, and as the first response pointed out: I am using eclipse, yes :)
Only Problem is: I Always get Could not find class 'XXX', referenced from method com.example.helloworld.MainActivity.onCreate. I seem to have missed SOME step or error...?
What I already did:
The Project is added as Project into the Java Build Path (logically nessecary)
It is marked in "Order and Export" in the Java Build Path and pushed to the top (this solved the problem for someone else here when dealing with Jar-files)
Ir is marked in "Project References" on Project settings.
I added the folder where the relevant class is under "Libraries" in build Path... I am not sure if that should be nessecary.
The Java-Project I reference has a whole load of Jars, but if that is the reason, should I not get a different errormessage?
I had the same issue and after some hours of frustration and search I have finally found the answer here:
Android, class not found from imported jar file
Basically, the issue was that the referenced pure-java project or the generated jar was built with Java 1.7, and Android projects are set to use 1.6.
Two ways to do this.
Jar that java project and copy the jar to the libs folder of your Android project.
Add the project as a dependent project to your Android project
Both work wonderfully.
But mind you, this pure-java project must add android.jar and not things like rt.jar :). Else you will get Dalvik exceptions.
Edit :
Dont forget to refresh and Project - Clean your android project.
Two things to check (you mentioned you are using Eclipse):
If your android project needs to use the pure-java project's JARs, check that those JARs are being exported in the build path options of the pure-java project. This is in the build path of the pure-java project you are trying to include, not the build path of the android project that is trying to include it. Under "Order and Export" tab for the pure-java project, note the comment "Exported entries are contributed to dependent projects". In this case, your android project is the dependent project and your pure-java project needs to do the contributing.
Make sure the pure-java project is actually opened in the IDE in addition to your android project. Probably trivial but sometimes overlooked.
If answer does not suffice, you may wish to mention if the missing classes are in .java source files, or if they are only found in JARs in the build path of the pure-java project
Edit: To further track down the issue, please confirm the following to make sure I understood your question:
The pure-java project does successfully build in the IDE
The 'class not found' error is one you are getting when you try and -build- your android project and not when you try and -run- it.
CLASSPATH (aka build path) can be nasty to untangle. If including the project is not working (assuming it does build), you could try building a JAR of your pure-java project and copying (and including) that and all the other JARs into your android project.
The android SDK does certainly complicate the build environment. One way to find out whether the problem is (A) your android project setup) OR (B) the way the pure-java project is packaged) is to create a different pure java project and try including the first one, preferably using the -exact- same line of code that gives you the build error in the android project, if possible.
I have a Java Web Services project that was created in an older version of NetBeans, and I haven't accessed it in many months, so my paths and installed libraries are different.
When I try to open the project, I get a "Resolve Reference Problems" dialog, and two Reference Problems are listed:
"metro" library could not be found
"JAX-WS-ENDORSED" library could not be found
I have a fresh installation of JDK 6 Update 25 with NetBeans 7.0, and am running Windows 7.
What steps can I take to solve this? I don't even know where to start, as every approach I've taken so far hasn't gotten me anywhere.
Note: JAX-WS-ENDORSED does not appear in my Libraries listing, so I can't remove it. Something hidden is referencing it. How would I find this?
I just came across this issue and found some help from http://netbeans.org/bugzilla/show_bug.cgi?id=187145. Apparently, Netbeans will create the JAX-WS-ENDORSED library when a new web service is created. So go to File > New File, choose Web Service > Web Service Client and fill in dummy values (this can be done in a throwaway project). This client can then be removed, and Netbeans will have created the library with the following classpath entries:
java/modules/ext/jaxws22/api/jaxws-api.jar
ide/modules/ext/jaxb/api/jaxb-api.jar
These are relative to your Netbeans install directory (on OS X will be located in Contents/Resources/Netbeans within the .app). Alternatively, you could create the library manually using the entries above.
This only needs to be done once, as the library will be added to Netbeans Global Libraries list.
The best solution is to edit project.properties file and replace below piece of code.
Original property: endorsed.classpath=\${libs.JAX-WS-ENDORSED.classpath}
Replace with: endorsed.classpath=\${lib.JAX-WS 2.2.classpath}
In older versions of Netbeans there is JAX-WS-ENDORSED library in libs location.
Newer versions of Netbeans having JAX-WS 2.2 library in lib folder
** ALL THE BEST **
If it is still needed, I had the same situation when opened a netbeans 6.9 project in netbeans 7. There is no way to resolve the 'jaxb-endorsed' (in my case was jaxb and not jaxws) reference using the libraries window.
I found a endorsed.classpath property in the nbproject/project.properties file.
I still not sure what is its purpose, but in this property I found the bad reference to jaxb-endorsed.classpath, so I deleted, closed netbeans and opened again, and the reference problem has gone.
I already have Jaxb 2.2 library added to my project, so it is working good with the modification I did to the project.properties.
I hope it helps.
I had a similar problem : DO NOT DELETE THE JAX-WS-ENDORSED - remind me to downvote. I had to go to the imported project > resolve reference
problems dialogue > delete the references from there which were pointing to the old NB folders - pic :
and then create the throwaway web service as suggested by William Scott and then add the newly created jars :
Netbeans maintains a set of libraries, which are simply a convenient way to manage groups of related jar files. Start by clicking Tools > Libraries. You will see the library manager window.
You will see the options to add your own libraries if you have jar files downloaded. If you do not see the library that you are looking for you can download them and add them your self. Once the library exist in Netbeans you can go to the Project Explorer window and right click on the Libraries tab of your project. Select Add Library and you will have the chance to add the library that you added in the library manager.
You may want to right click on your project, go to properties -> Libraries.
Remove the JAX-WS-ENDORSED library, and try using JAX-WS 2.2
Also remove metro and try adding METRO 2.0
That may solve your problem.
You may also want to right-click on your web service references and select
Edit Web Service Attributes
Then on wsimport Options tab see if xendorsed is set to true.
UPDATE
You may need to close netbeans and then open it again, and it may work. I was having a problem similar and I just did that and it worked.
The only difference, and it may not be needed, is that I also added the JAXB 2.2 library, but that was because I was trying to solve a compilation error.
I had same problem and Fix it by install soap webservice and and resful webservice in netbeans plugin
I fix it:
unistall netbeans.
delete HOME/.netbeans and HOME/.nbi
then install netbeans again
Old thread, different and effective solution... I just moved some projects from one system to another and got this error. With NetBeans v7.3+, go to Tools>Plugins, Available Plugins, then search for "SOAP". You should see "SOAP Web Services". On loading this library you'll get the JAX-WS-ENDORSED library. Restart NetBeans and you should be able to get a Clean Build.
Loading this package brings in a number of other libraries. On restarting the IDE you may get a notification that other packages now have available updates.
Do the following ( BTW in my case its NetBeans 6.9.1 )
1 Why this appeared now ?
Because i tried to open project on other pc with fresh copy of net bean
2 How the problem looks like ?
Jar Lib Not Found for JAX-WS-ENDORSED
3 Why it was needed at the first place and what its used for?
Well i have a webservice on same server/domain e.g localhost , so of course
it will work if i removed the web service from the folder in sources but i need it
4 What to do?
Try to add dummy any online free web service in form wsdl
like Some test web service or search for any other one
This is the source of my public free to use wsdl
5 What then ?
Just add it please
Now what ?
Wait for scanning project stuff it should be ok
you can re check from library properties of project
or see that there is no red/ or resolve references problem
in project properties
So what happened exactly?
Note: JAX-WS-ENDORSED it will be added automatically to your libraries
same methodology can solve other problems as well