Problems with Playn libraries installation and Eclipse - java

I need the Playn libraries for an important project and I can't make them work on Linux. All the first part run smooth, I've installed git, and launched the clone command from terminal, I've installed maven and the mvn test went fine, then I've installed the maven add-on for Eclipse an rebooted. Then I've created a blank project in the workspace folder with the following command
mvn archetype:generate -DarchetypeGroupId=com.googlecode.playn -DarchetypeArtifactId=playn-archetype -DarchetypeVersion=1.7
Now I only have to import it and this is where the problem start, every time I tried I get the same errors.
Now I think that I can resolve all but the last two by adding some plug-in and packages, but how can I fix the last two? This has been haunting me for days and I've even found out that is a common problem but I don't understand a word about its solution. There must be a package or something that fix that, if not I need a step by step guide on how to fix it cause I've only used Eclipse for debugging, and I've never ever messed with Playn before.
I'm running on Ubuntu 32 bit, it's the last release.

Related

Trying to develop mods for minecraft, but can't get the SetupdecompWorkspace.bat to work

First of all, this is my first ever post on stack exchange so let me know if this belongs in a different section.
Anyway, I've been wanting to get into modding minecraft so I downloaded JDK, Forge MDK and eclipse neon. After exacting files to a separate folder, I created a path variable and a Setup Workspace.bat file. In that file I typed
gradlew setupDecompWorkspace && gradlew eclipse
After this, I ran it and it got to 56%, or decompilemc. It stayed there for about 6 minutes before the console crashed. I assumed there was an error so I researched it and tried to fix it by adding more RAM to the gradle.properties. That didn't work either, so I continued researching for about an hour, and finally found something that made it go pass the decompilemc, only to break again at recompilemc
Have any of you ever encountered this problem? If so, how did you fix it? Any answer is greatly appreciated.
If this is your first time starting a Forge Workspace, make sure you have the "gradlew.bat" file, then simply shift-click your home directory and click "Open command window here". Then type:
gradlew.bat setupDecompWorkspace eclipse
Or if you're using Intellij (Which I suggest you use over Eclipse):
gradlew.bat setupDecompWorkspace idea
That should start the process of generating your Workspace.
Surprisingly useful is the fact that it can run multiple commands from one command statement. Meaning that you can type both "setupDecompWorkspace" and "eclipse"/"idea" and it will run both separately one after the other.

How to fix corrupted Eclipse Indigo JEE?

I installed following plugins in eclipse indigo in following order to start spring development
Spring Tools Suite
M2E (Maven)
after these two installations, it was giving error
jira connector not installed, so I installed the following plugin.
Atlassian Jira Connector
After installing Jira Connector, Eclipse Started showing the following error :
Uninstalled Jira Connector. Still Showing these Problems.
Any help would be appreciated.
Eclipse has major structural problems with uninstalls, which aren't really fixed even the latest luna. But don't worry, there are a lot of workarounds.
What you can do now and in similar situations:
1.
If you can even uninstall something, you won't get back its previous state before the install.
Because of it I use Eclipse normally with a trick: I store my main Eclipse install directory in a git repository, and so I can always switch back with a single command. But it is only a trick.
2.
There is a big chance, that only your workspace directory is damaged, and not your Eclipse. In this case you can solve this problem by reinitializing your workspace: make a backup, delete everything, recreate your workspace directory and finally import again your projects.
(For similar reasons it is also an useful trick to save your workspace metadata in a git repository as well.)
3.
In Eclipse, the menu items are created by modules. If an eclipse module is installed, it creates the changes in its internal configurations which create the menu items.
After a restart, Eclipse tries to restore your gui, and thus re-open its panels. But if a module uninstall is also happened, then its panels aren't restorable, resulting exactly your problem.
So, simply close the bad panels and try to reopen them. Sometimes it also works.
In short: recreate your workspace, it will probably help. And next time, use Eclipse with some good and frequent backup (I suggest git).

Getting rid of org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 that cannot be casted to String

I have just run into the Apache Ivy bug java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String (link) when performing Ant task ivy:config
This morning I tried to install LibraryFolder ClasspathContainer plugin into my Eclipse (STS 3.6.1): installing it caused the above error every time I tried to perform ivy:retrieve.
Even worse, I tried to install IvyDE plugin from Eclipse Marketplace and Eclipse started to crash at a multitude of errors, including JVM crash. Uninstalling both plugins didn't fix. I tried with a new workspace and a blank Eclipse installation, but I eventually had to install my previous Eclipse plugins.
I spent the entire morning trying to fix the mess but I had to restore the previous uncommitted workspace and Eclipse installation, so now I get everything working except for the above error. Ivy worked fine until this morning.
Every Ant task of mine runs in the same JRE as Eclipse (C:\Program Files\Java\jdk1.7.0_60\jre\bin\server\jvm.dll as per sts.ini) because I use a lot the eclipse.refreshLocal task. While I can workaround the problem by removing/commenting eclipse.refreshLocal task and run Ant-Ivy tasks in a standard JRE, I'm asking if there is a workaround to get rid of the error, perhaps by deleting a key file in the workspace's metadata.
As I can read, an Ivy method is passed an object that, guessing from its name, is part of Eclipse configuration. While I'll be waiting for a bugfix, my question is how do I investigate more about the nature of this org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 parameter?
This looks related to Error at building model of new Gradle project for libgdx - which includes a workaround that works for Gradle IDE, so maybe it will work for you.
The relevant Eclipse bug is https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122
[Edit by OP] to simplify life to people having the same problem I'll post the contents of the link and accept the answer
Just add the following lines to eclipse.ini
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dosgi.configuration.area.default=null
-Dosgi.user.area.default=null
-Dosgi.user.area=#user.home
-Dosgi.instance.area.default=null

finding changes eclipse makes to maven project

I have a maven project which I have downloaded from this link. When I make a couple changes to it, it runs perfectly from the command line when I type:
mvn clean install tomcat7:run-war -Dmaven.test.skip=true
in the directory to which the zip was extracted. (The only 2 changes required to make it work on the command line are to 1.) add a plugin tag for tomcat 7 in pom.xml and 2.) create a context.xml file in the webapp/META-INF folder. Everything else in the app remains the same as the github verion, and the app runs fine from the command line using the command given above and then typing the url in the browser.)
However, when I import the project into eclipse as an existing maven project, and then try to run the app, the app starts throwing errors related to not finding a couple of jars which are clearly in the repository. The app no longer compiles from the command line, or from eclipse. I even tried to run the app as a maven build from eclipse and even changed the maven instance eclipse uses to the freestanding maven that works from the command line instead of the embedded maven in eclipse, but the app still threw the same errors when I tried to run it.
But then, when I repeated the steps with a fresh copy of the app, the fresh copy runs fine from the command line, while the copy that eclipse touched does not compile by any method.
It seems that eclipse has made some changes to the app in the process of importing it as an existing maven project into eclipse. How can I locate the specific changes that eclipse has made to the app? I would like to be able to use eclipse as my IDE, but I cannot do so unless it can compile the code.
This answer was originally posted as a comment it turns out that resolved the OP's problem, and as He asked I'm turning into an answer.
First set your eclipse to use the JDK instead of the JRE. Just as a reference this configuration on Eclipse is Normally on Window->Preferences...->Java->Installed JREs:
Second (as you already did) change eclipse maven to look at installed maven that runs on the command line again.
I've encountered some problems with maven running with the JRE instead of the JDK. Try it and let me know. I will sleep now. Tomorrow I will see what happened.

Attempting to create new Android Application with adt tools in Eclipse. R.Java missing, even after clean and rebuid;

Having a problem creating my new android application. I create the new project and I get the error that R cannot be resolved to a variable. I don't import (as I seen not to do on other threads similar to this). I clean and rebuild but R.Java never appears in gen. I've tried a few things but to no avail. Might this be a problem with the version of ADT tools I downloaded or is there something else wrong?
EDIT: This is on windows
Your project fails to generate R file only when your project fails to build. 99% this is due to an error in your XMLs.
Double check your recently changed XMLs for errors.
Check your xml file ,solve the error,Restart project and perform cleaning again. If that doesn't help then follow following steps:-
1. Delete the project.
2. Create New project.
That will resolve the issue
I have just worked through this problem, so I can provide the answer that worked on my system, which is Ubuntu 12.10 64 bit. I found that the following three libraries needed to be installed: libncurses5:i385, libstdc++6:i386, and lib32z1.
The first two libraries are required to run adb. You can test if they are needed by going into /tools or /platform-tools and running adb. If you get an error saying the adb file is not present, but in fact, you can see that it is present, then one part of the problem is that you need these two libraries: libncurses5:i386, and libstdc++6:i386. You can install them with
sudo apt-get install libncurses5:i386 and
sudo apt-get install libstdc++6:i386.
That will get adb working. But I found that this wasn't enough. To automatically generate the R.java file when creating a new project you also need a third library: lib32z1. It can be installed with
sudo apt-get install lib32z1.
That worked on my system, I've listed the guides that I found helpful in a blogpost. If you're building on a different platform it would be helpful if you would clarify the platform that you are developing on.

Categories

Resources