Eclipse java ошибка

Your version of Eclipse is 64-bit, based on the paths and filenames.
However, the version of Java that it’s picking up is 32-bit, as indicated by where it is coming from, on this line:

-vm C:Program Files (x86)Javajre7binjavaw.exe

Program Files (x86) is the folder where 64-bit Windows places 32-bit programs.

Program Files is the folder where 64-bit Windows places 64-bit programs.

This can happen when a system has more than one JVM installed, as is often the case on Windows 64-bit (for example, the JRE download page uses the bit-ness of the browser to determine what bit-ness download to offer you, and many people use(d) 32-bit browsers even though they run 64-bit Windows).

The best way to fix this, assuming you do in fact have 64-bit JRE or JDK on your system, is to specify in eclipse.ini exactly which JVM you want it to use. The instructions are detailed in the Eclipse wiki page, but basically you have to specify the -vm option in the ini file — make sure to read the wiki page carefully as the format is very specific.

Specifying the JVM path in eclipse.ini is strongly recommended because doing so isolates Eclipse from any potential changes to your system PATH that some program installers might make (I’m talking to you, Oracle!).

Another option would be to download and use 32-bit Eclipse instead of 64-bit, but it’s still strongly recommended to specify the path to the JVM in eclipse.ini.


Left for historical reference:

To check your version of Java, run

  java -version 

in a console (command prompt). On Windows 7 with 64-bit Java 6 I get:

  java version "1.6.0_27"
  Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
  Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)

Note the 3rd line, which shows that this is a 64-bit version.

On a 32-bit version you’ll get something like:

  Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing) 

If you are on a 64-bit machine, then you can install the 64-bit JDK and uninstall the 32-bit one. For instance on Windows 10, just go to Settings and under Apps, you will find Java. Click on it and you will find all the different versions. Now you can select which one to uninstall.

Наверняка многие из вас сталкивались с ошибкой запуска Eclipse:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:Program Files(x86)Eclipse Classic 4.2.2jrebinjavaw.exe javaw.exe in your current PATH

Эта ошибка говорит нам о том, что Eclipse не может найти путь к Java Runtime Environment или Java Development Kit. Сейчас я вам расскажу причины возникновения такой ошибки и способы ее устранения.

В Интернете многие советуют добавить путь к файлу javaw.exe в переменную окружения Path, но этого не стоит делать. Нет, не потому что можно что-либо сломать, а потому что появится другая ошибка:

Failed to load JNI shared library «Program Files (x86)Javajdk1.6.0_20jrebinclientjvm.dll»

Дело в том, что для работы Eclipse требуется виртуальная машина и внимание: именно той разрядности (x86 или x64), которую имеет установленная версия Eclipse. Другими словами, если у вас установлен Eclipse для платформы x86, то для запуска этой IDE требуется наличие установленной виртуальной машины для платформы x86.

Итак, когда вы определились с разрядностью Eclipse, вам нужно скачать виртуальную машину. Для этого, зайдите на сайт www.java.com/en/ и вверху страницы вибираем ссылку «Download», затем на открывшейся странице жмем ссылку «See all Java downloads» и скачиваем Java именно той разрядности, какой разрядности у вас Eclipse.

Если вы все сделали правильно, после установки Java, Eclipse запустится без каких-либо ошибок.

2013-05-19 20:06

Понравился сайт? Расскажи о нем друзьям:

Comments to Notes: 52

После некоторых манипуляций с установленными JVM, при запуске Eclipse, появляется окно с ошибкой , текст которой начинается с «Java was Started but Returned Exit Code=13». Решения проблемы нашёл в заметке http://www.ashout.com/fix-java-started-returned-exit-code13-eclipse/ большое спасибо автору. У себя оставлю перевод.

Если вы получили ошибку “Java was Started but Returned Exit Code=13” во время установки Eclipse, то здесь вы поймете как решить её. Даже я столкнулся с этой проблемой в процессе установки Eclipse на операционной системе Windows. После поиска в Google я понял что многие сталкиваются с аналогичной проблемой в Eclipse. Если вы один из них, то здесь есть решение этой ошибки.

Причина ошибки “Java was Started but Returned Exit Code=13”

Прежде чем приступить к решению, давай те узнаем почему возникает эта ошибка. Если вы знаете почему возникает проблема, вы можете легко её решить.

Причина 1: Основная причина возникновения проблемы это установка разных версий 64 bit или 32 bit программного обеспечения. Это может быть Eclipse или Java.

Причина 2: Ошибка конфигурации в файле Eclipse.ini.

Причина 3: Специальные символы (#, !, @) в директории установки Eclipse.

Причина 4: Вы можете использовать последнюю версию Eclipse, но неправильную или не поддерживаемую версию Java Virtual Machine (JVM).

Выше описаны основные причины возникновения ошибки «Exit code =13» в Eclipse. Теперь мы узнаем как её решить.

Как решить «Java was Started but Returned Exit Code=13 Error» в Eclipse

Решение для причины 1: Проверьте версию операционной системы в которой вы работаете. Для проверки откройте окно «Компьютер» нажав клавиши Win+E или найдя его на рабочем столе или в кнопке пуск.

Теперь в левой панели найдите «Мой компьютер» выделите его и нажмите правой кнопкой мыши. В выпадающем меню выберите «Свойства». Когда вы нажмете на «Свойства», вы увидите окно системных свойств. В этом окне посмотрите свойство «Тип системы».
В «Тип системы» вы увидите какая у вас система 64-х разрядная или 32-х разрядная. То что вам и нужно было узнать.
Теперь вы знаете в какой операционной системе вы работаете.
После того как вы узнали какая операционная система, вы должны убедиться что скачали соответствующую версию Eclipse, а также Java.
Если вы закачали 32-х разрадную версию Java или Eclipse (на 64-х разрядной системе), вы получите ошибку «Exit code=13 error».
Пожалуйста дважды проверьте версию того, что вы закачали. Потому что во время установки не появится какая-либо ошибка несоответствия версии. Установка пройдёт гладко.

В моём случае я скачал 32-х разрядную версию Java и получил эту ошибку.

Решение для причины 2: Возможно вы сделали ошибочную конфигурацию файла Eclipse.ini, который можно найти в каталоге Eclipse. Вы можете посмотреть это официальное руководство если нужно.
Отметим несколько важных правил для настройки -VM опций.

  • -VM опция и его значение ней (путь) должны быть на разных строках
  • Значение должно указывать полный абсолютный или относительный путь к выполняемым файлам Java(к каталогу bin), не к домашней директории Java.
  • -VM Опция должна быть до -VMARGS, так как все значения после -VMARGS передаются непосредственно в JVM.

Вы может использовать этот снимок с экрана для моей рабочей конфигурации Eclipse.ini.

Решение для причины 3: У вас могут использоваться специальные символы #, !, @ в установочном каталоге Eclipse. Если ваш каталог с установленной Eclipse содержит специальные символы, тогда появится эта ошибка. Поэтому убедитесь что вы не используете специальные символы.
Пример
До исправления специальных симврлов
C:# IDEeclipse 3.7
После исправления специальных символов в адресе
C:IDEeclipse 3.7
и решения проблемы.

Решение для причины 4: Может быть вы используете последнюю версию Eclipse и не поддерживаемую версию Java.

Для проверки версии Java нужно открыть командную строку нажав win+R и введя cmd и нажмите Enter. Теперь в консоле введите java -version, что бы узнать версию Java.

Теперь определите поддерживает ли Eclipse данную версию или нет.

Вы можете открыть каталог “readme” в каталоге Eclipse и открыть readme_eclipse.html что бы посмотреть какие версии поддерживаются.

Я рекомендую вам скачать последнюю версию Java и Eclipse.

Надеюсь вы решили проблему «Java was Started but Returned Exit Code=13 Error» в Eclipse после этой заметки. Дайте знать почему у вас возникла эта ошибка в комментариях.

I’ve been having some trouble with Eclipse acting strangely the last couple of days.

The first thing I noticed was Java projects I had recently created weren’t running from inside Eclipse. Projects would compile with no errors and the .class files are created and run fine from the command line, but hitting the run or debug button in Eclipse produced no action at all. Old projects would run perfectly fine.

Then the errors started showing up.

I get this error sometimes on start-up:
start up error

I get this error every time I try to create a new Java project:
create java project error

Here’s the start of the log file (it’s 12000 lines of this, I can post more if you ask):

!SESSION 2013-02-14 09:11:35.296 -----------------------------------------------
eclipse.buildId=M20120914-1800
java.version=1.7.0_13
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

This is a continuation of log file C:Documents and Settingsteamworkspace.metadata.bak_0.log
Created Time: 2013-02-14 09:14:12.234

!ENTRY org.eclipse.e4.ui.workbench 4 0 2013-02-14 09:14:12.234
!MESSAGE Exception occurred while  unrendering:org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@67f9dcb7 (elementId: org.eclipse.pde.runtime.LogView, tags: [View, categoryTag:General], contributorURI: null) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView, object: null, context: null, variables: [], label: Error Log, iconURI: platform:/plugin/org.eclipse.ui.views.log//icons/eview16/error_log.gif, tooltip: , dirty: false, closeable: true, description: null)
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:859)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:839)
at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:368)
at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:127)
at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:76)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:107)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:70)
at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:170)

I tried starting up with a new workspace with no luck. Today I’ve removed Java and Eclipse and started with a fresh Java JDK 7u13 and a fresh Eclipse Juno 4.2.1 download again with no luck. I have no idea what I’ve done here. Any ideas on what is causing this and how to fix it? I’m running Windows XP Professional x64 Edition if it matters.

Eclipse is one of the best IDEs for Java and Android developers. There are many issues with Eclipse if it is not configured properly. One of the most common errors with Eclipse IDE is of the java exit code 13. It is common to get an error like Java was started but returned exit code=13.

For programming help you can checkout AssignmentOverflow.com

This Eclipse error is one of the most frustrating bugs to solve if you don’t know the correct method. Here I have enlisted some possible solutions for this error. You have to try all of them one by one.

If you want to hire a java developer, you can make use of online java test.

Method 1:

You may get this error if the versions of java and eclipse do not match. If you have installed 64 bit java jdk on your machine and 32 bit Eclipse IDE or vice versa, then you may get this error.

So, ensure that you have installed both the softwares with their correct versions. If you installed different versions, you will have to uninstall the softwares and install them again with the same version.

Method 2:

There are cases when you want to keep both the 32 bit version and the 64 bit version installed in your machine due to compatibility issue.

When this is the scenario, you need to correctly mention the path of the system variables in the Environment Variable Settings. You have to select either 32 bit or 64 bit in both the softwares i.e., Eclipse and Java JDK.

Suppose you select 32 bit versions, you need to go to the C drive in the JDK Folder of 32 bit version. Once you do that, you can copy the path and set it in the Environment Variable section. You won’t get the same error again.

Method 3:

Another solution to this error is by copying the Eclipse folder in the C:/Program Files folder. For some this may work. However, if it does not work, you should try putting the Eclipse Folder in the C:/Program Files (x86) folder.

We hope that at least one of the above methods will work in your system. You may have to try all the three methods. One of them will surely solve your error message “java was started but returned exit code 13”.

Method 4:

There are a lot of compatibility issues with Java 1.8 and higher versions. So, if you are not able to solve the error with the above methods, you can degrade to java 1.7 or lower version and check if the error is solved or not.

Method 5:

If you have 32 bit and 64 bit versions installed at the same time, you need to set the Eclipse to one version of Java JDK. It should be explicitly set by the user, otherwise the default version of Java will be used which may cause this Error Code 13.

The solution to this the manipulation of the eclipse.ini file. The eclipse.ini is located in the Eclipse folder. Open that file with notepad editor in windows.

You need to add the following code before the line that includes -vmargs in the eclipse.ini file.

-vm

C:Program FilesJavajdk1.7.0_40-64binjavaw.exe

The second line may be different depending upon version of the java jdk installed in your machine. If you have a 32 bit JDK version, it may be found in Program Files(x86).

Few important points to remember while configuring eclipse.ini file:

1. The Java File’s Path must be Relative Path or Absolute Path. It should not just point to the Java Home Folder.

2. The -vm option and its path should be on a separate line.

3. The -vm option should be before -vmargs option.

Here is the screenshot of an eclipse.ini file.

Fix Java was started but returned exit code=13 Error in Eclipse

Comment below if you are getting any difficulty to solve Java was started but returned exit code=13 error in eclipse. I will try to help you.

Понравилась статья? Поделить с друзьями:
  • Ecm 614b ошибка вольво
  • Ecm 614b volvo xc90 ошибка
  • Ecm 6100 volvo ошибка
  • Ecm 530d volvo ошибка
  • Ecm 5200 volvo ошибка