• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse: my JVM is gone

 
Ranch Hand
Posts: 271
6
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys,

So I was working on eclipse all good until one time I am trying to test my app and I get the error my main is not found, switched to my main method and tried launching again since I know this is normal. And I got the same issue, so I decided to restart eclipse, however, when I tried relaunching eclipse I get the following error window




How did my JVM disappear while I was working and what do I do to fix it? Help please I am panicking. Like literelly!!
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happens when you feed the usual instructions:-
java -version
javac -version

at the command line? Are you finding a JVM at all?
 
Yosuf Ibrahim
Ranch Hand
Posts: 271
6
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nop, nothing
here are my results:


 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yosuf Ibrahim wrote:Nop, nothing
here are my results:



Well... it was Eclipse that failed. For all we know, the command line PATH was never setup....

Anyway, can you show use the directory where Eclipse failed to find the JRE?

Henry
 
Yosuf Ibrahim
Ranch Hand
Posts: 271
6
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:

Yosuf Ibrahim wrote:
Anyway, can you show use the directory where Eclipse failed to find the JRE?
Henry



I see your point, it's not there:l

https://gyazo.com/c23b03361572cb729b88056d6af50ace

But why. I mean I was working on it one min the next its gone

 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yosuf Ibrahim wrote:
I see your point, it's not there:l

But why. I mean I was working on it one min the next its gone



Well ... not so fast ...

Campbell is correct, in that Eclipse, by default, uses the Windows PATH to find the JVM to start. However, you don't have a PATH setup, and yet, Eclipse still tries to search a location.

This means that you most likely have a VM setup in the eclipse.ini file, and for some reason, that file got corrupted.  Did you reboot the box, or something similar, while eclipse was in the middle of something?

Henry
 
Yosuf Ibrahim
Ranch Hand
Posts: 271
6
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nope, the only thing I did was install visual studio 2017. Could that be the reason files got messed up?
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yosuf Ibrahim wrote:. . . Could that be the reason files got messed up?

Probably not, but I am not sure. Try the following instruction:-
echo %PATH%
and see what happens. We have reminders about setting the PATH in our FAQ. I expect that will cure your problem, but if it doesn't, do ask again.
 
Yosuf Ibrahim
Ranch Hand
Posts: 271
6
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Yosuf Ibrahim wrote:. . . Could that be the reason files got messed up?

Probably not, but I am not sure. Try the following instruction:-
echo %PATH%
and see what happens. We have reminders about setting the PATH in our FAQ. I expect that will cure your problem, but if it doesn't, do ask again.



It worked, I got my eclipse back

Thak you my saviours
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a pleasure
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way: When you went through your old PATH, was there anything to suggest Visual Studio had changed anything?
 
Yosuf Ibrahim
Ranch Hand
Posts: 271
6
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:By the way: When you went through your old PATH, was there anything to suggest Visual Studio had changed anything?



No idea to be honest
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yosuf Ibrahim wrote:
No idea to be honest



Weird. Considering that Eclipse went to a location that didn't exist *and* that the command line couldn't find it -- this means that the bad directory was added *and* the previous good one was removed. What could have done that?

Henry
 
Yosuf Ibrahim
Ranch Hand
Posts: 271
6
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:

Yosuf Ibrahim wrote:
No idea to be honest



Weird. Considering that Eclipse went to a location that didn't exist *and* that the command line couldn't find it -- this means that the bad directory was added *and* the previous good one was removed. What could have done that?

Henry



I did what the link said, installed the JDK and installed it in the eclipse folder so the path it could not find was found and it worked
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yosuf Ibrahim wrote:
I did what the link said, installed the JDK and installed it in the eclipse folder so the path it could not find was found and it worked



So... You don't know whether it was the INI file that got corrupted, or if there was a weird change to your PATH variable -- all you did was put a JDK at the previously wrong location? That is like getting the wrong directions to a Hospital, and the solution was to build a hospital...

Henry
 
Yosuf Ibrahim
Ranch Hand
Posts: 271
6
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:That is like getting the wrong directions to a Hospital, and the solution was to build a hospital...

Henry



That my day, you deserve a pie mate Cheers.

I did a whole PC search for any file that contains the ini and only found 2 other than the one I downloaded and both are in Visual studio 2017 directories

 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yosuf Ibrahim wrote:
I did a whole PC search for any file that contains the ini and only found 2 other than the one I downloaded and both are in Visual studio 2017 directories



The INI file for Eclipse is named eclipse.ini, and it is located in the same directory as the eclipse.exe executable.  By default, this INI file does not specified a JVM to run eclipse (as the JVM is loaded from the PATH). If the INI file specifies a JVM, it will be specified with the "-vm" tag in the file.

Alternatively, if the INI file is not specifying the location, you can look at the PATH variable. Is the PATH variable specifying the incorrect JVM location?

... And BTW, thanks for the pie ...

Henry
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic