LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   on Linux , running Eclipse crash my program. (https://www.linuxquestions.org/questions/linux-newbie-8/on-linux-running-eclipse-crash-my-program-4175532959/)

RuijunFan 02-03-2015 12:38 PM

on Linux , running Eclipse crash my program.
 
Hello,
I have a program running on my Linux server , working fine ,
but when I launch Eclipse by typing :eclipse & , memory crash happened , in other word ,core dump on my program.

if I launch Eclipse using other way, java -jar /usr/lib64/eclipse/plugins/org.eclipse.equinox,launcher_1.1.0.v20100507.jar -clean -showSplash my_code_folder -vmargs -Xms384m -Xmx1024m &
my code and eclipse work fine .

I am new with Eclipse, anybody has any idea about this?

Thanks in advance.

Ray

rtmistler 02-06-2015 07:37 AM

If you received a core file you could try to use gdb to analyze that core file:
Code:

$ gdb eclipse core
##  Bunch of stuff printed as gdb loads up
gdb> bt  --> the 'bt' command in gdb will print the stack back trace as
            best as it can and maybe this will show you something about
            why it crashed, you can post the outcome of that for opinions
            here if that helps

It will likely be difficult to do much more than that analysis without the specific code that eclipse was built with. Sure you can download the eclipse source, but nothing saying it will match the executable which you're using.

The other thing is that using java to run it is vastly different from running an executable.

Actually: What is eclipse running from? If you give it the "which" command is eclipse somewhere in your system, is it purely an executable file, or is it a symbolic link?

The case may be that it was not intended to be run from the shell as you're doing, even though you have that allowance. Or that it requires arguments and it's poorly constructed so that when you don't give it arguments, it has a crash.

RuijunFan 02-06-2015 08:41 AM

Hello
Thanks
Could you tell me more about below?
using java to run it is vastly different from running an executable.

Probably this could shed some light on mycase.

Thanks.
Ray

rtmistler 02-06-2015 08:50 AM

Not sure if this is a fully correct description, but Java is an interpreted language, therefore when you invoke Java and pass it the name of a file, that file is usually a set of instructions or pre-interpreted commands which only the Java engine, also known as the Java Virtual Machine (JVM) can properly interpret and run. This behavior also makes Java somewhat more portable from platform to platform because the idea is that the Java engine has been compiled and installed to run on your current OS and machine, but the way it accepts instructions for interpretation and running is intended to always be the same. So a given Java applet should be able to run on any machine which has Java properly installed. Meanwhile taking something which is a Java applet and trying to execute it directly will likely end up not working at all, or so badly that you may end up with a core dump. I'm guessing that the core dump may have been from the shell itself, but just a guess.


All times are GMT -5. The time now is 01:12 AM.