Improving the Eclipse tutorial?

Problems with Java, jogl, etc?
peterkirn
Posts: 3
Joined: Fri 29. Jan 2010, 06:09

Improving the Eclipse tutorial?

Post by peterkirn » Fri 29. Jan 2010, 06:14

The Eclipse tutorial is excellent right up until the end. In the section: "Create own projects for programming with jreality," the advice is only partially correct.

Adding the jReality project to the classpath will work for some source files, but not all.

You'll need to add JOGL, by copying it over (within the lib folder) and adding it to the classpath of your new project, and I believe it also only builds after adding the native library location (as described earlier in the tutorial). Otherwise, a number of dependencies on JOGL won't work.

Now, I'm not really an Eclipse expert. I wonder if there's a best practices you might suggest? It may make sense to make this a library, or to go ahead and build jReality and simply include jars?

What's your habit when creating new projects?

I'm happy to take your workflow, polish it up, and add to the wiki!

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: Improving the Eclipse tutorial?

Post by steffen » Wed 3. Feb 2010, 21:32

You'll need to add JOGL, by copying it over (within the lib folder) and adding it to the classpath of your new project, and I believe it also only builds after adding the native library location (as described earlier in the tutorial). Otherwise, a number of dependencies on JOGL won't work.

Now, I'm not really an Eclipse expert. I wonder if there's a best practices you might suggest? It may make sense to make this a library, or to go ahead and build jReality and simply include jars?
Seems to be a good idea to continue the tutorial... You should not copy libs, instead go to project->preferences->export and select jogl.jar etc. I think nothing special is needed for native libs. BTW, getting svn running is much simpler now, just install subversive from Galileo Repository->Collaboration->Subversive SVN Team provider... (and then select the latest SVNKit connector)

Steffen.

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: Improving the Eclipse tutorial?

Post by gunn » Fri 12. Feb 2010, 21:35

Now I've upgraded to eclipse-galileo and followed the instructions to install subversive plugin plus the latest SVN connector ... but all my SVN repositories are gone from the svn repository browser perspective (cvs repositories survived the upgrade to galileo undisturbed). Does anyone have any wise advice how I can revive the SVN repositories without having to create them all over again and check out all the svn projects anew? problem is I have collected quite a bit of un-checked-in code in my projects which I'll have to salvage by hand and move over to the newly checked-out projects.
jReality core developer

paul peters
Posts: 17
Joined: Thu 6. Mar 2008, 15:18
Location: TU Berlin, Germany
Contact:

Re: Improving the Eclipse tutorial?

Post by paul peters » Fri 12. Feb 2010, 21:54

Asking for a "wise advise" is a quite a burden, but still I try :wink: . I had the same problem (and still some projects not reconnect, so I could test my procedure once again). But keep a copy of your workspace elsewhere, just in case ...

1. Delete the project, but DON't delete project folder on disk!

2. - Create it again via File->New->"Java Project"
- In the wizard that opens check "create project from existing source"
- Browse to the directory of the project, which should be still in the workspace

3. Right click on the project in the package explorer and goto "Team" and if there are only three entries click "Share Project..." at least for me it just connects (no further questions asked), and everything works fine again.
Paul Peters

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: Improving the Eclipse tutorial?

Post by steffen » Sat 13. Feb 2010, 08:40

The problem here is that subversive is not compatible with subclipse. So I think the easiest thing would be to open the workspace with an eclipse version that still has subclipse installed, check in the code, and then check it out again using subversive... Or, just stick with subclipse.

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: Improving the Eclipse tutorial?

Post by gunn » Sat 13. Feb 2010, 09:58

Paul, thanks for the suggestion. It worked for me too, at least for the two projects which I tested. That means it is possible to upgrade from subclipse to subversive via this "trick", which might save others extra hassle too. (For example, rechecking out a project clean also removes the local source history which makes life a little harder too.) Anyway, thanks for the quick response.
jReality core developer

peterkirn
Posts: 3
Joined: Fri 29. Jan 2010, 06:09

Re: Improving the Eclipse tutorial?

Post by peterkirn » Wed 3. Mar 2010, 06:26

Similarly peculiar problem -- did an SVN update, and now it seems the .classpath file is broken. Bizarre. As a result, projects that depend on the jreality checkout aren't working. Investigating, but open to ideas.

Has anyone successfully switched from Subclipse to Subversive? (was there a reason for making the swap? I was unclear)

paul peters
Posts: 17
Joined: Thu 6. Mar 2008, 15:18
Location: TU Berlin, Germany
Contact:

Re: Improving the Eclipse tutorial?

Post by paul peters » Wed 3. Mar 2010, 10:34

The name of the library jtem-beans.jar changed to beans.jar. My svn tried to merge the .classpath files yesterday and failed. If that happend to you as well, you should see different versions of the .classpath file in the navigator and "<<<<<<" marks in the .classpath file.

You may choose "Override and Update" from the context menu in the "Team Synchronizing Perspective" and then adapt the classpath to your needs (if you use a java vm from sun adapting the jogl jni version to your system should not be necessary any more, the right version should now be figured out at startup).

Alternatively, you may compare the different versions of the .classpath file. It is possible, that the failed svn merge attempt in the .classpath file makes comparison with the repository useless, unless you remove the part that was merged in. Then a line by line comparison is possible.

The best way to avoid such problems, is to always update jreality via Team->"Synchronize With Repository" and merge in changes into the .classpath file manually (happens only rarely). That may be done by a double clicking on .classpath in the "Team Synchronizing Perspective" or choosing "Compare With"->"Base From Working Copy" from the context menu.
Paul Peters

paul peters
Posts: 17
Joined: Thu 6. Mar 2008, 15:18
Location: TU Berlin, Germany
Contact:

Re: Improving the Eclipse tutorial?

Post by paul peters » Wed 3. Mar 2010, 10:51

peterkirn wrote: Has anyone successfully switched from Subclipse to Subversive? (was there a reason for making the swap? I was unclear)
I used both lately and both have drawbacks (how I managed to switch, see above - I insalled two parallel versions of eclipse).

With Subclipse using svn via ssh and password is almost impossible, via http and password problems with the changing password arize.

Subversive on the other hand often asks for the password - a question which one may sometimes just click away with "OK". Using subversive with an ssh-key (an id_rsa file) is a hassle, because it always forgets the file and you have to reenter it after you restart eclipse.

Finally, subversive is distributed through the usual eclipse repository. The svn connector SVNKit seems to be enabled out of the box and at least on Windows systems the native library (JavaHL ?) is installed automatically.

As I did not go through installing JavaHL (neither for subclipse nor for subversive), my problems may be caused by using SVNKit instead of JavaHL.
Paul Peters

ted
Posts: 57
Joined: Wed 25. Jul 2012, 22:53

Re: Improving the Eclipse tutorial?

Post by ted » Wed 25. Jul 2012, 23:45

paul peters wrote:Asking for a "wise advise" is a quite a burden, but still I try :wink: . I had the same problem (and still some projects not reconnect, so I could test my procedure once again). But keep a copy of your workspace elsewhere, just in case ...

1. Delete the project, but DON't delete project folder on disk!

2. - Create it again via File->New->"Java Project"
- In the wizard that opens check "create project from existing source"
- Browse to the directory of the project, which should be still in the workspace

3. Right click on the project in the package explorer and goto "Team" and if there are only three entries click "Share Project..." at least for me it just connects (no further questions asked), and everything works fine again.

It seems step 2 no longer works in Juno version of Eclipse... at least not on my setup. Using SnowLeopard.

I can Import directly from the Java perspective, but then Eclipse doesn't seem to recognize the .project file and just lists it as a file in the Project Explorer tree view.

Is there any newer recommended way of getting started with Eclipse? The steps need to be placed in the developer tutorial at

http://www3.math.tu-berlin.de/jreality/ ... r_Tutorial

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: Improving the Eclipse tutorial?

Post by Andre » Thu 26. Jul 2012, 16:11

Hi Ted,

I don't understand your request.

Do you want to setup jReality with eclipse?
Or do you want to switch from subclipse to subversive?

Your quoted post explains a solution for the second question, but then you ask if there is a newer way of getting started with eclipse...

I'm a bit confused now...

If you want to setup jReality with eclipse, pls follow this HowTo:
http://www3.math.tu-berlin.de/jreality/ ... p_tutorial

I've just tested it with the newest eclipse release (Juno 4.2) and subversive. Everything worked fine.
Maybe the only tricky part is, that you have to adapt the "uncopyable" link of the update sites to the actual one:
which is also mentioned in the HowTo.

best regards
andre

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: Improving the Eclipse tutorial?

Post by Andre » Thu 26. Jul 2012, 16:26

I've just improved the wiki with that info.

http://www3.math.tu-berlin.de/jreality/ ... SVN_plugin

ted
Posts: 57
Joined: Wed 25. Jul 2012, 22:53

Re: Improving the Eclipse tutorial?

Post by ted » Fri 27. Jul 2012, 01:02

After trying several different methods, I suggest updating the getting started part of the tutorial for use with eclipse to something more like this:
###BEGIN PROPOSED CHANGES###

These three steps will get JReality running:
- Complete prerequisites: JDK, Eclipse, and SVN must be set up,
- Then you can check out JReality from SVN and
- Test the setup by running some introductory tutorials
They are described in greater detail below.

Prerequisites: JDK, Eclipse, and SVN:

1. Download and install the most recent JDK (Java Development Kit)
http://www.oracle.com/technetwork/java/javase/downloads/index.html
You need Java SE Development Kit 6 or higher
See instructions here. If you don't know Java yet, follow the tutorial.
http://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html
http://docs.oracle.com/javase/tutorial/getStarted/cupojava/unix.html

2. Install Eclipse IDE for Java Developers from http://www.eclipse.org/downloads/
Image
(or alternatively use Eclipse IDE for Java Developers or add Java to another package)
When you first run Eclipse, check the box that says "Always use this workspace"
and continue until you see the main window with the menubar.
Image
Click the X next to "Welcome" now and if you ever see it again.

3. Install Subversive as recommended here: (or alternatively use Subclipse)

Image
Quick Access: Install New Software
Image
Work with: --All Available Sites--
Collaboration > [Check the "Subversive" boxes] > Next >
[keep confirming until restart, then choose the highest numbered SVNKit connector]

JReality Checkout:
Image
Quick Access: New repository location
Image
URL: http://fs.math.tu-berlin.de:8000/svn/jreality
User: guest
(leave Password blank & click Finish)
Quick Access: SVN repositories
Image
>http://fs.math.tu-berlin.de:8000/svn/jreality>trunk>right-click>"Find/Checkout As…">Finish
Project>Generale Javadoc
Image
Generates useful JavaDoc documentation that you can read by hovering over identifiers.

Testing:
Image
Quick Access: Perspectives Java
Image
Package Explorer>jreality>src-tutorial>de.jreality.tutorial.intro>icosahedron.java
Run>Run
or click the run icon
Image
(Also try the series of tutorials in the src-tutorial folder)

###END OF PROPOSED CHANGES###
(continue with the tutorial showing the icosahedron demo, also put Git section on other page, as it is unclear in the instructions that both SVN and GET are not necessary.)
Last edited by ted on Fri 27. Jul 2012, 10:23, edited 2 times in total.

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: Improving the Eclipse tutorial?

Post by Andre » Fri 27. Jul 2012, 10:11

Looks great, feel free to edit ;)

EDIT: you probably have to send me your pics that I can move them at the right position.
The problem is, that I'm now in holidays for 3 weeks. So please sent the pics to steffen weissmann, that he moves them to path/to/mediawiki/images/image.jpg

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: Improving the Eclipse tutorial?

Post by Andre » Fri 27. Jul 2012, 10:53

I'm applying your setup right now. I've downloaded the images out of the forum and moved them to the right position (edit: LOL I've just remarked, that you can upload files directly from the wikipage too. -> You should be able to do that as well ).

Thx for your help.

EDIT: there is no "Quick Access" in older versions of eclipse -> I've changed that parts of your instructions to a way which can be used in the older versions too.

EDIT2: Done Thx again for you help.

Post Reply