LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: Newbie introduction: teething pain  (Read 388 times)

JeffEvarts

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Newbie introduction: teething pain
« on: July 14, 2017, 19:43:15 »

There doesn't seem to be a welcome/newbie forum, so I'm just going to introduce myself: My name is Jeff Evarts and while I've been programming professionally since the early 80s, it's been more C/C++ and a little assembly language than Java. I'm totally new to game development as well, so I'm likely to ask odd questions and get the vocabulary all wrong. My apologies in advance.

I've been watching the youtube LWJGL  tutorials of Oskar and ThinMatrix and others. They use a Linux/Eclipse/Java/OpenGL/LWJGL stack, but they're having more luck than I am.

I'm hoping some kind person will help me get past what looks like a configuration issue.

I'm using
  • Linux: Linux Mint 18.1/Serena
  • Eclipse: Eclipse + Eclipse-jdt 3.8.1-8
  • Java: openjdk-8-jdk, openjdk-8-jre
  • lwjgl: downloaded lwjgl-opengl-*, lwjgl-glfw-*, and lwjgl-* from the lwjgl.org downloader, and added them to the java build path in eclipse
When I compile the demo application from "Get started", it barfs immediately on the -> operator, because the default compiler isn't "1.5" compatible. I run "javac -version" and it gives me "javac 1.8.0_131", which looks pretty modern. I changed the  compiler level IN ECLIPSE to 1.5, and the problem continues exactly the same. Then I tried upgrading to openjdk-9, but this caused eclipse to fail with errors about XXMaxSomething. I changed  those, and it failed later on.

Addiitonal research shows that ALL of the examples/demos use the same -> syntax, so it must be working MOST places... I just don't know what options to click.

So: What am I missing? What does it take to compile the "Getting Started" app from lwjgl?

Thank you so much in advance!

Hopefully,
-Jeff

P.S.
All these problems also happen on Ubuntu 16.04, so I'm pretty sure it's not a Mint-specific problem.
Logged

Kai

  • Guest
Re: Newbie introduction: teething pain
« Reply #1 on: July 14, 2017, 20:48:37 »

You seem to be using a workspace-global Java compliance level of 1.5 in Eclipse.
That is far too low to run LWJGL, and to use "lambda functions" (which is what that -> arrow is defining).
The default (with a fresh installation of Eclipse) is that Eclipse uses a default/built-in execution environment with the version of the JRE that is used to run Eclipse itself. So, if you use an openjdk8 to run Eclipse, then Eclipse should by default use a 1.8 compiler compliance level.
I also noticed that you use a very very outdated Eclipse version from 2012 which does not even support Java 1.8 (since that Java version was released two years after).

Please go ahead and install a recent Eclipse version (e.g. Oxygen). Then all your problems should be resolved.

An interesting note: Eclipse _does not_ use the system JDK to compile the classes. Eclipse has its own incremental built-in compiler, called ecj.
You only need the JDK to view the JRE class sources when navigating into JRE classes.

Also, have a look at the LWJGL3 Wiki on GitHub: https://github.com/LWJGL/lwjgl3-wiki/wiki/1.2.-Install
Logged

JeffEvarts

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: Newbie introduction: teething pain
« Reply #2 on: July 15, 2017, 00:20:06 »

Kai,

Thank you for the prompt reply! It got me a lot further.

I immediately went to the eclipse website and to the oxygen download page, only to find out that the downloads don't actually seem to download the package, they're some kind of wacky installer format that isn't recognized by mint or ubuntu.

So I googled "upgrade eclipse" and found Window>Preferences>Install/Update>Available Software Site and added " http://download.eclipse.org/releases/oxygen/", then clicked Help>CheckForUpdates

Which failed with this message:
Quote

Cannot complete the install because of a conflicting dependency.
  Software being installed: Eclipse CVS Client Resources 1.4.400.v20170612-0950 (org.eclipse.cvs.source.feature.group 1.4.400.v20170612-0950)
  Software currently installed: Eclipse CVS Client 1.3.200.dist-7B79FJJ9exZ_ (org.eclipse.cvs.feature.group 1.3.200.dist-7B79FJJ9exZ_)
  Only one of the following can be installed at once:
    Eclipse CVS Client 1.2.0.dist (org.eclipse.cvs 1.2.0.dist)
    Eclipse CVS Client 1.4.400.v20170612-0950 (org.eclipse.cvs 1.4.400.v20170612-0950)
  Cannot satisfy dependency:
    From: Eclipse CVS Client 1.3.200.dist-7B79FJJ9exZ_ (org.eclipse.cvs.feature.group 1.3.200.dist-7B79FJJ9exZ_)
    To: org.eclipse.cvs [1.2.0.dist]
  Cannot satisfy dependency:
    From: Eclipse CVS Client 1.4.400.v20170612-0950 (org.eclipse.cvs.feature.group 1.4.400.v20170612-0950)
    To: org.eclipse.cvs [1.4.400.v20170612-0950]
  Cannot satisfy dependency:
    From: Eclipse CVS Client Resources 1.4.400.v20170612-0950 (org.eclipse.cvs.source.feature.group 1.4.400.v20170612-0950)
    To: org.eclipse.cvs.feature.group [1.4.400.v20170612-0950]

So it appears I have to delete a CVS component of Eclipse. I found this;

Under Help>About Eclipse Platform > Installation Details > Installed Software I see this:
Quote
  Eclipse CVS Client   1.3.200.dist-7B79FJJ9exZ_   org.eclipse.cvs.feature.group   Eclipse.org
  Eclipse CVS Client Resources   1.3.200.dist-7B79FJJ9exZ_   org.eclipse.cvs.source.feature.group   Eclipse.org
  Eclipse Help Developer Resources   1.4.1.dist-8v7oFRvFCmSPZkILLj597H   org.eclipse.help.source.feature.group   Eclipse.org
  Eclipse Java Development Tools   3.8.1.dist-8-8nFqrFFgQGJ   org.eclipse.jdt.feature.group   Eclipse.org
  Eclipse PDE Plug-in Developer Resources   3.8.1.dist-7c7vFiyFALX8A   org.eclipse.pde.source.feature.group   Eclipse.org
  Eclipse Platform   3.7.0.debbuild   org.eclipse.platform.ide   null
  Eclipse Plug-in Development Environment   3.8.1.dist-7c7vFiyFALX8A   org.eclipse.pde.feature.group   Eclipse.org
  Equinox p2 RCP Management Facilities Source   1.1.0.dist-785EoAUkckGofGLmS7BA7   org.eclipse.equinox.p2.rcp.feature.source.feature.group   Eclipse.org - Equinox


But there doesn't seem to be a way to update them individually or delete the CVS elements.

Checking Mint>SoftwareManager and searching for "Eclipse" shows (not installed) subversion and git software for Eclipse, but nothing for CVS.

Any additional help would be appreciated, especially since this seems to belong in the "Eclipse forum" over at eclipse.org.

Thanks!
-Jeff
Logged

Kai

  • Guest
Re: Newbie introduction: teething pain
« Reply #3 on: July 15, 2017, 07:32:11 »

only to find out that the downloads don't actually seem to download the package, they're some kind of wacky installer format
That's because you clicked the first link you saw. :)

After you went to https://www.eclipse.org/downloads/

please click on this link here:


and then this link:


That will take you to a page where you can download the complete offline unzippable package.
Logged

JeffEvarts

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: Newbie introduction: teething pain
« Reply #4 on: July 15, 2017, 16:42:51 »

Yes, fool that I was, I clicked on the first link after "Download Eclipse". Probably nobody else does that. :)

Since this has clearly become an eclipse-specific issue, I've opened a thread over at their forums.

Thank you Kai!
-Jeff
Logged