Java Control Panel doesn't want to save JRE changes? - java

I'm trying to add some runtime parameters to the Java Plug-In so that I can debug an applet in my browser. I go to the Java ControlPanel, click the Java tab, and click "View..." and add the runtime parameters. After I click OK and close everything, it doesn't work. So I go back to the Java Control Panel, and the changes I just made are gone!
Has anyone else seen this? What's going on? Is this broken?

On Vista with UAC enabled?
Find the "Command Prompt" in the Start menu.
Right click on it.
Select "Run as administrator"
Click "Continue"
Run C:\Program Files\Java\jre6\bin\javacpl.exe (adjust to wherever you have Java installed)
Make your changes.

Related

Eclipse doesn't remember last run program

After I have run a program usually I can run it again by clicking on the big icon. But not on one certain workspace I have. (When I open the tooltip the name of the program is displayed too but again not here). Does anyone know what happened to this workspace?
After clicking the icon this window just opens
Go into the preference window. Then go into Run/Debug -> Launching and check "Always launch the previously launched application"

How can you manually find the Java Development Kit when setting up Android Studio on a PC running Windows 8.1?

I visited the link that is shown by Android Studio. But they did not have that exact version of the JDK. I installed what I could find for Windows. I thought I picked the correct file but still getting an error. What am I missing here?
This is a screenshot of what I tried
What I think possibly happened here is that your Path is not appropriately specified in Environment variables.
Follow the steps and your problem should be fixed:
Cancel the installation (For now)
Open up the Control Panel
Go to the "System and Security section"
Click on "System"
On the top left corner, it should say something like "Advanced System Settings". Open that up, and type in a password if necessary.
Under the "Advanced" tab, click "Environment Variables"
Under the "System Variables" section, scroll down until you find a variable called "Path"
Select it, and click the edit button.
DO NOT delete or touch anything here yet, but instead try to find a location that says something like: "C:\Program Files\Java\jdk1.7.0_40\bin;"
If you do find that, ONLY EDIT the "jdk1.7.0_40" to what your current JDK is. For example, if I had the same JDK as you, 1.7.0_79, the location would be changed to "C:\Program Files\Java\jdk1.7.0_79\bin;"
Save and exit out of all the windows we opened.
Restart your installer, and it should work!
Good Luck!

Can not press "run" in Intellij idea

I have updated my Java recently and since then i can not press "run" (the green arrow) anymore.
I tried to reinstall Intellij but it did not work.
Try right-clicking within the file that contains a main method, and click "Run CLASSNAME.main()". That should generate a run configuration for the file that will let you use the green play button.

Error with the java command (jvm.cfg)

I'm trying to install phonegap and the Android platform guide says
You may also need to enable Java and Ant. Open a command prompt and
type java, and also type ant. Append to the PATH whichever fail to
run: ;%JAVA_HOME%\bin;%ANT_HOME%\bin
But when I do so, I get:
C:\Users\Phillip>java
Error: could not open `C:\cf_dev\JDK\lib\amd64\jvm.cfg'
I'm not sure where cf_dev came from, but apparently it's causing java to not run correctly from the command line.
From the Phone Gap Documentation:
To modify the PATH environment on Windows 7:
-Click on the Start menu in the lower-left corner of the desktop, right-click on Computer, then click Properties.
Click Advanced System Settings in the column on the left.
In the resulting dialog box, press Environment Variables.
Select the PATH variable and press Edit.
Append the following to the PATH based on where you installed the SDK, for example:
;C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools
The answer is to uninstall Java and reinstall it.

Debugging with Eclipse using multiple windows

I usually run a dual-monitor setup, so I have two Eclipse windows open for the same workspace, displaying different files. When I'm debugging and a breakpoint is hit, Eclipse switches to the "Debug" perspective, but it also shows the file/line where the breakpoint is in both of my windows. This occurs even if the file containing the breakpoint was open in one window but not the other (before the breakpoint was hit).
This is really annoying.
How can I have Eclipse only show the file containing the breakpoint in one window? Ideally, it would choose which window based on where the file is open already. If it's not already open somewhere, I don't really care which window it pops up in.
You can create another workspace and in that workspace create a new project from the same src code (same files in file system) of the one in your current project in your current workspace.
That would let you stop on one breakpoint without the other window stopping their too.
Notice that after you make some code modifications in one project you'd have to refresh the other project for those changes to apply in it.
Eclipse switches to the debug perspective for all windows the debug perspective has been opened once (i.e. the little icon on the right top corner is available). If you close that perspective (switch to another perspective is not sufficient), it won't switch to it anymore on that window.
At least, that's the behaviour I observed on Kepler (I know, that question is older but just came across, maybe it still helps someone).
This worked for me:
In Window->Preferences->Run/Debug->Launching->Launch Configurations enable "Apply window working set(s)"
Personally I find this more efficient than creating two workspaces.
Closing the Debug perspective (righ-click on the little icon on the right top corner) worked for me.
I'm using Oxygen and I have the following settings in the Run/Debug Preferences:
Open the associated perspective when launching: Never
Open the associated perspective when an application suspends: Prompt
Maybe you select the sources for Debugging by "File System Directory" instead of by "Java Project". To change this go to Run=>Debug Configuration=>Add Sources=Button: ADD...=>Java Project and select your Projects.
Make sure, that the added sources are found first by moving them to the top.
To disable multiple debugging in multiple windows in eclipse, go to Windows > Preferences > Run/Debug and uncheck Activate the debug view when a breakpoint is hit

Categories