File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Why am I able to compile and run java programs without JDK with just JRE? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Why am I able to compile and run java programs without JDK with just JRE?" Watch "Why am I able to compile and run java programs without JDK with just JRE?" New topic
Author

Why am I able to compile and run java programs without JDK with just JRE?

Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 644
I am able to successfully compile and Run java programs ecliple but I do not have JDK I just have JRE.My Java_Home env var is pointing to JRE Bin...

Now JRE is java runtime env required for running java but it does not have Complier which should be in JDK but when I dont have JDK how am I able to compile.??
Greg Brannon
Bartender

Joined: Oct 24, 2010
Posts: 560
How do you know the JDK hasn't been installed? If you drop to a console or command window and type,

javac -version

followed by a <return>, what is the response?


Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 644
If I do javac i get-javac not recognized as intrnl or extrnl command...

actually i have only downloaded eclipse and am ABLE to compile and execute Java and web applications successfully.

But How? when there is no JDK
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19696
    
  20

Eclipse comes with its own compiler.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 644
ok.what is the location of this eclipse default compiler?

thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19696
    
  20

I think it's the eclipsec.exe file inside the Eclipse folder, but I don't know how to explicitly call it outside of Eclipse.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Monica. Shiralkar wrote:ok.what is the location of this eclipse default compiler?


When you have an application which has a number of features, it doesn't make sense to ask about the "location" of those features. At least it doesn't make sense to me.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

Where is the location of the Photoshop Unsharp Mask?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Yes, IDE's comes with their own compilers. At least with old version as the default. There is nothing you can do with finding the compiler location. You can't access it and compile stuff manually without the IDE.


Are you better than me? Then please show me my mistakes..
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 644
thanks all.got the point
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

Rob Spoor wrote:I think it's the eclipsec.exe file inside the Eclipse folder, but I don't know how to explicitly call it outside of Eclipse.

No, that is not the compiler. That is a variation of eclipse.exe which opens a command prompt window. I often use it when invoking Eclipse within a script.

The Java compile is a bunch of Java code (a set of classes), not an executable. In the JDK, that code appears in tools.jar. In Eclipse is looks like the compiler classes are in the org.eclipse.jdt.core_*.jar file.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why am I able to compile and run java programs without JDK with just JRE?