View Full Version : Java Class Files ???


Cameraken
10-28-2005, 12:31 PM
Hi Everyone.

I have found some software/Filters that I wanted to try. It downloaded as a .tar.gz file and said it was a Java file.

I’ve extracted the files and now I have a bunch of *.class files.

Can anyone please tell me what to do with these files?
I have a PC with Java installed.

Thanks.

Ken

DannyRaphael
10-28-2005, 05:48 PM
Hi Everyone.

I have found some software/Filters that I wanted to try. It downloaded as a .tar.gz file and said it was a Java file.

I’ve extracted the files and now I have a bunch of *.class files.

Can anyone please tell me what to do with these files?
I have a PC with Java installed.

Thanks.

KenKen:

In case no one else replies with a definitive answer, check out this site: http://www.ps-scripts.com

Some folks who are very knowledgeable in this area hang out there.

kschulz
10-28-2005, 06:22 PM
Hi Ken,

Class files are generated by a Java compiler after it has processed Java source code files. Class files can be loaded and executed by a Java Virtual Machine (JVM). You can download and install a JVM for Windows (the Java Runtime Environment) from Sun Microsystems at:

http://www.java.com/en/download/manual.jsp

If you already have Java installed on your PC, look for java.exe which is the bytecode (class file) interpreter. It's been a while since I've ventured into Java land, but I believe you can run your classes by executing the Java interpreter from a command line prompt.

You might want to try going to a command line prompt and type "java <enter>" - if the interpreter is found it will print out a list of the command line arguments it supports. The simplest syntax for running a class is something like:

java filename ("filename" = your class file, without the extension)

Sun's web site has tons of info. Hope this helps.

- Kurt

Cameraken
10-29-2005, 02:14 PM
Thanks for your help. But I’ve not got much closer.

Danny. Your link suggests that these files are Photoshop script files.
I found that I had to download the Scripting Plug-In from Adobe as it is not installed in PS7 by default as it is in CS. (I’ve done that)

However the scripts need to be in *.js format not *.class format. And I can’t see the answer at PC-Scripts.com.
JS files seem to be text files where these class files are not.

Kurt.
I found java.exe in the jre folder but when I run it I get a DOS box but it closes immediately

I am attaching the link. I think you may both be interested in this as well. I hope it entices you into taking another look at this. It uses Strassmanns algorithm. And segmentation.

http://www.cs.utah.edu/npr/ArtisticVision/


Thanks for your help

Ken

realaqu
10-29-2005, 06:59 PM
hi, Ken

I think you have to run this class in this way, it may need some arguements, try(assume the class name is Artsomething.class)

java Artsomething example.jpg

good luck

realaqu

kschulz
10-30-2005, 12:18 AM
Ken,

Very intriguing link! Unfortunately they provide only the compiled class files - it would be nice to see the actual algorithms in the source code.

Ok, I'm guessing you were trying to run Java using the Windows Run... command. Doing so would open up a command window and then close immediately as you describe. Try the following instead, paying attention to upper and lower case:

1) Extract your class files to a folder (for example "c:\temp")

2) Copy a small jpg file to c:\temp for test purposes. I used a 320x240 sized file since my first attempt with a very large jpg image failed.

3) Using the Windows Run... command, type "cmd" then enter. This will open up a DOS command window.

4) At the command prompt, type "cd \temp" then press the ENTER key.

5) Type "set CLASSPATH=c:\temp" then ENTER.

6) Type "java Artistic_Vision" then ENTER. This will launch the program and give you two Windows as shown in the attached screen caps.

7) Use the File menu to load your test jpg image. It should appear in the Window titled "Picture".

8) Use the Tools and Stereo menus to play with it.

Good luck with it. Time for me to play with it more... :pleased:

- Kurt

kschulz
10-30-2005, 12:40 AM
Hmm, looks like 192x166 is the largest image area it will work with. Still very cool...

Cameraken
10-30-2005, 04:08 AM
Kurt.

Thank You So Much. :bow:

You got it working.

Unfortunately, as you say, It will only take a small picture and there is no save.

Here I reduced the picture. Applied Artistic_Vision then took a Snapshot
I loaded it back into Photoshop and enlarged it up, then merged it back into the original.
Unfortunately the brush strokes are blurring.

However this is really interesting. Makes you wonder why this algorithm is not in any commercial software.

Perhaps We could persuade Doug or Danny to email Bruce and see if he has taken this any further.

Thanks again for your help.

Ken

Doug Nelson
10-30-2005, 05:03 AM
I think your request would mean more than mine, since you've actually tried it. Just email him this thread URL.

Cameraken
10-30-2005, 07:24 AM
'email him this thread URL'
Great Idea Doug. I’ll Do that.

I’ve created a Bat file to save the typing.

Open Notepad
Paste this in

cd \temp
set CLASSPATH=c:\temp
java Artistic_Vision

Then save on the desktop as ArtisticVision.BAT
This will work with Kurt’s Suggested Directory.


Ken

Cameraken
10-30-2005, 08:24 AM
Kurt. Are you on a MAC? Your display is different to mine. You have got Stereo and I have got Underpainting and Artifact Level (in V1.2)

Ken

Cameraken
10-30-2005, 08:57 AM
Email Sent

bgooch *at* cs.utah.edu
Re Artistic Vision.

Dear Bruce

I am a member of RetouchPro. A forum interested in PhotoArt and we have seen the interesting work you have done on brush strokes.
We have started a thread to discuss your work I am sending you a link to the thread hoping that you may wish to comment or contribute to the discussion.
Maybe you could tell us if any further development is planned.

http://www.retouchpro.com/forums/showthread.php?p=103972#post103972

Looking forward to hearing from you.

Ken

kschulz
10-30-2005, 11:27 AM
Ken, I'm on a PC running Win XP but I must have a different version of the program. At first I couldn't access the link you provided (I think their server was down last night) so I googled "Strassmanns algorithm" and found the Java classes on another site: http://www.cs.unc.edu/~coombe/comp256/

- Kurt

Cameraken
10-30-2005, 06:18 PM
Kurt. I’m glad that my link did not work because you found a newer version. All the files in the tar.gz are dated 2000. The files in your link are dated 2001 and there is a vast improvement in quality.

I’m not sure what happened with my last test, but it processed a larger image. I opened ‘almost a painting’ and the little picture box became almost full screen and the program processed the whole image. So maybe there is a bug or maybe it will do bigger file sizes.

Ken

kschulz
10-31-2005, 07:40 AM
I played around with varying file sizes (multiples of 192 and 166, etc) and couldn't get any to fully load. I downloaded "almost a painting" - lo and behold it loaded! Afterwards, I was able to load my other test files! There's a bug lurking there somewhere.

Attached is an example of one of my test pics. I'm finding that it seems to work best with nature scenes rather than portraits.

I'll play with it more to see if I can find what the magic is for loading files.

- Kurt

Cameraken
10-31-2005, 03:20 PM
It looks like you’re having as much fun as I am with this.

I came across this because I was having thoughts along these lines and was thinking of trying to write something similar. But I really don’t think I am capable of doing any better than this.
I have not seen anything else that works the same way. It may not be a ‘finished’ picture but it will be a great layer to add to pictures in the future.

I cannot see why ‘almost a picture’ gets it working. I’ve tried everything, exif info, rotation, Baseline jpg etc.
Creative challenge 007: Knocking out a background seems to work the same way

I have a feeling it may be a memory issue. A couple of times I’ve had
Exeption in thread “AWT-eventqueue-0”lang.OutOfMemoryError: Java heap space

Is there any way to give Java more memory?

Such a shame there is no save option. I keep thinking I’ll find a ‘secret’ key to save. I can’t believe that Bruce would not have had a save in his version but he could have disabled it I suppose.

Ken

Cameraken
10-31-2005, 07:20 PM
Kurt.
I have some more clues.

Open Artistic Vision
Maximise the picture window
Alt Tab back to the Artistic Vision Window
Now load any picture

This works every time.

It looks, to me, like a display/refresh/memory problem.
And nothing to do with the actual picture.


Ken