local java extensions (versioning)

May 17, 2007 at 9:36pm

local java extensions (versioning)

IN SHORT: is there a viable way to save java extensions locally like coll files or abstractions.

My first in depth java project is doing wonders for my bald spot.

Typically, I like to take a project, and have subfolders labeled “version 001″ etc. The ideal method would be to save java externals in the folder with the “main max file” like .js or abstractions. Then duplicate the entire subfolder, rename it “version 002″ and continue working.
Right now I can’t find a way to do that which means every time I alter my java project, I break it. I have no backup (since all my java externals in the “classes folder” not local.
From what I understand (which isn’t much) In order to do this, I would need to add every single version individually to the “CLASSPATH”. (max.java.config.txt)

is there a realistic way to do this?

In general, I feel as if I missed an entire lesson on the “filesystem” of java. where all the files are located”, how java connects com.blah.fui with an actual file on my hard drive etc. how xcode interacts with java etc.(I’m using quickie) I cant ask all this of the max forum but is there some sort of tutorial on that?

#31974
May 17, 2007 at 10:04pm

I’ll let Ben or Topher talk about the details of the mxj class loader
(and it’s subtle differences from the default Java class loader), but
source files and class files on disk (or shoved in a jar) need to be
named the same as the class itself, so it seems that you can’t easily
do what you want without renaming the class at the same time you
rename each file. Other than the subtle differences that mxj has
(like the ultra convenient locating your class file if it’s in the
same folder as your patch), you can find out about Java class loading
in general by reading some of the myriad of great articles online.
Here’s a few from a quick google:

http://blogs.sun.com/sundararajan/entry/understanding_java_class_loading

http://www.onjava.com/pub/a/onjava/2005/01/26/classloading.html

Sounds to me like you should check out CVS, SVN (subversion), or some
other version control software if you want to be able to make changes
and get back to earlier versions when you need them.

http://en.wikipedia.org/wiki/Revision_control

-Joshua

#104483
May 17, 2007 at 11:07pm

> Other than the subtle differences that mxj has (like the ultra
> convenient locating your class file if it’s in the same folder as
> your patch),

I believe you could also store your classes in a subfolder located
within the same directory as your patch. Look at the mxj~ examples
directory in java-doc and the java jitter examples. That way you
should be able to easily keep versioning your project.
t

#104484
May 18, 2007 at 8:36pm

A HA! a local classes folder. works like a charm!

You guys are the bestest.

Thank you josh
thank you topher,

#104485

You must be logged in to reply to this topic.