2

Introduction

One of the comments to this question is about using GnuWin's file command in order to check whether a program is using java or not. However GnuWin's file command indicates the following:

C:\Windows\system32>file "C:\Program Files\Eclipse Foundation\eclipse\eclipse.exe"
C:\Program Files\Eclipse Foundation\eclipse\eclipse.exe; PE32+ executable for MS
 Windows (GUI) Mono/.Net assembly

C:\Windows\system32>

while java is required in order to run programs, e.g. Eclipse, ApacheDS, Apache Directory Studio and Tomcat.

The discussion regarding this question resulted in a suggestion to ask a question at StackOverflow regarding the relation between .NET based programs and Java processes.

Question

Why does GnuWin's File Command indicate that certain programs are .Net based, while these require Java in order to run?

Community
  • 1
  • 1
030
  • 10,842
  • 12
  • 78
  • 123
  • Can you add the output of the file command with Apacheds? – barlop Jun 15 '14 at 13:28
  • And, say you kill off java.exe Then, When you run Eclipse, does it create an instance of java.exe? Same question with ApacheDS. When you kill off java.exe then run ApacheDS, does it launch java.exe ? – barlop Jun 15 '14 at 13:37
  • C:\Windows\system32>file "C:\Program Files (x86)\ApacheDS\bin\wrapper.exe" C:\Program Files (x86)\ApacheDS\bin\wrapper.exe; PE32 executable for MS Windows (console) Intel 80386 32-bit C:\Windows\system32> – 030 Jun 15 '14 at 13:47
  • C:\>tasklist | grep java.exe java.exe 5180 Services 0 65,896 K C:\>tasklist | grep wrapper.exe wrapper.exe 5484 Services 0 4,264 K C:\>taskkill /im java.exe /f SUCCESS: The process "java.exe" with PID 5180 has been terminated. C:\>tasklist | grep java.exe C:\>tasklist | grep wrapper.exe C:\Windows\system32>net start apacheds-default The ApacheDS - default service is starting.......... The ApacheDS - default service was started successfully. C:\>tasklist | grep wrapper.exe wrapper.exe 5220 Services 0 4,248 K C:\>tasklist | grep java.exe java.exe 6112 Services 0 65,796 K C:\> – 030 Jun 15 '14 at 13:59

1 Answers1

1

Eclipse.exe is not a java program: it is actually a native win32 executable that serves simply to locate and launch the JVM with appropriate commandline parameters and the path to the JAR file that contains the actual Eclipse java executable.

See for example http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Flauncher.html for full details.

DaveK
  • 26
  • 1