Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (529)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Eclipse only seems to compile once per opening...  (Read 1533 times)
0 Members and 1 Guest are viewing this topic.
Offline CyanPrime
« Posted 2011-04-13 10:15:54 »

Alright, so I got this problem where eclipse only compiles a project once per opening of eclipse. I think maybe it has something to do with eclipse not knowing where my jre/jdk is? I tried uninstalling both java, and eclipse, and it's still doing it. Anyone know how to fix this? Or at least how to point eclipse to my jre/jdk?
Offline avm1979
« Reply #1 - Posted 2011-04-13 16:38:08 »

I'll go for the obvious:

Is Project -> Build Automatically checked?

Offline lhkbob

JGO Knight


Medals: 32



« Reply #2 - Posted 2011-04-13 17:12:23 »

Or can you look in your problems list and see anything about "Build Path Incomplete" or "Something missing on Build Path" or "Unable to build project, please fix ...".  The problems list is a view you'll want to open from the view menu.  But avm1979's advice is also a likely solution (but it wouldn't have unchecked itself so if that's the problem, you did it to yourself).

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CyanPrime
« Reply #3 - Posted 2011-04-13 18:57:01 »

It seemed to be cause I wasn't saving before I built?
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11


Game Engineer


« Reply #4 - Posted 2011-04-13 19:31:03 »

It seemed to be cause I wasn't saving before I built?
Yes, if the file is not saved then it is in RAM, not on the disk. And the files on the disk are the ones that are compiled.

See my work:
OTC Software
Offline CyanPrime
« Reply #5 - Posted 2011-04-13 20:03:36 »

But I think it use to auto-save when I built projects. Sad
Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #6 - Posted 2011-04-14 04:32:44 »

Start treating Ctrl+S as the compile shortcut Wink

Offline Maximus

Junior Newbie





« Reply #7 - Posted 2011-04-14 05:32:19 »

Select project, then Project > Properties, ensure that Builders has Java Builder selected and Java Build Path has the right JRE. Maybe a conflict between multiple JREs installed o.O?!

Do Start > type "cmd", > type "java -version" to see which version of java you got on the path. Remove all but this one from your Java Build Path. Any luck  Huh ?

\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0020\u0022\u004D\u0061\u0078\u0069\u006d\u0075\u0073\u0022\u0029\u003b
Offline Roquen
« Reply #8 - Posted 2011-04-14 07:03:15 »

Yes, if the file is not saved then it is in RAM, not on the disk. And the files on the disk are the ones that are compiled.
Minor correction.  Effectively this is what you see, but not what happens under-the-hood.
Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #9 - Posted 2011-04-14 07:13:09 »

What exactly happens under-the-hood?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Roquen
« Reply #10 - Posted 2011-04-14 09:36:25 »

Eclipse has it's own compiler builtin.  So when you save, it basically signals to update the source and bytecode files on the filesystem.  As you type the frontend part works incrementally updating an intermediate representation (IR), which gives you all of the syntax & error checking.  I'm not sure when lowering to bytecode (and other stuff like weaving) occurs..if it's also incremental or only happens when you signal the commit (via saving).  So, the common misconception that eclipse uses javac in incorrect.  This is easy to see by having an error.  Javac will bail (not producing a class file), where the eclipse compiler will inject a code sequence to throw an exception if you hit it.
Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #11 - Posted 2011-04-14 19:41:59 »

Wow Eclipse is quite complex! Makes me like it even more Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (31 views)
2014-07-18 06:55:21

Zero Volt (27 views)
2014-07-17 23:47:54

danieldean (23 views)
2014-07-17 23:41:23

MustardPeter (24 views)
2014-07-16 23:30:00

Cero (39 views)
2014-07-16 00:42:17

Riven (41 views)
2014-07-14 18:02:53

OpenGLShaders (28 views)
2014-07-14 16:23:47

Riven (28 views)
2014-07-14 11:51:35

quew8 (25 views)
2014-07-13 13:57:52

SHC (61 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!