About eclipse failed to create when you open Eclipse solution for Java Virtual machine and locking is not possible in the directory problem

Source: Internet
Author: User

Today, when using Eclipse on the machine to open the discovery of these two issues, through the data worship the Great God blog to learn the solution, so to organize, to facilitate later encounter this problem of small partners.

When I first opened Eclipse 1, problem 1 resolved and then there was a problem 2.

1. Problem 1 phenomenon (Eclipse failed to create the Java Virtual machine)

2. Problem 1 Workaround

This is the creation of a Java Virtual machine initialization failure, find the Eclipse decompression path, and initialize the file

Open With UltraEdit, click "No" or "cancel" when the case is displayed.

Appears as shown, this time the number in the circle is changed to show 1/2 (for example, the original value of 512 is changed to 256, the original value of 256 is changed to 128, etc.), note that some experience (http://jingyan.baidu.com/article/ afd8f4de466baf34e286e917.html) some know (http://zhidao.baidu.com/link?url=dRzVjFMK_ 2mw1smnulh4dikemv3yldqhpabov3vkrdfkt8ne_wmv50yiy3vsdu8gqoicaktgrgnfaoqw4uxoya) are listed in the

method does not specify how to change, different versions of the initialization file content is different.

The file is changed as shown (where the changes are made in the red circle)

Save later to reopen eclipse to perfectly solve the "Eclipse failed to create the Java Virtual Machine" issue.

3. Question 1 Workaround reference

Thanks to this blog blogger (http://blog.csdn.net/yuanfei_1988/article/details/5919168) but the blogger just changed the current value to 1/2 for the first two, but

I didn't fix the problem in this way, so I changed the 4 values, which worked.

The following is quoted from the above blog:

--------------------------------------------------------------------------------------------------------------- -------------------

The virtual machine allocates memory limit settings for Java permanently generated objects (permanate generation) such as class objects, method objects, and these reflective (reflective) objects.

Description: PermSize and MaxPermSize indicate that the virtual machine allocates memory limits for these reflective (reflective) objects, such as the Java permanently generated object (Permanate generation), which are not included in the heap memory area.

-xms128m
Represents the JVM heap (heap memory) minimum size 128MB, initial allocation
-xmx512m
Represents the maximum allowable size of the JVM heap (heap memory) of 256MB, on demand.

-XX:PERMSIZE=64MB minimum size, initial allocation
-XX:MAXPERMSIZE=256MB maximum allowable allocation size, on demand
Too small will cause: Java.lang.OutOfMemoryError:PermGen space "

--------------------------------------------------------------------------------------------------------------- ---------------------

4. Question 1 Another solution (seemingly catching the root of the problem)

Thanks to @wucccsk and @justdonow for another solution that was given in this blog (http://blog.csdn.net/yuanfei_1988/article/details/5919168) Comment area and made a corresponding explanation, as follows:

Personally, if the machine already has a JDK, it's better to add the full path to the JVM in Eclipse.ini. If you do not set the VM option, it is possible that eclipse will use its own Java Virtual machine, which will require more memory than the default 256m limit, which is why ...

Finding another solution is to add the full path to the JVM in Eclipse.ini:
-vm
D:\Java\jdk1.6.0_29\bin\javaw.exe
----------
Note that the placement of this parameter, I placed at the bottom of the file or not, put on the-vmargs parameter above it.

PS: This method of my wood has tried, as the above method can not solve or the problem may be selected when this method is resolved.

--------------------------------------------------------------------------------------------------------------- ----------------------

But just as I was happily ready to open my beloved eclipse at the beginning of my bitter learning time, I found that another problem followed, mother egg =

5. Problem 2 phenomenon (locking is not possible in the directory)

Its specific phenomenon is as follows:

6. Problem 2 Workaround

Still find and open the Eclipse.ini in Eclipse directory according to the problem 1 workaround

Add this phrase at the end of the document: "[Email Protected]/.eclipse" (note added in quotation marks)

As shown in the following:

Inside the circle for new additions.

Last save, re-open eclipse perfect fix!

7. Question 2 Reference

(1) Some experience: http://jingyan.baidu.com/article/a17d52853a90998099c8f249.html

(2) Some bar paste: http://tieba.baidu.com/p/3032965697 (6 floor)

Inside The Eclipse directory you can find a Eclipse.ini file. There can put the VM arguments, although the one suggested by Eclipse won ' t work.
My Environment started working with this one:
-dosgi.c[email Protected]/.eclipse
This is the user inside the environment that run the Eclipse program, would create a different. Eclipse directory inside The particular home, with full rights and zero problems.

Ah! Finally, you can study smoothly!

About eclipse failed to create when you open Eclipse solution for Java Virtual machine and locking is not possible in the directory problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.