Classpath hell

Ok, i know i did something wrong but i cant figure out how to solve this…

It started with annoying “compiled code” when stepping into jme3-functions like BetterCharakterControl and strange offsets in code when debugging (actual line is comment or between functions etc.), so i thought the debugger just got the wrong source file. I’ll give you some overview:

Platform: F:\Prog\jmonkeyplatform
Java: F:\Prog\Java
My Project: D:\java\Workspace\DMF
Nightly SVN Checkout: D:\java\Workspace\jm3

So when i got into – for example – BetterCharakterControl i clicked on ‘attach source’, crawled into my filesystem until i found D:\java\Workspace\jm3\engine\src\bullet-common\com\jme3\bullet\control\ and selected it – did not work ^^. So i removed everything, deleted jmonkeyengine, installed it anew and just set up a “new JMonkeyProject” … it starts with no libraries at all and the error “package” does not exist. in the Projects properties, the global libraries are empty, so its no wonder that the SDK cant find com.* but as this is a complete new install from the downloaded RC2 im unshure how to go on.

Even if i can bring it back to the status quo ante, im still unshure what would be an effective setting or the best way, to attach an *.java-source to a fn and why the sdk dont accept the *.javas in the svn, but my main concern is – of course – to get the SDk working again.

TIA, ~.rhavin;)

Try delete “Home Directory > AppData > Roaming > .jmonkeyplatform” and reinstall

re: attaching sources, i will leave it to someone else

When you attach sources, select the root folder (e.g. jme3/src)

D:\java\Workspace\jm3 <-root for the svn checkout
D:\java\Workspace\jm3\engine\src <- that one ends with src, but doesnt work either…
D:\java\Workspace\jm3\engine\src\bullet-common <- that didnt work with "attach source"… see below.

@normen said: When you attach sources, select the root folder (e.g. jme3/src)
that directory does not exist, i have …\jm3\engine\src\… or …\com\jme3\bullet\… but in the files the svn copied to my drive, there is no jme3 with a src-dir above


Ok, i had to do (in Project window) Libraries->add “folder/jar”->“D:\java\Workspace\jm3\engine\src\bullet-common” … the same didnt work, when i did it via “attach source” … any reason for that?

The src folder in the jme3 project is not the root as you might see from the folder structure. Each single part of the engine has its own root.

@normen said: The src folder in the jme3 project is not the root as you might see from the folder structure. Each single part of the engine has its own root.

yeah, that i figured out, too ;-Δ … but… why is “attach source” [button at compiled code] ≠ (in Project window) Libraries->add “folder/jar” …? I mean, shouldnt “Attach Source” just do that? I could understand if both want the same value, but the “attach source”- button neither accepts the java – wich would be expected – nor the path the “add folder/jar”-popup wants – wich would be also ok … it just completely refuses to take anything at all… and because it sits so prominently right above the compiled code, it was after trying for a while just pure frustration that let me try add “folder/jar”. :->

Not really, “attach sources” is for when that way of referencing the javadoc doesn’t work for some reason.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless there’s emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

After downloading from SVN:

In jmonkeyengine/engine
ant create-zip-distribution

This will generate (when the date is this).

Unzip this folder to a folder of your choice, can be in the project if you have just one or a shared library folder if you want to use it in multiple projects.

You can then right click your project folder, Properties, Libraries, Add Library…, Create
Library Name: jME Distribution
Select your jme-distribution/lib/*.jar under Classpath
Under Sources select jme-distribution/source
Under Javadoc select jme-distribution/javadoc

1 Like