Attaching a process to a debug session: empty process list - java

Windows xp sp3
Eclipse Junu with CDT
I've been trying to debug a JNI project using the process attachment feature.
At first, I fire the Java program, and then, when I fire the C program, I suppose to choose the javaw.exe process.
The tutorial I used for JNI debugging
The problam is, when I suppose to choose the right process, the process list seem to be empty:
Here is my debug configuration:
What can I do? Should I replace the debugger?
Thanks in advance,
Mark.

I encountered this problem using eclipse CDT plugin in Eclipse Juno on windows. Using sysinternals process monitor I discovered that eclipse was looking for a class file:
C:\Program Files\eclipse\plugins\org.eclipse.cdt.core.win32.x86_64_5.2.0.201209170703\org\eclipse\cdt\internal\core\win32\ProcessList.class
but not finding it (Eclipse is installed on my system in C:\Program Files\eclipse). The missing class file is present in the jar file:
C:\Program Files\eclipse\plugins\org.eclipse.cdt.core.win32_5.3.0.201209170703.jar
I am not sure why eclipse can't find the file in the jar. I copied the entire "org" directory tree out of the org.eclipse.cdt.core.win32_5.3.0.201209170703 jar into the file system. Having done that, eclipse can now find the file
C:\Program Files\eclipse\plugins\org.eclipse.cdt.core.win32.x86_64_5.2.0.201209170703\org\eclipse\cdt\internal\core\win32\ProcessList.class
(and other files in that jar) and the process pick list is now populated.

This didn't work for me. I was able to find the jar and extract the jar, but still got the same error.
I switch back to Eclipse v3.7 (Indigo) with CDT and everything works. Same GCC toolchain and project, all I did was change which version of eclipse I was using and the attach to process works fine. I'll report the bug to CDT team but Juno is really costing me some man hours (both for CPP and Java...)
Good luck other CDT users!
UPDATE:
I was able to get your workaround to work. I extracted the specified jar and it came out as a 'org' directory in the plugin folder. But really, it needed to be extracted in the directory/folder that has the same name as the Jar. This is strange...
Well, Juno+CDT is working again.. guess I shouldn't be such a hater ;-)

Related

Installing WALA

I really want to use the Static Java Slicer that is implemented by WALA. But Unfortunately I've been really struggling to get started with it. This is what I've done:
First, I downloaded Eclipse 4.2 (64 bit version)
Then I used git clone to obtain "WALA" files
I downloaded dx.jar from http://www.java2s.com/Code/Jar/d/Downloaddxjar.htm
I went into "com.ibm.wala.dalvik.test" and created a folder named "lib"
I put dx.jar into "lib".
I went into the root directory (the directory that contains all of the wala projects e.g. com.ibm.wala.cast), using windows command processor (cmd)
I typed "mvn clean verify -DskipTests=true -q"
And I get the following error message:
I tried to import the project into eclipse anyway (using the import existing projects option), and all of the project have errors. I'm using jre1.8.0_65 and my compiler compliance level set to 1.7.
Does anyone know where I've gone wrong? Could you please help?
You need to remove the line from com.ibm.wala.ide.jdt.test\META-INF\MANIFEST.MF
org.eclipse.jdt.launching.macosx;resolution:=optional,
And do not download WALA as github zip archive it will throw another error:
One of setGitDir or setWorkTree must be called
More details:
https://github.com/wala/WALA/issues/94
https://sourceforge.net/p/wala/mailman/wala-wala/?viewmonth=201408

Does JADclipse working in MacOS?

Mac version: OSX Maverick
Eclipse Version: Tried both Mars and the previous Luna release.
Just gotten Eclipse a few days ago and i run across JADclipse, been wanting to look through class files so I went to download it
Spent the past 2 days trying to get it to work, I have done all the steps required:
File Association for jad
Made JADclipse Viewer as Default
Eclipse -clean
Despite that it still gives me the error that
The Class File Viewer cannot handle the given input ('org.eclipse.ui.ide.FileStoreEditorInput').
Can anyone help out?
Full error details
The message is saying that the viewer cannot deal with FileStoreEditorInput. This input is used when you try to open a file which is not in the Eclipse Workspace. So presumably the viewer can only open files which are in the current workspace.

RCP's exec launcher can't find companion shared library on launch, but starts with click on org.eclipse.equinox.launcher_1.2.0.v20110502.jar

I'm building an Eclipse RCP application against Eclipse 3.7.1 and Java 1.6.
I'm also using Tycho to build, and have set up my RCP according to the Tycho tutorial from the EclipseCon 2011, to which I've stuck slavishly, apart from project names.
The application builds fine up until I get to Step 5 (adding a p2 repo, then adding a .product file. Well, it still builds fine, and everything is where it should be, but I cannot start the RCP by clicking on the .exe file from the repository in the workspace.
All I get is the old dreaded "The [RCP] executable launcher was unable to locate its companion shared library" error popup.
First of all I thought I might have set up the CLASS PATH incorrectly, but when I open a console and type javaw or java -version anywhere, it all works.
Also, when I go to the pluginsfolder in the p2 repository for the RCP in the workspace, and double-click on org.eclipse.equinox.launcher_1.2.0.v20110502.jar, the RCP starts, albeit without the splash screen.
This must surely mean my Java set up is correct, and it's not a class path problem?
I'm not sure where this problem might lie (I have a plugin, a feature, a product, a repository, and a parent package with the main pom), so if you let me know your suspicions where the error might come from, I'll be more than happy to post respective XML, build.properties, screenshots and what have you. Unless this is a common error with a common solution.
Many thanks in advance!
Oh yea: Windows 7 (64-bit), JDK and JRE both 64-bit as well, Eclipse EE 3.7.1 (I chose that because it contains the most plugins I'll need later by default).
UPDATE
I'm attaching my CLASS PATH Settings for reference.
User variables
CLASS PATH: C:\Program Files\Java\jdk1.6.0_30;.;
System variables
JAVA_HOME: C:\Program Files\Java\jdk1.6.0_30
Path: %JAVA_HOME%\bin;
UPDATE 2
When I let Tycho create a ZIP file in the p2 repository, and copy that from the repo to another location, unzip it and run the .exe, the application starts without problems. So I guess this query is partially solved, but I'd still be interested to hear why I wouldn't be able to start the application from the repository...
Today I came across the same issue. I guess you could find the solution here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=176084
In short, the problem in my case was, that the org.eclipse.equinox.launcher_1.2.0.v20110502.jar must be unpacked in the plugins folder under the folder name: org.eclipse.equinox.launcher_1.2.0.v20110502
... hope that helps!
In my case the error The [RCP] executable launcher was unable to locate its companion shared library was because my path was too long.
Same issue I was facing from yesterday. Today, I have changed path of project(git clone) and build it and able to run RCP executable.
I think this issue was because of path too long.

JVM: could not open

Error - JVM - BlackBerry 9800
Simulator
--------------------------------------- JVM: could not open
C:\Users\Bayron.Tellez\Downloads\eclipse-java-helios-win32\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator\Java\net_rim_bis_lib.cod
My friend installed Eclipse with the Blackberry simulator. I'm assuming it was a portable installation because at no point we were prompted to install.
Now, he zipped it up and copied it to my machine when running I receive that error above. Obviously it's because it's trying to look for something on my friends directory. How can I change it to my path?
My path is:
C:\Eclipse\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator\Java\net_rim_bis_lib.cod
Where do I change this?
I would suggest not running eclipse from a copy of someone else's installation. This will probably contain lots of installation-specific files which are unlikely to match your machine.
Why not install it yourself, then install the Blackberry Java Developer plugin? It's available at http://na.blackberry.com/eng/developers/javaappdev/devtools.jsp
You can change the early installed paths of all .cod files from xml.manifest
[Eclipse Installed Path]\plugins\net.rim.ejde.componentpack7.1.0\components\simulator\[BlackBerry simulator version].xml.manifest
Eg:
C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components\simulator\9800.xml.manifest
Then remove the [BlackBerry simulator version].xml.manifest.bin file.
Now it should be work.
You may also want to check file Settings.rc,
found in the folder
PATH\plugins\net.rim.ejde.componentpack4.6.1_4.6.1.49\components\bin
first you have a path to your eclipse installation, and then corresponding Simulator you are trying to run.
hope this helps,
Use notepad++ to replace all occurrances of old directory into new directory in the eclipse directory.
Start the eclipse, and click clean simulator button.
That should be all.
Though it is not advisable to run a copy of eclipse, there is a very simple way for one to solve such a problem: it is by running the clean.bat file that is in the simulator folder of the specific component pack version folder. The path to that file would look like this: PATH\plugins\net.rim.ejde.componentpack[BlackBerry version]\components\simulator\clean.bat
I think that would do.
Still, installing a new version is the best option.
It will be better you install it yourself frsh rather than copying it from friends machine.
But you can give it a try.
Goto your eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29 directory and check do on of these files contain this path:
plugin.properties
plugin.xml
META-INF/eclipse.inf
.options
Or else you could grep for problem path in your plugin directory and replace same with updated path.
This error occurse cause your simulator have previously loadded application. Removing them solve your problem.
How to remove installed Java programs on the simulator?
Quote from Reset and clean the blackberry simulator:
Are you sick of having a million icons on your BlackBerry simulator for every HelloWorld and demo project you have every tested? Try this to remove old programs from the simulator and start with a clean ribbon. From the command line browser to your rim jde directory, switch to the simulator sub directory and run clean.bat. This program takes longer than you would expect (about 30 seconds or so on my 3 ghz machine).
UPDATE
Also delete all [app name].cod|cso|debug|jar files from simulator folder Also make sure projects you don't want on simulator are not active and are not in build configuration.

Android: Conversion to Dalvik format failed: Unable to execute dex: null

I'm trying to use the SmugFig SmugMug API on Android. It was designed for J2SE I would imagine, so I'm not sure it will even work on Android, but I figured it was worth trying as opposed to trying to create my own API.
When I load the project though, I get the following error:
Conversion to Dalvik format failed: Unable to execute dex: null
It doesn't say what package it fails on, just "Android Packaging Problem", but it did not do this before I added SmugFig and it's dependency JARS to the build path.
Where should I look? Or does this mainly me that it just won't work with those libraries?
I found a blog entry that says increase the memory allocated in eclipse.ini to this:
-Xms128m
-Xmx512m
or something higher, but this didn't do it for me.
However, I found another post that suggested doing Project > Clean and that fixed it for me.
I think it happens when you shut down Eclipse w/o shutting the emulator down first. Pretty lame bug. Spent a few hours digging for the solution this morning...grrrrrrr :-(
Go to Project » Properties » Java Build Path » Libraries and remove all except the "Android X.Y" (in my case Android 1.5). click OK. Go to Project » Clean » Clean projects selected below » select your project and click OK. That should work.
It is also possible that you have a JAR file located somewhere in your project folders (I had copied the Admob JAR file into my src folder) and THEN added it as a Java Path Library. It does not show up under the Package Explorer, so you don't notice it, but it does get counted twice, causing the dreaded Dalvik error 1.
Another possible reason could be package name conflicts. Suppose you have a package com.abc.xyz and a class named A.java inside this package, and another library project (which is added to the dependency of this project) which contains the same com.abc.xyz.A.java, then you will be getting the exact same error. This means, you have multiple references to the same file A.java and can't properly build it.
After the Eclipse DDMS update 8.0.0 came with the release of Android 2.3 this error suddenly appeared.
None of the above suggestions helped, but it turned out that the root of the problem was a referenced project (a few classes shared between the server and client sides).
Once I removed the project reference and built and included a jar of the once referenced project the problem ceased to exist.
Seems like something went rogue in DDMS 8.0.0 with referenced projects.
What worked for me was removing the android.jar reference in
Configure Build Path -> Java Build Path -> Libraries
Leave the Android 3.0 library reference.
its simply because of the Heap size occupied by some JAR files...which can be removed manually...
else the best option is to modify the Eclipse.ini file in the eclipse folder.....
add -Xmx1024m to the file to make the memory size to 1 GB ...it woul work for sure.....
Steps that help me to remove this error
remove user libraries(external libraries).
clean the project
again add the external library
build the project
run the project.
Hope this will be helpful to you.
Thanks.
http://groups.google.com/group/android-developers/browse_thread/thread/3911749addce534d
They are working on pushing a fix now for 2.3
Edit: This has been fixed for 2.3 , go get the update via eclipse.
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-XX:MaxPermSize=512m
-vmargs
-Xms512m
-Xmx1024m
works for me https://groups.google.com/forum/?fromgroups=#!topic/phonegap/yWePvssyiLE
Ensure you don't reference the same project within a jar and eclipse. For instance, you have a project called myproject in eclipse. Your android project references both myproject project and the jar generated from it. This will give an error when you try to dex as it tries to dex against the generated classes from myproject and from the myproject.jar
Only this solve my problem .Project > Clean
Here they suggest that these error is caused by huge .java files.
I had the same problem and incrementing the memory allocated works for me.
I helper to remove /home/user/.android folder.
OS: Debian Wheezy 32bit
Absolutely none of the previously mentioned "fixes" have worked for me, which comes as no surprise because they aren't even addressing the problem to begin with.
The bug itself stems from a conflict with Proguard. Here is the bug report: http://code.google.com/p/android/issues/detail?id=18359 And to fix it, you simply need to manually update Proguard: http://sourceforge.net/projects/proguard/files/latest/download?source=files
For projects which uses New Relic
Update New Relic via "Update New Relic" under Project r'click -> Update New Relic. This worked for me.

Categories

Resources