Professional Web Applications Themes

Using Java application on OS 10.2.x - Mac Programming

Is there a general method which may be followed to install an open source Java application for use on the OS 10.2.x platform? The application I have in mind (like many I've seen on sourceforge.net) is only available as source or as a UNIX or Windows binary distribution. Is using the UNIX binary distribution the best way, and if so how does one modify the shell script? I tried using the InstallAnywhere demo to create an installer from the source files, but the possibilities suggested by IA when trying to automatically find the main class did not seem to make ...

  1. #1

    Default Using Java application on OS 10.2.x

    Is there a general method which may be followed to install an open
    source Java application for use on the OS 10.2.x platform? The
    application I have in mind (like many I've seen on sourceforge.net) is
    only available as source or as a UNIX or Windows binary distribution.
    Is using the UNIX binary distribution the best way, and if so how does
    one modify the shell script? I tried using the InstallAnywhere demo to
    create an installer from the source files, but the possibilities
    suggested by IA when trying to automatically find the main class did
    not seem to make sense (they all started with "org." and the none of
    the names corresponded to the application's name and main jar archive
    file name).
    Joshua Guest

  2. #2

    Default Re: Using Java application on OS 10.2.x

    In article <google.com>,
    fr (Joshua L. Sigal) wrote:
     

    This is not only a matter of installing; there are several issues in
    building that make a Java application work well on Mac OS X. See <http://developer.apple.com/technotes/tn/tn2042.html>
     

    No. Mac users (in general) do not understand the concept of shell script
    (if they do, their Mac side does not want to see them in software
    distributions)
     

    Applications should not use installers on Mac OS X. You should
    distribute your application as a bundle that users can drag wherever
    they want. Read

    <http://developer.apple.com/doentation/MacOSX/Conceptual/BPBundles/ind
    ex.html#//apple_ref/doc/uid/10000173i>

    and
    <http://developer.apple.com/doentation/DeveloperTools/Conceptual/Softw
    areDistribution/Concepts/sd_on_mac_os_x.html#//apple_ref/doc/uid/20001758 

    To make things perfect, wrap your bundle in an internet-enabled disk
    image for download, as described in
    <http://developer.apple.com/doentation/DeveloperTools/Conceptual/Softw
    areDistribution/Concepts/sd_disk_images.html>

    Reinder
    Reinder Guest

  3. #3

    Default Re: Using Java application on OS 10.2.x

    ["Followup-To:" header set to comp.sys.mac.system.]
    On 2003-12-26, Reinder Verlinde <invalid> wrote: 
    >
    > This is not only a matter of installing; there are several issues in
    > building that make a Java application[/ref]

    The OP seems to be asking questions about running someone else's Java
    application and you're answering his questions as if he were asking
    about _developing_ a Java application of his own.


     [/ref]

    Assuming by 'binary distribution' you mean jar files, then, yes, this
    is what you want.

    If it also includes a shell script, you don't have to modify it at
    all; just run it.


     [/ref]

    Why would you want to do this? What are you trying o accomplish?




    Hugh Guest

  4. #4

    Default Re: Using Java application on OS 10.2.x

    Reinder Verlinde <invalid> wrote in message news:<wxs.nl>... 
    >
    > This is not only a matter of installing; there are several issues in
    > building that make a Java application work well on Mac OS X. See <http://developer.apple.com/technotes/tn/tn2042.html>

    >
    > No. Mac users (in general) do not understand the concept of shell script
    > (if they do, their Mac side does not want to see them in software
    > distributions)

    >
    > Applications should not use installers on Mac OS X. You should
    > distribute your application as a bundle that users can drag wherever
    > they want. Read
    >
    > <http://developer.apple.com/doentation/MacOSX/Conceptual/BPBundles/ind
    > ex.html#//apple_ref/doc/uid/10000173i>
    >
    > and
    > <http://developer.apple.com/doentation/DeveloperTools/Conceptual/Softw
    > areDistribution/Concepts/sd_on_mac_os_x.html#//apple_ref/doc/uid/20001758 
    >
    > To make things perfect, wrap your bundle in an internet-enabled disk
    > image for download, as described in
    > <http://developer.apple.com/doentation/DeveloperTools/Conceptual/Softw
    > areDistribution/Concepts/sd_disk_images.html>
    >
    > Reinder[/ref]


    Thank you very much. Perhaps I should have made clear that I would
    like to be a user of the open source application in question on my
    Mac, and am not its developer.

    Joshua
    Joshua Guest

  5. #5

    Default Re: Using Java application on OS 10.2.x

    Hugh Wolf <lieder.de> wrote in message news:<1IWGb.661685$Tr4.1666290attbi_s03>... [/ref]
    >
    > Assuming by 'binary distribution' you mean jar files, then, yes, this
    > is what you want.
    >
    > If it also includes a shell script, you don't have to modify it at
    > all; just run it.
    >
    >
    >[/ref]
    But as far as I can tell, a UNIX shell script won't work on the Mac as
    is, and I'm not sure what changes to make in the classpaths, etc. The
    script included in this case is a bash script. I suppose it should be
    a tcsh script for the Mac but I'm not sure what else to change and
    how.

    Joshua
    Joshua Guest

  6. #6

    Default Re: Using Java application on OS 10.2.x

    In article <google.com>,
    fr (Joshua L. Sigal) wrote:
     
    > >
    > > Assuming by 'binary distribution' you mean jar files, then, yes, this
    > > is what you want.
    > >
    > > If it also includes a shell script, you don't have to modify it at
    > > all; just run it.
    > >
    > >
    > >[/ref]
    > But as far as I can tell, a UNIX shell script won't work on the Mac as
    > is, and I'm not sure what changes to make in the classpaths, etc. The
    > script included in this case is a bash script. I suppose it should be
    > a tcsh script for the Mac but I'm not sure what else to change and
    > how.
    >[/ref]
    bash scripts can be run from any shell worth its money, if they start
    with #!/bin/sh (bash is almost 100% compatible with sh; on Mac OS X
    10.3, 'sh' and 'bash' even are identical; hopefully nobody ships scripts
    that work in bash, but not in sh.)

    It might be that all you need to do is setting an environment variable,
    like this:

    #!/bin/sh
    JAVA_HOME="/System/Library/Frameworks/JavaVM.Framework/Home"
    export JAVA_HOME
    <full path to your shell script>/startup.sh

    If you need more help for this program, it will help to be more specific:

    - what program did you download?
    - what did you try to make it run?
    - what errors occurred? (it may help to look at the console;
    there's an application to do that in /Applications/Utilities)

    Reinder
    Reinder Guest

  7. #7

    Default Re: Using Java application on OS 10.2.x

    Joshua L. Sigal wrote:
     
    >>
    >>Assuming by 'binary distribution' you mean jar files, then, yes, this
    >>is what you want.
    >>
    >>If it also includes a shell script, you don't have to modify it at
    >>all; just run it.
    >>
    >>
    >>[/ref]
    >
    > But as far as I can tell, a UNIX shell script won't work on the Mac as
    > is[/ref]

    Are you talking about the OS X running Mac or? OS X _is_ a unixalike os
    and therefore should be able to interpret most of the generic shell
    scripts without problems.

    , and I'm not sure what changes to make in the classpaths, etc. The 

    I believe it should be a generic "sh" script, which would run on every
    sh-compatible shell. But - if really needed - you can run bash on the OS
    X without problems. Just type 'bash' at the prompt. But I doubt you
    really need it.

    As to your question - most often the thing you need to adapt when trying
    to run a generic Java app is the JAVA_HOME (or similarly named
    variable), which needs to point to the proper directory to tell the
    script where your Java distribution is located. The same applies for
    other platforms too.

    Might be that you tell what app it is that you need and someone can try it?
    silverdr Guest

  8. #8

    Default Re: Using Java application on OS 10.2.x

    ["Followup-To:" header set to comp.sys.mac.system.]
    On 2003-12-26, Joshua L. Sigal <fr> wrote: 
    > But as far as I can tell, a UNIX shell script won't work on the Mac as
    > is[/ref]

    As others have already said, it will run fine in 10.2.x. Just open a
    Terminal window and run it in the usual way.

    If you're trying to launch it from the Finder or Dock, you have to
    treat as a doent of the Terminal application. As far as the Finder
    is concerned, it's not a launchable osx application.






    Hugh Guest

  9. #9

    Default Re: Using Java application on OS 10.2.x

    silverdr <remove.it.pl> wrote in message news:<3fec83c5$inet.com.pl>...
     

    The application is the Frankenstein Translation Memory Suite
    <http://sourceforge.net/project/showfiles.php?group_id=93792>.
    When I tried to open the Frankenstein.jar with Java Browser (looking
    for classes with the main() method since I thought I wanted to build a
    Mac app in order to use the project on my machine), it was completely
    blank. Double-clicking this jar does not work. How would I run this
    kind of application from the Terminal?
    Joshua Guest

  10. #10

    Default Re: Using Java application on OS 10.2.x

    In article <google.com>,
    fr (Joshua L. Sigal) wrote:
     
    >
    > The application is the Frankenstein Translation Memory Suite
    > <http://sourceforge.net/project/showfiles.php?group_id=93792>.
    > When I tried to open the Frankenstein.jar with Java Browser (looking
    > for classes with the main() method since I thought I wanted to build a
    > Mac app in order to use the project on my machine), it was completely
    > blank.[/ref]

    To see the inside of the jar file, do "jar tf Frankenstein.jar" in a
    Terminal window.
     

    If I double-click Frankenstein.jar under Mac OS X 10.3.2, it does work
    (it starts, shows a window, and allows me to open one of the sample
    files)

    When it does not work, is there any error message
    - on screen (e.g. in an alert)?
    - in the console? (start /Applications/Console)

    Reinder
    Reinder Guest

  11. #11

    Default Re: Using Java application on OS 10.2.x

    Reinder Verlinde <invalid> wrote in message news:<wxs.nl>... 
    > >
    > > The application is the Frankenstein Translation Memory Suite
    > > <http://sourceforge.net/project/showfiles.php?group_id=93792>.
    > > When I tried to open the Frankenstein.jar with Java Browser (looking
    > > for classes with the main() method since I thought I wanted to build a
    > > Mac app in order to use the project on my machine), it was completely
    > > blank.[/ref]
    >
    > To see the inside of the jar file, do "jar tf Frankenstein.jar" in a
    > Terminal window.

    >
    > If I double-click Frankenstein.jar under Mac OS X 10.3.2, it does work
    > (it starts, shows a window, and allows me to open one of the sample
    > files)
    >
    > When it does not work, is there any error message
    > - on screen (e.g. in an alert)?
    > - in the console? (start /Applications/Console)
    >
    > Reinder[/ref]

    When I double-click Frankenstein.jar from the binary distribution, I
    only get a single "align" menu, with no main application window. I
    guess I'll have to wait until I upgrade to Panther to try it again
    (although theoretically I shouldn't need to).

    Joshua
    Joshua Guest

  12. #12

    Default Re: Using Java application on OS 10.2.x

    Joshua L. Sigal wrote: 
    >
    >
    > The application is the Frankenstein Translation Memory Suite
    > <http://sourceforge.net/project/showfiles.php?group_id=93792>.[/ref]

    OK. I downloaded the file:

    http://prdownloads.sourceforge.net/frankenstein/FrJr15_bin.zip?download
     

    If you downloaded the same distro file, unpacked it, then open the .jar
    with a finder, not Java Browser (check the file size if unsure). If this
    doesn't help, check if your Java instalation is actually working.

    Open the terminal and type in 'java -version'. You should get a response
    similar to the one below. If not - look for errors in your Java
    installation.


    ********************
    shanghai:~$ java -version
    java version "1.4.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-69.1)
    Java HotSpot(TM) Client VM (build 1.4.1_01-24, mixed mode)
    ********************

    Assuming it was ok You can now try to start the app from the terminal:

    **********************
    shanghai:~$ java -jar Desktop/FrJr/Frankenstein.jar
    **********************

    If it still fails to start, you should at least get some messages in the
    terminal window.

     

    I suppose either your file is broken or your Java installation is. It
    should run with double click as it does here.
    silverdr Guest

  13. #13

    Default Re: Using Java application on OS 10.2.x

    Joshua L. Sigal wrote:

    [...]
     
    You shouldn't. It works on Jag here.

    Maybe you have to wait a bit longer? If your machine is not the fastest
    and the RAM is not... you know ;-) it might take some time...
    silverdr Guest

Similar Threads

  1. DB java application
    By pacalla in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: November 16th, 02:54 AM
  2. Jrun & Java Application server
    By kmandal in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: March 23rd, 09:37 PM
  3. Passing parameters from t Java application to Flash
    By Francesco in forum Macromedia Flash
    Replies: 0
    Last Post: January 7th, 10:40 AM
  4. Fast CGI Vs Java Application Servers
    By Charles Handy in forum PERL Miscellaneous
    Replies: 10
    Last Post: July 1st, 12:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139