This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 586
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: 557
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?


Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 586
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: 19651
    
  18

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: 586
ok.what is the location of this eclipse default compiler?

thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

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: 18541
    
    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: 60774
    
  65

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: 586
thanks all.got the point
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    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?
 
Similar Threads
Hey Everyone :) question about J2SE SDK vs JDK
what's JRE for ?
problem with serial communication in java
JRE Question
JVM and JRE