Bug 457 - Please add Eclipse project files for gluegen and jogl
Summary: Please add Eclipse project files for gluegen and jogl
Status: VERIFIED FIXED
Alias: None
Product: Default
Classification: General
Component: default (show other bugs)
Version: unspecified
Hardware: All all
: --- enhancement
Assignee: Wade Walker
URL:
Depends on:
Blocks:
 
Reported: 2011-01-11 21:03 CET by Wade Walker
Modified: 2011-02-09 17:24 CET (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wade Walker 2011-01-11 21:03:32 CET
Please add Eclipse project files for gluegen and jogl. Make sure there are no absolute paths inside them, so the user should be able to simply check out the code from Git and immediately build in Eclipse.
Comment 1 Wade Walker 2011-01-11 21:35:49 CET
Finished. Created pull requests https://github.com/sgothel/gluegen/pull/3 and https://github.com/sgothel/jogl/pull/18.

The files don't contain any absolute paths, but you have to set up the JRE and Ant in Eclipse properly or it won't work right. Instructions are at https://jogamp.org/wiki/index.php/Building_JOGL_in_Eclipse.
Comment 2 Sven Gothel 2011-02-02 17:20:24 CET
I tried it .. but didn't succeed with eclipse 3.6.1 on Linux.

Error:

+++
Description Resource    Path    Location    Type
Project 'gluegen' is missing required source folder: 'build/test/build/gensrc/classes'  gluegen     Build path  Build Path Problem
The project cannot be built until build path errors are resolved    gluegen     Unknown Java Problem
The project was not built since it depends on gluegen, which has build path errors  jogl        Unknown Java Problem

+++

I saw that '/gluegen' was used in .classpath
hinting me to use the parent_loc (parent of jogl/gluegen) as the workspace.

I also saw that workspace_loc is being used, hinting me to the same.

Q: What am I doing wrong ?
Q: Can we resolve it ?
Q: Can we have a workspace location other than jogl/gluegen's parent ?
Comment 3 Wade Walker 2011-02-02 17:50:28 CET
Yes, you have to set the parent of jogl & gluegen as the workspace. That's one fundamental assumption of Eclipse that it's very difficult to change :)

- First build gluegen & jogl once on the command line -- this will create those
  gensrc directories so Eclipse won't complain
- Go to File > Switch Workspace and set that to the parent of jogl & gluegen
- Select jogl & gluegen in Package Explorer and hit F5 to refresh -- this will
  find the gensrc dirs
- Click Project > Clean... to test a full build inside Eclipse

Also you still have to do the beginning steps of https://jogamp.org/wiki/index.php/Building_JOGL_in_Eclipse to get Eclipse set up properly. But instead of creating the gluegen & jogl projects, you just do File > Import... > Existing projects.
Comment 4 Sven Gothel 2011-02-09 14:04:50 CET
The only diff I had to do (wiki) was to use the jdk path, instead of jdk/jre.
Otherwise no jdk/include folder was found due to the settings of ${java.home} (ant).

The latter is important for the native code compilation using the jdk header files,
derived from ${java.home}.
Comment 5 Wade Walker 2011-02-09 17:24:58 CET
I had to set the Ant java.home to $JAVA_HOME/jre because in gluegen/make/build.xml, it has this:

    <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>

and other similar references to "${java.home}/..". If you set Ant's java.home to the JDK $JAVA_HOME, it looks up outside the JDK directory.

Is there maybe some difference in JDK directory structure between Oracle's JDK and the one you're using?