Setting up Eclipse

Hi,



I'm setting up Eclipse and all the steps where very clear and gave me no problems except

for step 10.


Step 10: Now right-click the jME project → Properties → Java Build Path → Libraries tab → Add Library... → User Library → Next → User Libraries... → New, enter jME required for the User library name, click OK. Select jME required → Add JARs..., browse to the folder yourworkspace/jME/lib/, then hold down the ctrl key and select:

    *
      jinput.jar
    *
      jogg-0.0.5.jar
    *
      jorbis-0.0.12.jar
    *
      junit-4.1.jar
    *
      lwjgl.jar
    *
      lwjgl-applet.jar
    *
      lwjgl-fmod3.jar
    *
      lwjgl-test.jar
    *
      lwjgl-util.jar
    *
      lwjgl-util-applet.jar

Then click Open → expand lwjgl.jar → Native Library Location → Edit → Workspace... → expand jME → select lib → OK → OK → Finish.


In my yourworkspace/jME/lib/ folder there are only seven jar files namely:

jinput.jar
jogg-0.0.7.jar
jorbis-0.0.15.jar
junit-4.1.jar
lwjgl.jar
lwjgl_fmod3.jar
lwjgl_util_applet.jar

and when I do the last bit of step 10

Then click Open → expand lwjgl.jar → Native Library Location → Edit → Workspace... → expand jME → select lib → OK → OK → Finish.



It just opens and thats it. I can't expand lwjgl.jar → Native Library Location → etc.

After testing the TestTeapot.java file I get these errors:

8-jul-2007 0:41:07 com.jme.app.BaseGame start
INFO: Application started.
8-jul-2007 0:41:08 com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
8-jul-2007 0:41:08 com.jme.system.PropertiesIO load
WARNING: Could not load properties. Creating a new one.
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1030)
   at org.lwjgl.Sys$1.run(Sys.java:75)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
   at org.lwjgl.Sys.loadLibrary(Sys.java:84)
   at org.lwjgl.Sys.<clinit>(Sys.java:101)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:108)
   at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(LWJGLPropertiesDialog.java:148)
   at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:191)
   at com.jme.app.BaseGame.start(BaseGame.java:60)
   at jmetest.renderer.TestTeapot.main(TestTeapot.java:61)
8-jul-2007 0:41:10 com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
8-jul-2007 0:41:11 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
8-jul-2007 0:41:11 com.jme.app.BaseGame start
INFO: Application ending.



Hopefully somebody can help me with this problem?

Thank you..

hiya!

unfortunately the wiki is a bit outdated.

jogg.0.0.5 for example is now replaced with jogg.0.0.7 etc.

But that dosen’t matter, just add all the jars in the lib directory.



Under Properties In your ‘Java Build Path’ in the Libraries Tab, you see all the Jar’s you added to your jme Project.

Expand the lwjgl.jar and edit the Native Library location



Thank you very much, it's working  :smiley:

Hi,



I'm such a noob :slight_smile:



I have a more basic problem with step 10 of the tutorial. I thought I did a good job following the previous steps, and everything looked exactly correct. Looks like I got everything from CVS. But…



Step 10 begins: "Now right-click the jME project → Properties …"



Uhm, I don't see any 'jME project'. I see a 'Welcome' tab and the 'CVS Repositories' tab. On the cvs tab, I can see the jme node, but that doesn't seem to be the 'project' it refers to, as none of the right-click items match.



What happened to me? Where is the project? :slight_smile:



Thanks in advance,

Stan

PS - once upon a time, I was a java developer… but that was way back before this newfangled eclipse stuff…



EDIT:: Well, I went to File->Open File, and browsed to my workspace directory, and opened the file called '.project'. That looks like it did the right thing - now, what was supposed to happen?



Thanks again,

Stan

when you create a project, it shows up on left side in package explorer. There are all of your projects. If you accidently closed package explorer go to window -> show view -> package explorer. I suggest you read eclipse tutorials on perspectives and views, it's part of eclipse help.

Sounds to me as if you were still in the cvs perspective.

try Window -> Open Perspective -> Other … -> Java.

Then you should see your workspace with your projects.


Thanks for the replies. Probably, they will put me on the right track - I just have to wait until I get home tonight to find out :).

@Kova: I don't recall seeing or closing the Package Explorer. It was the very first time I opened Eclipse. I will read the manual eventually, I was just hoping to get a little farther before I had to actually start learning something.

When I opened the project file, did it likely switch to the 'java perspective'?

Stan

The "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path" is because the LWJGL dll's can't be found by the OS.

18Rabbit said:

The "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path" is because the LWJGL dll's can't be found by the OS.  Assuming that you're running on Windows you can fix this by either dropping the 5 LWJGL DLL's into the Windows > System32 directory to "install" LWHGL or by adding the directory that the DLL's are located in to your PATH.  The DLL's are in the lwjgl_optional-1.1.zip in lwjgl_optional-1.1nativewin32.


"we" already solved this... read the whole thread
and about your advice, it's a bad one not involving eclipse entirely, I suggest you look at solution provided here (and in wiki tutorials)
Kova said:

"we" already solved this... read the whole thread
and about your advice, it's a bad one not involving eclipse entirely, I suggest you look at solution provided here (and in wiki tutorials)


The root of the problem wasn't Eclipse specific, it's a JVM error and there are many ways to fix it.  I think Core-Dump had the most direct solution but since I had just gone though setting all of this up I replied with the solution that I employed to this exact problem.  This particular error isn't addressed in the tutorial or wiki that I could find and my solution also works.

You could try being helpful without all the attitude. I would suggest looking at this wiki article on Etiquette or perhaps the one on Manners for ideas on how to proceed.
18Rabbit said:

The root of the problem wasn't Eclipse specific, it's a JVM error and there are many ways to fix it.  I think Core-Dump had the most direct solution but since I had just gone though setting all of this up I replied with the solution that I employed to this exact problem.  This particular error isn't addressed in the tutorial or wiki that I could find and my solution also works.

You could try being helpful without all the attitude. I would suggest looking at this wiki article on Etiquette or perhaps the one on Manners for ideas on how to proceed.


attitude!? by saying he already fixed it in best way possible and you should look at it also (so you can do the same)... don't blame me if you get offended that easily.
Core-Dump gave best solution, in eclipse, not platform specific and not involving putting bunch of files into OS's directories. That is the worst solution I know, and if you knew that, I don't understand why you feel you need to write it.

Guys, hold of on the flame fest please. That not only serves no purpose whatsoever but it will also deter the newsbs who actually read this thread for info.

I am in the same trouble

can't solve it

skygunner1 said:

I am in the same trouble
can't solve it


lwjgl exception or step 10 (cannot see project)?

Hey guys,

just wanted to throw in my dime :slight_smile:

I normally do it the following way:

  1. open BuildPath

    2)Hit add Library

    3)Select User library

    4)Add all the jars you need to the newly created library

    5)Hit the finish button

    6)Select the library and do the thing mentioned above (select native library path and add the library with all dlls, sos …)



    By that you get a nice little package which you can then reuse for all projects.

lack of lwjgl-applet.jar lwjgl-test.jar lwjgl-util.jar

but it's ok

I could also run the testRender–Teapot—

and the Hello World is working



thanks Kova

I have the same problem than xXPauloXx



here check this out















i downloaded tha lasted version of jME

and i downloaded lwjgl…

i did the same than xXPauloXx and doesnt work …

please a need help for this one …i tryed to compile and i get a error …

what can i do???

thanks in advise

lol, you showed pretty much everything but the description of the error :) 

what does it say after "unresolved compilation problems:" ?



edit:

I see your dowloaded jme project from cvs has compilation errors, you didn't set up jme required libs correctly then. I see you put everything in jme required libs… follow tutorial more carefully and understand what are you doing. Don't just click because it says so.

What I think you got wrong is libs.

jME is a library, it can be used in programs but not just itself. That is what libs are for. For jME to work, it needs other libs (lwjgl…). So first you set up "jme required" lib which will contain all stuff jme needs, that is why it is called jme required. For lwjgl.jar you need to specify natives directory, like you did. Above, you put in there jars from jme itself… doesn't make sense if you know what are you doing. After you setup jme required lib, jme project will show no compilation errors and you will able to run tests in the project. Since jme is for use in other project you must now create a lib "jme" that you can put into other projects, in this lib you put jme jars.

Good luck and if you get stuck just start all over again in the wiki tutorial.

16-jul-2007 0:41:58 com.jme.app.BaseGame start

INFO: Application started.

16-jul-2007 0:41:58 com.jme.system.PropertiesIO <init>

INFO: PropertiesIO created

16-jul-2007 0:41:58 com.jme.system.PropertiesIO load

ADVERTENCIA: Could not load properties. Creating a new one.

java.lang.Error: Unresolved compilation problems:

The method sort(Object[], Comparator) in the type Arrays is not applicable for the arguments (DisplayMode[], LWJGLPropertiesDialog.DisplayModeSorter)

The type ArrayList is not generic; it cannot be parameterized with arguments <String>

Syntax error, parameterized types are only available if source level is 5.0

Syntax error, parameterized types are only available if source level is 5.0

The type ArrayList is not generic; it cannot be parameterized with arguments <String>

Syntax error, parameterized types are only available if source level is 5.0

Syntax error, parameterized types are only available if source level is 5.0

The type ArrayList is not generic; it cannot be parameterized with arguments <String>

Syntax error, parameterized types are only available if source level is 5.0

Syntax error, parameterized types are only available if source level is 5.0

The type ArrayList is not generic; it cannot be parameterized with arguments <String>

Syntax error, parameterized types are only available if source level is 5.0

Syntax error, parameterized types are only available if source level is 5.0

The type ArrayList is not generic; it cannot be parameterized with arguments <String>

Syntax error, parameterized types are only available if source level is 5.0

Syntax error, parameterized types are only available if source level is 5.0

The type ArrayList is not generic; it cannot be parameterized with arguments <String>

Syntax error, parameterized types are only available if source level is 5.0

Syntax error, parameterized types are only available if source level is 5.0

The type Comparator is not generic; it cannot be parameterized with arguments <DisplayMode>

Syntax error, parameterized types are only available if source level is 5.0



at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(LWJGLPropertiesDialog.java:152)

at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:191)

at com.jme.app.BaseGame.start(BaseGame.java:60)

at jmetest.TutorialGuide.HelloWorld.main(HelloWorld.java:51)

16-jul-2007 0:41:58 com.jme.app.BaseSimpleGame cleanup

INFO: Cleaning up resources.

Exception in thread "main" java.lang.Error: Unresolved compilation problems:

Syntax error, 'for each' statements are only available if source level is 5.0

Syntax error, 'for each' statements are only available if source level is 5.0

cleanupStore cannot be resolved



at com.jme.util.TextureManager.doTextureCleanup(TextureManager.java:590)

at com.jme.app.BaseSimpleGame.cleanup(BaseSimpleGame.java:549)

at com.jme.app.BaseGame.start(BaseGame.java:95)

at jmetest.TutorialGuide.HelloWorld.main(HelloWorld.java:51)

I made the step 10 …like xXPauloXx

but in the post said …that this repository was not working …thye are older version so a made the same like a user here in the post done the installation, and it doesnt work …



what 's wrong then??'



:expressionless:



Exception in thread "main" java.lang.Error: Unresolved compilation problem:

Syntax error, annotations are only available if source level is 5.0



at com.jme.app.SimpleGame.<init>(SimpleGame.java:103)

at jmetest.TutorialGuide.HelloWorld.<init>(HelloWorld.java:46)

at jmetest.TutorialGuide.HelloWorld.main(HelloWorld.java:48)





this is the error that i get in all hava source. …





    @Override

 



this …sentence …get me a error above mentioned…