I don't like Apple's Java approach

Discussion in 'macOS' started by cube, Jan 20, 2006.

  1. cube macrumors G4

    Joined:
    May 10, 2004
    #1
    First, it's unacceptable that one must get the latest versions of OSX to have the latest versions of the JRE.

    Second, I went today to http://java.sun.com/products/archive/
    and installed and deinstalled about 10 versions of the JRE in whatever order on XP to do some testing. I also grabbed an old version of JDK 1.3 which I placed next to about other 4 newer ones on Solaris 10, to do some backporting.

    Impossible things to do on the Mac.
     
  2. mdavey macrumors 6502a

    mdavey

    Joined:
    Nov 1, 2005
    #2
    You just misunderstand how Java works on Mac OS X. The version of Java that comes with Mac OS X is the version that the OS itself uses - just like /usr/java on Solaris. As long as you have 10.4.x, you can install Apple's distribution of Java 5. If you have Mac OS X 10.3.9 or earlier, earlier versions of Java are available.

    With 10.4.x, one can have JRE 1.3.1, 1.4.0 and 5.0 installed at the same time. There is nothing stopping you from installing other versions elsewhere on the OS just as you would do with Solaris.

    Finally, Mac OS X has a mechanism that allows an application to specify its preferred version of Java (a little like you can with J2EE). I have to say that the mechanism that Apple came up with for this is better even than the one Sun uses in Solaris. Apple really have put a lot of thought into Mac OS X / Java integration.

    Do a little research (ONJava and Apple's own developer documents are a good place to start). I think you'll really like working with Java on Mac OS X once you understand how everything fits together.
     
  3. cube thread starter macrumors G4

    Joined:
    May 10, 2004
    #3
    Where does one get some version of the JRE between 1.4.2 and 1.4.2_05 to install on Tiger, how does one install it "on the side", and how does one tell the browser to use that old version of Java Web Start?
     
  4. mdavey macrumors 6502a

    mdavey

    Joined:
    Nov 1, 2005
    #4
    Are you sure there is a version of the JRE between 1.4.2 and 1.4.2_05 for Mac OS X? You may not realise that Sun doesn't actually provide versions of Java for Mac - it is up to Apple to do it.

    Your other two questions are answered in the documents I linked.
     
  5. motc777 macrumors member

    motc777

    Joined:
    Jan 18, 2006
    Location:
    Dallas
    #5
    In regards to Java on a Mac, how do you get to something that is similiar to DOS prompt inside a Mac? I think it's called a shell or something...
     
  6. cube thread starter macrumors G4

    Joined:
    May 10, 2004
    #6
    I know Apple does the porting. I don't find any of the information I need in that site.

    If you look at versiontracker, it says that "1.4.2 Update 1" is Java 1.4.2_05

    No full installers of that or the previous version to be found.
     
  7. mduser63, Jan 20, 2006
    Last edited by a moderator: Dec 1, 2013

    mduser63 macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #7
    I'm not sure that how this is related to Java, but to get a command prompt in OS X, open Terminal which is in your /Applications/Utilities folder. Remember, OS X is UNIX-based, so the command prompt is a UNIX command prompt. The default shell is BASH, but you can change it to (almost) anything you want.
     
  8. motc777 macrumors member

    motc777

    Joined:
    Jan 18, 2006
    Location:
    Dallas
    #8
    On a PC, to compile a java file, you have to do it in DOS, at least that's how they taught us in school...however, it sounds like it may be much easier in the Mac environment...thanks for answering...

    I don't know UNIX just yet...I need to learn...
     
  9. mduser63, Jan 20, 2006
    Last edited by a moderator: Dec 1, 2013

    mduser63 macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #9
    If you're good with DOS, BASH isn't too hard to learn. There are just some differences in the built in commands (DOS dir is "ls" in UNIX, move is mv, etc). The main difference between a UNIX shell and a DOS shell is that UNIX is WAY more powerful.

    You don't have to compile Java in DOS on a PC if you're using an IDE (integrated development environment), and the situation is the same on the Mac. You can use the command line, but you can also use XCode or another IDE like Eclipse or JBuilder.
     
  10. superbovine, Jan 20, 2006
    Last edited by a moderator: Dec 1, 2013

    superbovine macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
    #10
    Code:
    cow@supercow cow $javac
    Usage: javac <options> <source files>
    where possible options include:
      -g                        Generate all debugging info
      -g:none                   Generate no debugging info
      -g:{lines,vars,source}    Generate only some debugging info
      -nowarn                   Generate no warnings
      -verbose                  Output messages about what the compiler is doing
      -deprecation              Output source locations where deprecated APIs are used
      -classpath <path>         Specify where to find user class files
      -sourcepath <path>        Specify where to find input source files
      -bootclasspath <path>     Override location of bootstrap class files
      -extdirs <dirs>           Override location of installed extensions
      -d <directory>            Specify where to place generated class files
      -encoding <encoding>      Specify character encoding used by source files
      -source <release>         Provide source compatibility with specified release
      -target <release>         Generate class files for specific VM version
      -help                     Print a synopsis of standard options
    
    cow@supercow cow $
    
     

Share This Page