Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20529
54
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse comes with its own compiler.
 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.what is the location of this eclipse default compiler?

thanks
 
Rob Spoor
Sheriff
Pie
Posts: 20529
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the location of the Photoshop Unsharp Mask?
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks all.got the point
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic