Jump to content


Relative Folders?


  • Please log in to reply
13 replies to this topic

#1 steven

steven

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • Gender:Male
  • Location:Maastricht, NL

Posted 12 April 2005 - 09:05 AM

Hi! I work on my projects on two locations, viz. at work and at home. In both cases, my directory structure is different, for example, I have D:\Projects\<project> at work and F:\Work\Projects\<project> at home. Now, when I use JC for my project management, it stores the *absolute* path to files in the JCP file, which means that I have to do a Project Properties reconfiguration everytime I copy my project from/to work.

I think it would be nice if it stored a relative path when possible, so that I can copy my entire folder contents back and forth. Then at runtime JC can create an absolute path.

I know there are many workarounds here, such as keeping all project files one directory level lower than the JCP file, but just an idea...

#2 jeef

jeef

    Advanced Member

  • Members
  • PipPipPip
  • 344 posts
  • Location:New Zealand

Posted 12 April 2005 - 10:39 AM

i have the excat same problem with not solution :S

i just surrendered and place them both in the same relative location (eg: c:\ws)
its not overly a big deal as im using SVN to store the project anyway...
no point making your program so simple a dummy can use it cause the universe just keeps making a better dummy!

#3 xinox

xinox

    Administrator

  • Admin
  • 525 posts

Posted 12 April 2005 - 01:12 PM

C:\Projects\projectA\

Directory for the workspace files (jcw, jcp, jcu)

C:\Projects\projectA\src\

Directory for the java source files which are stored with relative paths in projectA.jcp.

This does not apply to version 2.50 of jcreator which uses a different procedure for storing project information.

-Xinox Software

#4 steven

steven

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • Gender:Male
  • Location:Maastricht, NL

Posted 14 April 2005 - 08:30 AM

A quote from one of my project files:

CODE
<project>
<settings>
 <label>Swarm</label>
 <root_path>\</root_path>
 <output_path>D:\Projecten\Swarm Intelligence\classes\</output_path>
 <source_path>D:\Projecten\Swarm Intelligence\src\</source_path>
 <jdkprofile_ref>JDK version 1.4.2_08</jdkprofile_ref>
 <compiler_ref/>
 <ant_ref/>
</settings>


As you can see, the paths are stored in an absolute way and not a relative one. I correctly ran through the New Project wizard, so I assume that this is normal. In another part we have:

CODE
<files>
 <include>
  <folderitem>
   <path>src</path>
  </folderitem>
  <folderitem>
   <path>src\guitools</path>
  ...


In which indeed the paths are relative.

I hope this clears things up a bit. I understand why the paths are absolute (we need a reference point for the relative paths) but a workaround would be very nice.

#5 xinox

xinox

    Administrator

  • Admin
  • 525 posts

Posted 14 April 2005 - 10:29 AM

Which version of JCreator are you using?



#6 steven

steven

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • Gender:Male
  • Location:Maastricht, NL

Posted 18 April 2005 - 07:08 AM

The same mechanism applies for all versions I have been using since 3.0, ie. 3.0, 3.10 and 3.50 in all builds (at least the ones I used). This output is from 3.50.011.

#7 xinox

xinox

    Administrator

  • Admin
  • 525 posts

Posted 18 April 2005 - 09:33 AM

We can't reproduce the problem on our test machines. Please report the issue through our web form with the required system information :

http://www.jcreator.com/mailform/bugreport.htm



#8 jeef

jeef

    Advanced Member

  • Members
  • PipPipPip
  • 344 posts
  • Location:New Zealand

Posted 18 April 2005 - 10:09 AM

crazy, i just checked my jcp file and it was all relative, no absolute paths at all... i could have sworn it was all absolute paths... odd
no point making your program so simple a dummy can use it cause the universe just keeps making a better dummy!

#9 steven

steven

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • Gender:Male
  • Location:Maastricht, NL

Posted 21 April 2005 - 05:09 PM

I must say that I cannot reproduce the problem either by making a new project now, either by adding it to an existing workspace or by automatically generating a new workspace. However the code snippet above shows that sometimes we do get absolute paths. I will try to reproduce the problem...


#10 E-E-R

E-E-R

    Advanced Member

  • Members
  • PipPipPip
  • 1,367 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Programming, Gaming, DC

Posted 21 April 2005 - 05:59 PM

I have looked through all of my .jcp files, and only one of them was using one absolute path, as far as I can see it is because it is above the project 'root', and I put that in there by hand by changing the output path.
"Many are persistently in pursuit of the way they have chosen; few in pursuit of the goal"

#11 steven

steven

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • Gender:Male
  • Location:Maastricht, NL

Posted 22 April 2005 - 07:09 AM

Today I reproduced the error, although I do not know what I have done in an other way than in the cases where a relative path was used.  However once again I now have in the JCP file:

CODE
output_path>D:\Unimaas\Projecten\Swarm Intelligence\Software\Routeplanner\classes\</output_path>


What I did was:

1. Create a project called RoutePlanner in D:\Unimaas\Projecten\Swarm Intelligence\Software\Routeplanner.
2. Set source (src) and classes (classes) path (btw, JC does not create the src folder, I have to do this manually and add a Java file to it in order to get this working).
3. Get to work.

#12 xinox

xinox

    Administrator

  • Admin
  • 525 posts

Posted 22 April 2005 - 07:50 AM

QUOTE
2. Set source (src) and classes (classes) path (btw, JC does not create the src folder, I have to do this manually and add a Java file to it in order to get this working).


Check the project templates. They are responsible for creating the initial directories.

#13 lordSauron

lordSauron

    Advanced Member

  • Members
  • PipPipPip
  • 192 posts
  • Gender:Male
  • Location:California, United States
  • Interests:Dominating Middle-earth, enslaving all the free peoples and keeping my Silmaril stones nice and shiny.

Posted 22 April 2005 - 08:24 PM

Xinox should still try and fix that.  I have problems with that too, and I'm using 3.5 Pro...  I think that an error as trivial as that should still be fixed, because sometimes I get on this roll of ideas...  It's awesome, and a stupid thing like that really takes me down.

Xinox: I see your participation is up!  Did that thread about a lack of Xinox participation get you mad?  You know, if so, you really shouldn't let stuff like that piss you off.  I tell people like that to buzz off and pick on someone who won't intullectually squash them.  Yes, I mispelled that word.  Spelling isn't my strongest point.
Lord Sauron the Great
lordSaurontheGreat@gmail.com
JDK 6 Documentation - READ IT!  LOVE IT!  LIVE IT!
THOU SHALT GOOGLE BEFORE POSING THY QUERY!
If you're reading this you have given me control of your mind.
Why do accesses to your mind throw a "null pointer exception?"

#14 steven

steven

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • Gender:Male
  • Location:Maastricht, NL

Posted 25 April 2005 - 07:16 AM

Lord Sauron, does your post imply that you have experienced the same bug (with absolute paths)? If so, can you reproduce it?