Sun, Nov 24, 10:25 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 21 6:06 am)



Subject: I need a Mac user


scourge ( ) posted Mon, 20 September 2004 at 7:09 AM ยท edited Sun, 28 July 2024 at 7:50 AM

Attached Link: http://koti.mbnet.fi/~ilaripih/MatMaker/MatMaker.jar

file_129746.jpg

I just started learning Java programming (again) because I would like to write a Mac compatible version of MAT Pose Edit, which is currently a MS Visual Basic program. The problem is that I don't know anything about Macs, the last time I touched one was 10 years ago when I was 12. So how's the Java support in OS X or OS9 or whatever versions there are?

I wrote this very little (7.22KB) application that just extracts the material section and version number from a normal P4 or P5 character file and then creates a MAT file. This is NOT the Java version of MPE, it's only a test. I'd appreciate it if some Mac users could try it and tell me if it works or not. Of course Windows and Linux users can try it also.

The app requires the latest Java runtime environment. For Windows and Linux it's available here: http://java.sun.com/j2se/1.5.0/download.jsp
I think Apple provides the JRE for Mac OSes, and it's probably already installed in OS X systems.

If you're using a crappy browser like Internet Explorer it will probably change the file extension to .zip when you download the file. If that happens just change it back to .jar after downloading.

How to run the app (this is VERY important):
You can run it by just double-clicking or typing "java -jar MatMaker.jar", but then it will run out of heap space if you open a large file. So run it with a command like "java -Xms32m -Xmx256m -jar MatMaker.jar". You can of course create a shortcut file which will use the aforesaid command if you don't want to run the app using the console or command prompt.

Using the application is very simple as there are only two buttons. If you've got questions I'll be happy to answer them.


bandolin ( ) posted Mon, 20 September 2004 at 7:39 AM

I downloaded the link using "Save linked file as..." It saved to my desktop as "MatMaker.jar". When I double clicked on it, I get the message "Jar Launcher The jar file "MatMaker.jar" couldn't be launched. Check the Console for possible error messages". Here's what the Console says: Exception in thread "main" java.lang.UnsupportedClassVersionError: MatMaker (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) I'm running a 450 Mhz G4 with OS 10.3.5 and 1.5 Gb of RAM. Hope you can make sense of it. I don't know anything about java other than Apple Computer and Sun Microsystems have had a very dubious and somewhat unsuccessful relationship.


<strong>bandolin</strong><br />
[Former 3DS Max forum coordinator]<br />
<br />
<a href="http://www.renderosity.com/homepage.php">Homepage</a> ||
<a href="http://www.renderosity.com/mod/sitemail/">SiteMail</a> ||
<a href="http://excalibur.renderosity.com/mod/gallery/browse.php?user_id=70375">
Gallery</a> || <a href="http://www.renderosity.com/mod/freestuff/index.php?username=bandolin">
Freestuff</a>
<p><em>Caution: just a hobbyist</em></p>


scourge ( ) posted Mon, 20 September 2004 at 8:14 AM

Okay, looks like you'd need the latest JRE... which isn't available for Mac yet. Can you check which version of Java you have? You can do that by typing "java -version" in a text console. OS 10 has a text console, right? Anyway, I guess I should use AWT instead of Swing for the GUI, and switch back to Java v1.4.2. Then this would definitely work on OS X, but I'm still not sure about the earlier OSes. Fortunately I don't have to change too many lines of code so I'll first try v1.4.2. I'll be back soon with another version. In the meantime it would be great if someone with OS X could test this.


scourge ( ) posted Mon, 20 September 2004 at 8:52 AM

Okay, I went back to using J2SDK1.4.2 and converted the program. Please try the download again bandolin to see if it works now.


MarianneR ( ) posted Mon, 20 September 2004 at 9:36 AM

It is seems to work fine. I ran it by just double-clicking the jarfile on a Mac G4 with OSX 10.3.5. I did a quick test with the HER cr2, which is around 2.7 MB, and then tried out the pz2 and it did what it should. A suggestion is that when you save the pz2, the program should fill in a name ending in pz2 instead of the original name as it is now. I opened the pz2 in a text editor and sawthat it has double new lines.


bandolin ( ) posted Mon, 20 September 2004 at 9:45 AM

The version of java I have is v1.4.2. Tried running the new applet using Applet Launcher. I must be doing something wrong. I get nothing. Nothing happens at all. I think the console program you're talking about on the Mac is called Terminal. Its a UNIX terminal interface for running UNIX commands.


<strong>bandolin</strong><br />
[Former 3DS Max forum coordinator]<br />
<br />
<a href="http://www.renderosity.com/homepage.php">Homepage</a> ||
<a href="http://www.renderosity.com/mod/sitemail/">SiteMail</a> ||
<a href="http://excalibur.renderosity.com/mod/gallery/browse.php?user_id=70375">
Gallery</a> || <a href="http://www.renderosity.com/mod/freestuff/index.php?username=bandolin">
Freestuff</a>
<p><em>Caution: just a hobbyist</em></p>


scourge ( ) posted Mon, 20 September 2004 at 10:38 AM ยท edited Mon, 20 September 2004 at 10:39 AM

Attached Link: http://koti.mbnet.fi/~ilaripih/MPEHome/

Good good. Bandolin, this is a Java application, not an applet. So you'll have to run it from Terminal with the "java -Xms32m -Xmx256m -jar MatMaker.jar" command, or create a shortcut which runs that command.

MarianneR,
Double new lines? Do you mean double line breaks?
Thanks for suggestion. Actually I've got plenty of features to add to this application, this is just a little test. I'll start doing some serious work on the Java version of MAT Pose Edit when I can be sure that it will be fully Mac compatible. My goal is to make it as good and as versatile as the Windows version. See the attached URL, especially the tutorials there, to get an idea of how big this little Java app will grow if I can reach my goal.

Message edited on: 09/20/2004 10:39


MarianneR ( ) posted Mon, 20 September 2004 at 10:50 AM

scourge: Yes, double line breaks. lol I tried the program a bit more with larger files. It didn't work when I had doubleclicked the icon to start it. The program window didn't disappear but the console said "out of memory" (and a lot more..). It did work when I started it in the Terminal with the command line "java -Xms32m etc etc...". The largest file I tried was almost 13 MB. A funny thing was that the double line breaks disappeared also. java -version gives java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) In case you don't know: The console is a separate program for messages about system errors. Now I'll go and have a look at your link ...


scourge ( ) posted Mon, 20 September 2004 at 11:07 AM

Yes, the error trapping isn't anywhere near perfect yet, so in case of an "Out of memory" error the program window doesn't display the message. The parameter "-Xms32m" means that the initial heap space (whatever it is) is 32MB(?) and "-Xmx256m" means a maximum heap space of 256MB. If you still manage to get errors you can use even higher numbers for these parameters. Running with these parameters I could extract materials from a 35MB file, and it took only about 2 seconds. I think the double line breaks were already in the HER CR2 file. And they probably weren't double line breaks at all, I think they are Windows formatted line breaks. On a UNIX/Mac system it looks like double line breaks. This app doesn't reformat the text, except the few first lines.


MarianneR ( ) posted Mon, 20 September 2004 at 11:44 AM

Yes, you're right, there are no double line breaks in the HER.cr2. It was my text editor that decided to display the files differently for some weird reason. I looked at the files in a hex editor and the line breaks are the same: hex "0D 0A".


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.