Launch swing GUI on MAC

I developed a swing GUI recently. It works perfectly under Linux, Unix, Windows, but the users of the GUI will run it on MAC. I haven't any idea about MAC. Does anybody give me some suggestions about
How to launch my application on mac?
Are there any strategies or tricks for running a swing GUI on MAC?
How can I put a shortcut or icon on user's desktop of mac so that when the user click it, my swing gui can open immediately?
Thank a million in advance

Well... on Mac OS X, it is very easy. You just put your application in a .jar file. On Mac OS X, jar files are automatically run when double clicked. You won't have to worry about downloading a jdk, because it is integrated with the system.
Mac OS 9 however only made it to jdk version 1.1.8, and you will have to use the Bindary program to make it runnable. Strongly suggest users to upgrade to Mac OS X, because on 9, it is a pain...
With pleasure,
Wannes.

Similar Messages

  • Running Swing GUI in MAC OS ?

    Hi All,
    I have been trying to run swing based GUI on MAC Operating System. I downloaded MRJ but i could not found any swing support in it. I kept swingall.jar in classpath which i took from Window's JDK. But no use.
    Can anybody help me out to run a simple GUI on MAC ?
    Hopeing for a favourable response.
    Kind Regards
    Chetan Chandarana

    If anyone wants to know where to get the swingall.jar for 1.1 go to: http://java.sun.com/products/jfc/download.archive.html#1.1.1
    get the tar or zip file. Then put the swingall where impatient1 says to and swing will work.
    You can also get lots of information on setting up Mac Classic for Java from:
    http://lists.apple.com/mailman/listinfo/java-dev
    on apple's web site. You can search the archives with a username and password listed on that page.
    I could not find any information on the collections zip that impatient1 mentions in the post. If anyone knows where you can get that and if it really works, I would really like to know. :)

  • Launching Swing GUI from Oracle Forms Web Based

    Hi there,
    I have oracle forms which call a shell script which initiates the java swing gui. I am using host command to run this script. When I am doing it on unix server everything works fine. Now we want same application on web now i am getting problem. The host command is not working in this case. It can not launch the java gui. Can anybody tell me what will be the nice approach to do it.
    Thanks
    Ranjan

    Hi,
    you'll have to create a Java Bean in Forms that calls the runtime. You can also use webutil, available on otn to call a client side host command.
    Frank

  • SAP GUI for Mac OS X 10.4

    I want to upgrade my Macs to Apples current operating system Mac OS X 10.4.1 Tiger. I had read few weeks ago, the JAVA-Implementation doesn't work with any SAP GUI for Java. SAP has recommended, to still work with Mac OS X 10.3.9 and SAP GUI for Java 6.30 Revision 8.
    When will be available a working SAP GUI for Mac OS X 10.4.1 Tiger ? Has someone informations ?

    Hello all,
    I completely understand the impact of the missing Mac support. I try to explain the reason for the current situation and give an outlook.
    Starting in summer 2004, the SAPGUI development team and test labs have dedicated a significant amount of time in testing on Mac OS X 10.4 preview versions, reporting bugs and pushing Apple to fix them. We opened more than 20 bug reports, which were not exclusively related to SAP GUI, just plain JFC/Swing issues. Unfortunately two show-stoppers for SAP GUI were left at the time Apple shipped Mac OS X 10.4.
    Since April this year we are running more tests on developer preview versions of the Java 1.4.2 Release 2, which is supposed to address these issues.
    With developer preview 3, there are no severe open issues left and we are just waiting for Apple to ship the final version of JRE 1.4.2 Release 2.
    Apple has not disclosed any shipment schedules in the past and so we have not been able to plan for something. If we would have known in advance, that the final version will be that long after developer preview 3, we would have started a beta seed based on a TEA (test and evaluation agreement) at the time developer preview 3 was available (beginning of August).
    Last week Apple has indicated that the final version of Java 1.4.2 Release 2 is expected to become available every day now. I hope Apple is right and this thread will be obsolete soon. SAP GUI for Java 6.40 rev 4 including the Mac OS X version is already waiting on the loading ramp.
    If there is no final version of Java 1.4.2 Release 2 by end of September we will provide an unsupported SAPGUI based on a test and evaluation agreement.
    Best regards
    Rolf-Martin

  • Loading large files in Java Swing GUI

    Hello Everyone!
    I am trying to load large files(more then 70 MB of xml text) in a Java Swing GUI. I tried several approaches,
    1)Byte based loading whith a loop similar to
    pane.setText("");
                 InputStream file_reader = new BufferedInputStream(new FileInputStream
                           (file));
                 int BUFFER_SIZE = 4096;
                 byte[] buffer = new byte[BUFFER_SIZE];
                 int bytesRead;
                 String line;
                 while ((bytesRead = file_reader.read(buffer, 0, BUFFER_SIZE)) != -1)
                      line = new String(buffer, 0, bytesRead);
                      pane.append(line);
                 }But this is gives me unacceptable response times for large files and runs out of Java Heap memory.
    2) I read in several places that I could load only small chunks of the file at a time and when the user scrolls upwards or downwards the next/previous chunk is loaded , to achieve this I am guessing extensive manipulation for the ScrollBar in the JScrollPane will be needed or adding an external JScrollBar perhaps? Can anyone provide sample code for that approach? (Putting in mind that I am writting code for an editor so I will be needing to interact via clicks and mouse wheel roatation and keyboard buttons and so on...)
    If anyone can help me, post sample code or point me to useful links that deal with this issue or with writting code for editors in general I would be very grateful.
    Thank you in advance.

    Hi,
    I'm replying to your question from another thread.
    To handle large files I used the new IO libary. I'm trying to remember off the top of my head but the classes involved were the RandomAccessFile, FileChannel and MappedByteBuffer. The MappedByteBuffer was the best way for me to read and write to the file.
    When opening the file I had to scan through the contents of the file using a swing worker thread and progress monitor. Whilst doing this I indexed the file into managable chunks. I also created a cache to further optimise file access.
    In all it worked really well and I was suprised by the performance of the new IO libraries. I remember loading 1GB files and whilst having to wait a few seconds to perform the indexing you wouldn't know that the data for the JList was being retrieved from a file whilst the application was running.
    Good Luck,
    Martin.

  • Running a Java application from a Swing GUI

    Hi,
    I was wondering if there is a simple way to run a Java application from a GUI built with Swing. I would presume there would be, because the Swing GUI is a Java application itself, technically.
    So, I want a user to click a button on my GUI, and then have another Java application, which is in the same package with the same classpaths and stuff, run.
    Is there a simple way to do this? Do any tutorials exist on this? If someone could give me any advice, or even a simple "yes this is possible, and it is simple" or "this is possible, but difficult" or "no this is not possible" answer, I would appreciate it. If anyone needs more information, I'll be happy to provide it.
    Thanks,
    Dan

    I don't know if it is possible to run the main method from another Java app by simply calling it...
    But you could just copy and paste the stuff from your main method into a new static method called something like runDBQuery and have all the execution run from there.
    How does that sound? Is it possible?
    What I'm suggeting is:
    Original
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void main(String[] args){
    // Your method calls
    //Your initializing
    doQuery();
    }Revised:
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void doMyQuery(){
    // Your method calls
    //Your initializing
    doQuery();
    // No main needed!!
    //public static void main(String[] args){
    // Your method calls
    //doQuery();
    //}

  • Sap gui for mac

    Hi everyone,
    I have been using sap gui on windows before and now I wanted to shift to mac. can anyone please let me know how I can use Sap gui on mac os. I have installed the gui for java on my mac os but I am unable to configure it. i would greatly appreciate if anyone could help me in this issue. thank you
    regards
    rahul

    Hi
    As you have alreay installed the SAPGui for Java on MAC OS
    Please do this, to do the connection with SAP:
    Click on New System to add. Go to tab "Advanced"
    Enter the following String:
    conn=/H/<<Router String detail>>/H/<<System IP to which to connect>>/S/32<<SYstem Number>>
    Else you can create the file to connect also.
    Please check this
    SAPGUI Java Configuration

  • (Youtube-) Video in a Swing GUI

    Hey everyone,
    I'm currently trying to play a video in my Swing GUI with JMF but I really can't get it to work.
    With the help of google I got this far:
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.media.CannotRealizeException;
    import javax.media.Manager;
    import javax.media.NoPlayerException;
    import javax.media.Player;
    import javax.swing.JFrame;
    public class MediaPanel extends JFrame {
        public MediaPanel() {
            setLayout(new BorderLayout()); // use a BorderLayout
            // Use lightweight components for Swing compatibility
            Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, true);
            URL mediaURL = null;
            try {
                mediaURL = new URL("http://www.youtube.com/watch?v=Q7_Z_mQUBa8");
            } catch (MalformedURLException ex) {
                System.err.println(ex);
            try {
                // create a player to play the media specified in the URL
                Player mediaPlayer = Manager.createRealizedPlayer(mediaURL);
                // get the components for the video and the playback controls
                Component video = mediaPlayer.getVisualComponent();
                Component controls = mediaPlayer.getControlPanelComponent();
                if (video != null) {
                    add(video, BorderLayout.CENTER); // add video component
                if (controls != null) {
                    add(controls, BorderLayout.SOUTH); // add controls
                mediaPlayer.start(); // start playing the media clip
            } // end try
            catch (NoPlayerException noPlayerException) {
                System.err.println("No media player found");
            } // end catch
            catch (CannotRealizeException cannotRealizeException) {
                System.err.println("Could not realize media player");
            } // end catch
            catch (IOException iOException) {
                System.err.println("Error reading from the source");
            } // end catch
        } // end MediaPanel constructor
    }But all I get is errors:
    Warning: The URL may not exist. Please check URL
    No media player found
    Can you please please help me get this working? I would really appreciate a little walkthrough
    Best regards,
    Patrick
    Edited by: 954807 on Aug 24, 2012 6:52 AM

    Just use \ tags. People don't like to go to external sites.
    I really advise you to consider using JavaFX 2 here. Swing is old and not really supported anymore, JMF is also old and absolutely not supported anymore.                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help on right mouse click in swing GUI.

    I am working on a swing GUI interface which has Panels. One Panel contains two sub panels. I want to add the Right Mouse click feature to the panels. How should i go about achieving this? Please provide sample example if any.
    Thanks in advance.

    anyPanel.addMouseListener(new MouseAdapter(){
       public void mouseReleased(MouseEvent e){
          if(e.isPopupTrigger()){
              // right clicked
    });

  • How do I launch quicktime player on Mac Book Air?

    How do I launch Quicktime Player on Mac Book Air? I know that my computer came with it, and when I try to launch it, the icon tells me that it is Version 10.1. Nothing else happens. I wanted to watch some online videos which require the plug in, but the plug in says that it needs my permission to run. In Chrome, it is enabled, and yet it doesn't play, In Safari as well.
    Thanks in advance.

    Or try the pause key which likely the F7 key.

  • Swing issue in MAC

    I am facing peculiar issues in a Swing app on Mac OS X running JDK 1.4. The separators on the JMenus and grid lines in any JTable just don't show up on Mac. The same code works fine on Windows and Linux. Is there any thing different to be done for Mac?

    you can always change the look and feel code, I guess.
    maybe they're there but don't paint anything?

  • In this case, can I modify swing GUI out of swing thread?

    I know the Swing single thread rule and design (Swing is not thread safe).
    For time-consuming task, we are using other thread to do the task and
    we use SwingUtilities.invokeAndWait() or SwingUtilities.invokeLater (or SwingWorker) to update Swing GUI.
    My problem is, my time-consuming task is related to Swing GUI stuff
    (like set expanded state of a huge tree, walk through entire tree... etc), not the classic DB task.
    So my time-consuming Swing task must executed on Swing thread, but it will block the GUI responsivity.
    I solve this problem by show up a modal waiting dialog to ask user to wait and
    also allow user to cancel the task.
    Then I create an other thread (no event-dispatch thread) to do my Swing time-consuming tasks.
    Since the modal dialog (do nothing just allow user to cancel) is a thread spawn by
    Swing event-dispatch thread and block the Swing dispatch-thread until dialog close.
    So my thread can modify Swing GUI stuff safely since there are no any concurrent access problem.
    In this case, I broke the Swing's suggestion, modify Swing stuff out of Swing event-dispatch thread.
    But as I said, there are no concurrent access, so I am safe.
    Am I right? Are you agree? Do you have other better idea?
    Thanks for your help.

    If you drag your modal dialog around in front of the background UI, then there is concurrent access: paint requests in your main window as the foreground window moves around.

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • Spreadsheets and SWING GUI's

    I have to embed a spreadsheet facility in a SWING GUI, what is the best and easiest way to do this ??

    I am not quite sure what your problem is.
    The way I see it, your question is one of the following:
    1. How do I (generally) make a user interface on top of my dos-based program?
    2. How do I make user interfaces in swing?
    If your question is the first, I'm afraid I can't tell you either. Would seem pretty obvious to me, make a simple dialog based app, using menu's or actions to trigger tha actions that were formerly triggered by numbers, etc...
    In the other case, I recommend the java swing tutorial at http://java.sun.com/docs/books/tutorial/uiswing/
    Greetings,
    Gert

  • Error obtained when launching executable jar in Mac - Jar works in Windows

    Hi,
    I have a problem using my executable jar in mac. When I run the application(executable jar) from Windows OS, it works perfectly.
    But when I try to launch the application from Mac, I get the following error
    apples-imac:CreateJar apple$ java -jar TreeTable.jar
    Unable to load sqlite: java.lang.
    UnsatisfiedLinkError: no sqlite_jni in java.library.path
    I use the db sqlite.jar
    I had the same error when I executed the application in Windows
    E:\Personal\1>java -jar TreeTable.jar
    Unable to load sqlite: java.lang.UnsatisfiedLinkError: no sqlite_jni in java.library.path
    But, when I used sqlite_jni.dll, it solved the problem.
    Can you kindly help me by saying what need to be done, so that this error does not come anymore in mac.
    Any help in this regard will be well appreciated with dukes.
    Regards,
    Rony

    Install sqlite correctly on the Mac. It is looking for sqlite_jni.so on the java.library.path and not finding it.

Maybe you are looking for