I can't seem to be able to debug a JNLP application with Eclipse. The problem I'm getting is very similar to that described in this SO question, i.e., javaws appears to be starting the VM twice. The first time it starts fine with the remote debugging options and provided I use the suspend=y option I can even attach the Eclipse debugger to the VM, but as soon as it attaches the VM dies and javaws starts it again without the debugging options.
Here's how I'm launching the app:
javaws -J-Xdebug -J-Xnoagent -J-Djava.compiler=NONE -J-Xrunjdwp:transport=dt_socket,address=8989,server=y,suspend=y http://myserver/launch.jnlp
Since I have suspend=y, whilst it's waiting for a debugger to attach I can use ps -ef | grep java to see the java process with all the correct options running. Indeed, I can connect the Eclipse debugger to it, but as soon as I do that the process terminates and javaws starts a new java process. If I subsequently do another ps I can see a new (different PID) java process now without the debugging options. Attempting to connect to this process from Eclipse just gives "connection refused".
I'm using Java 6 on Mac OS X Lion 10.7.3 if that makes any difference.
The author of the SO question I mentioned above says he solved the problem apparently by accident so the cause of the problem is not apparent (or I'm too stupid to get it).
Any ideas?
Check if you have more then Java 7 update 67.
If you do I know that oracle has open bug for this.
some how from update 67 and above there is problem with this.
I had the same problem. I roll back to Java 7 update 60 and now its working fine.
I suggesting to remove all Java installation and then install
Related
I am trying to run the JAR "buildtools.jar" but a message keeps popping up:
The Java JAR file "BuildTools.jar" could not be launched.
in smaller writing underneath:
Check the Console for possible error messages.
The console says
12/31/14 10:19:44.021 AM WindowServer[113]: _CGXGetWindowMovementGroup: Operation on a window 0x14 requiring rights 0x5 by caller Dashboard or 12/31/14 10:19:44.021 AM DashboardClient[2747]: _NXMoveWindow: error moving window (1000)
every time I try to open the jar thing up. I know that my Java is updated because I updated before trying anything with this.
I am trying to create a minecraft server with spigot and if you have a step by step process or any hinters about please tell me but my main focus is opening up the jar.
Unfortunately this isn't the very right place to ask this question. You can ask this question at the Spigot Forums.
Are you using the very latest version of BuildTools? You seem like running on MacOS. You may need to run it with this flag, -Dmac.supported=true(refer to this post). Also, The Java JAR file "BuildTools.jar" could not be launched. most likely, you have a broken Jar file. Try to re-download it from {1}(I need 10 population to post more than 2 links). You will also need JDK(Java Development Kits) but I think it is came by default in MacOS and Git {2}.
After you've installed all required things, you can run the BuildTools from Terminal by java -Dmac.supported=true -jar BuildTools.jar You need to wait few minutes for it to be finished.
Now i know that this question has already been asked before. But I ve tried all of the solutions provided there.
Suddenly eclipse got hung and continuously showing DDMS post create init in progress bar.
I've tried deleting .lock file, cleaning eclipse, closing eclipse, killing adb.exe, re installing sdk.
Is there any other possible solution to resolve this issue. I am dead stuck. Please help!!
My configuration: Win 7 (64 bit) + Eclipse Juno + Java 1.6
This just worked for me (I've been dealing with the same issue off and on for a while now)
Close eclipse if you already have it open.
make sure all adb.exe processes are killed using task manager
launch a cmd shell
in the shell, run:
set ADB_TRACE=1
adb devices
launch eclipse
Notes for step 4 -
I first tried this without ADB_TRACE=1 and my adb process froze before listing any devices. Why it works with ADB_TRACE debug output is beyond me, but it seems much more consistent with it enabled. Note: many adb commands start the adb.exe service, keep that in mind in case you need to kill it again.
Notes for step 5 -
Because the command adb devices started the adb service, eclipse attaches to that non-hanging service. If you are still having trouble, try all the steps again but this time launch eclipse with administrator privleges.
Hope this works for you!
For me, the cause of the problem was that adb default port, 5037, was in use.
You can check that with
netstat -a -o | find "LISTENING"
where last column is PID.
I have a single application which will cause eclipse itself to hang when run via eclipse. If I export this application as a jar and run it it works fine. But if I run (or debug) it the application will appear to start (according to ps) and run; but eclipse itself will hang, and is reported as a 'stopped' program with no CPU or memory usage. I've placed a breakpoints on the first line of this application and it doesn't even get there before eclipse ends up stopped. If I forcefully wake eclipse out of stopped state it will work; but it will also lose it's connection with the program I started. My program I want to debug will continue running but eclipse can't control or kill it after I resume the stopped eclipse.
I can run plenty of other applications without issue from eclipse. Oddly I had this issue before, then I could run my application for a day, and now I'm back to the original issue. I don't know what changed between those that would matter.
Can anyone suggest what may cause this or how to repair it?
UPDATE:
I did some more linux magic. It seems that eclipse is stopped while waiting for the command:
sh -c stty -lcanon min 1
It also seems that before that there was a sh (defunct) command which also hung without being reaped for a few minutes which I think was keeping eclipse from running properly; the sh (defunct) finally goes away if I wait long enough; but then the sh command I just linked comes up. I don't know what the original defunct SH command was; I can't do ps fast enough to catch it before it goes defunct. Both issues occur only with eclipse; as a jar file this program runs perfectly fine.
My running assumption is that eclipse isn't getting or handling the sigchild correctly? that would explain the sh (defunct) application at least. It doesn't explain the current SH command which doesn't show as defunct; despite it being something that should execute in seconds?
UPDATE 2.0:
I found this link: http://linux.about.com/od/srl_howto/a/hwtsrl13t04_3.htm basically stty is known to hang when it uses the < /dev/tty syntax; which is why the syntax is deprecated and replaced with a newer syntax. I'm pretty sure this is the problem. Sadly I have no way of figuring out what library is using the deprecated command. I think this all started with the ConsoleReader being constructed; but who knows what code actually ran the command that freezes? also, it seems if this was that broken anyone running consoleReader from eclipse on a linux environment would have the same problem; which I think is safe to assume isn't the case or it would be documented all over the net; so maybe my understanding is still off?
It is related to the configuration of the stty process that is created to attach the console and hence will occur only on UNIX like systems. Seems fixed on current 2.11 jline version.
To bypass the problem you can disable the special unix-terminal capabilities using:
-Djline.terminal=none
as VM argument on the eclipse launch configuration.
Try increasing -Xms<abc>m/-Xmx<efg>m (depending on the system memory) on eclipse.ini in the root directory of eclipse installation.
The problem was that we were using an older version of 'jline' which used deprecated functionality. The new jline jar fixed the problem, as it no longer used the deprecated stty calls. I'm not quite certain why eclipse caused this to happen every time; it seems as if it should be an intermittent error, but jline was definitely the cause.
I am doing some Java development on Windows 7 x64 running inside VMWare Fusion 3.x (OSX). I have installed JDK6 (update 26), set JAVA_HOME to the path (no trailing slash), and restarted my command prompt.
I can successfully launch the program. During startup it runs the calibration and then fails with this error:
"Could not create directory\VMWare-host\Shared Folders\ .nbprofiler" (no space after that slash but the markup was hiding the period)
I can click to continue, but when I'm in the program I cannot do CPU or Memory profiling. I throws up a similar error box:
"Error retrieving saved calibration data for target JVM: Could not create...(same as earlier)"
Once upon a time I had this working by passing the --userdir flag and -J-Dnbprofiler.home during startup, but that trick isn't working anymore.
(The complete command was:
jvisualvm --userdir c:\Users\myname -J-Dnbprofiler.home=c:\Users\myname
)
How can I force jvisualvm to save its calibration data on a "real" drive instead of the vmware network drive and get this working?
.nbprofiler directory is derived from user.home system property. I am not sure what you did to Windows installation, but your user.home points to directory\VMWare-host\Shared Folders. So one solution is to fix the Windows installation, so that Java recognize c:\Users\myname as your user home directory. If that fails for some reason you can use nbprofiler.home property to override it, as you correctly wrote. However you should point it to the nonexistent directory, so you should start VisualVM with the following commandline:
jvisualvm -J-Dnbprofiler.home=c:\Users\myname\nbprofiler --userdir c:\Users\myname\visualvm_userdir
One last note, even if the profiler part is not working, you should be able to use sampling in the 'Sampler' tab.
Try disable Sharing for the VM.
It works for me with Windows 7 x86 in Fusion with Sharing disabled (and Sharing is the mechanism providing the folder you cannot write to).
I found the following command works for me.
visualvm -J-Duser.home=%HOME%
Also, I needed to add -Duser.home=%HOME% to my app startup command.
I had defined nbprofile.home and userdir, but I was still getting an error when the Profiler was running against my app: Profiler Agent Error: Could not create directory\vmware-host\Shared Folders.nbprofiler.
I discovered that the Profiler was using user.home defined by my app rather than the one with visualvm. Both seem to be needed.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need help with this. It started with me trying to update Java & when I tried
this is the message I got:
"ERROR 1723: There is a problem with this Windows Installer Package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor."
I've already tried deleting Java 6 update 14, but it won't allow me to, oddly enough I get the same message. What can I do?
I had the 1723 problem (Windows 7) when attempting to uninstall JRE 6.30. I don't think the version matters for this error. I believe it is caused by having multiple version of Java installed at the same time. When uninstalling one of them it removes some file needed to uninstall the other versions and you are left in a state where you can't reinstall or uninstall the JRE. I used the Microsoft FixIt tool [stand alone download here]. I created the portable fixit and then ran on my local machine. The tool has a list of fixes and you need to find "Fix problems with programs that can't be installed or uninstalled" and click "Run Now". The wizard is self-explanatory and after running will show something similar to this:
Once you see this, double check your control panel that the JRE was actually uninstalled (and attempt to install if desired).
Have a look at this post for additional information about solving this issue.
Update:
Here is the brief summary of the original Problems with Java installation discussion.
Sometimes, when you attempt to run the java installer file you receive the message:
This software has already been installed on your computer.
Would you like to reinstall it?
When you click Yes to the above question you receive the error:
This action is only valid for products that are currently installed.
This problem is caused because the Windows Installer information for a previous installation of Java has been removed or damaged, but the related registry keys are still present causing the Java installer to think it is already installed.
To fix this issue you should do the following:
If you are able, uninstall all previous versions of Java in add/remove programs in your control panel.
Next, you may download the current version of Java
It's recommended that you use the offline installer version.
Run the following commands in cmd:
_
reg query hklm\software\classes\installer\products /f "java(tm) 6" /s | find "HKEY_LOCAL_MACHINE" > deljava.txt
for /f "tokens=* delims= " %%a in (deljava.txt) do reg delete %%a /f
del deljava.txt
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\wow6432node\JavaSoft\Java Runtime Environment" /f
I had a similar problem on my Windows 7 box where I was trying to uninstall Java and do a clean install of a newer version. Something got messed up and I would get the 1723 error message during the uninstall and attempted reinstall. Here's information about how I was able to fix the problem, and maybe this will help you:
Look at the log files for the uninstall/reinstall. On Windows 7 they can be found at c:\users\username\AppData\Local\Temp\
The java_install.logdidn't show any extra information, but I had several MSI##### log files that contained error messages about the failed uninstall. The message was: Error 1723.There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action UninstallJRE, entry: MSIUninstallJRE, library: C:\Program Files\Java\jre6\bin\regutils.dll
There was indeed no regutils.dll file, and not even the bindirectory was there. So I copied over a regutils.dll file from another computer, ran the uninstaller, and it worked. Then the new clean install of Java also worked.
So take a look at your logfiles and hopefully that will give you more detailed information about the 1723 error.
I guess this should be asked in superuser.com but I don't have enough reputation to move it.
Anyway, the installation package comes as a msi file, correct? If so you can try to run msiexec with log enabled.
Best
One way (only way which worked for me - i tried most of the things listed in this post, including MockerTims script) was to search through Windows Registry for Java and then carefully remove anything that seemed to point to the specific JRE version i wanted to remove.
Steps are roughly as such:
Hit Windows button and type into the search field "regedit". Pick the result of the search, which is regedit.exe.
Select the top of the tree and hit CTRL + F.
Type in Java to 'Find what' field and hit enter.
Manually go through every found object (hit F3 to proceed to the next item).
If the item is referring to the JRE version you want to remove, then delete the entry. Otherwise leave it be and continue on to the next item.
I have tried all of the tricks stated above and nothing was able to resolve my problem. Changing the path way, registry being corrupted, few dlls weren't able to be deleted and so on and on... I used Fixit and deleted whatever I saw with the name JAVA. I tried installing GRE/JVM separately, nothing worked what so ever.
Solution..
http://www.java.com/en/download/help/windows_offline_download.xml
Use offline install of JAVA or some people call it silently install JAVA. This fixed my problem that I couldn't fix in two days.
After this I was able to install eclipse without getting any pathway error message, or dll related messages.