aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes  Does MAC support Swing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark " Does MAC support Swing?" Watch " Does MAC support Swing?" New topic
Author

Does MAC support Swing?

Alex Iordache
Ranch Hand

Joined: Mar 13, 2001
Posts: 62
I have been trying to find out how to run a Java application on a Mac. After downloading the SDK for Mac, and trying to compile. Some errors came up that would indicate that there is no Swing support for the MAC, is this correct?
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Good question. The download from Apple is only good for V1.1.8 which does not have any Swing in it. http://developer.apple.com/java/download.html
Why don't you contact Apple and ASK them when the new version will be out? (Actually I just did that).

At any rate FYI - http://java.sun.com/docs/books/tutorial/getStarted/cupojava/mac.html

"JavaRanch, where the deer and the Certified play" - David O'Meara
eric moon
Ranch Hand

Joined: Nov 26, 2000
Posts: 133
you can run version 1.1 of swing with Mac and 1.1.8. i know, I've done it. You need to use the jar file (Swingall.jar), and put it in your classpath. You don't get the rest of java2, tho.


<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>"Those who cast the votes decide nothing. Those who count the<BR>votes decide<BR>everything." <BR> -Joseph Stalin<HR></BLOCKQUOTE>
Alex Iordache
Ranch Hand

Joined: Mar 13, 2001
Posts: 62
Thank you for the response. Since I posted, I have another angle on the question. When I try to run
the application, I get a problem with visibility to java/util/ArrayList. Can you tell me where this
class exists? I have tried to add many files to the class path with no luck.
While I am on that subject, do you know if I could simply install the JRE, not SDK, and then Swing to
get the application to run? I can't seem to figure out how to get the piece which launches the application
working without the JBindery.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

java.util.ArrayList is part of the Collections framework and was added in Java 2 also. It is basically an improved Vector. So, if you are using it in your own code simply replace it with java.util.Vector. However, if the reference is in another class file that you are using you are out of luck ( without some major hacking... basically building your own ArrayList using Vector... then putting it in java.util somehow... you get the picture... lots of coding)
Looks like OS X supports Java 2, though... so there is hope for Java on the Mac...
-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Alex Iordache
Ranch Hand

Joined: Mar 13, 2001
Posts: 62
Any suggestions on the JBindery piece? I need to create the MAC application without requiring the users to have the JBindery piece. Can I simply create the file on one machine and as long as all of the files are laid out the same, simply copy the JBindery create file to the other machines?
Alex Iordache
Ranch Hand

Joined: Mar 13, 2001
Posts: 62
You know, even after replacing all references to Arraylist, to the Vector class, now we are getting
errors that Vector is not found. I have added the file.util.vector.class file to the path, but still
nothing. I am going crazy here! Doesn't any come easy on a Macintosh.
Please any other suggestions, however insignificant they may sound.
Shruti Gongle
Greenhorn

Joined: Jun 27, 2001
Posts: 8
I have an java application, using swing, which runs perfectly on a windows machine
But when i try to view the same application on mac it gives me
java.land.NoClassDefFoundError
I have installed MRJ2.2.5 on the machine
also i have put the swingall.jar and mac.jar files in the MRJClasses folder
Further i have also put the MRJPlugin in the IE5 Plugins folder (which is the browser i use to view the application)
Even then my application doesnt work
any suggestions??
 
Don't get me started about those stupid light bulbs.
 
subject: Does MAC support Swing?