Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does MAC support Swing?

 
Alex Iordache
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
eric moon
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Alex Iordache
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Alex Iordache
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic