Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JLaFrance

macrumors member
Original poster
May 24, 2004
90
0
I've got Mac OS 10.3.5 and I've been told that the "Java enviroment" came with OSX, but I don't know wher it is or how to set it up. Any help?



Thanks
 
what are you trying to do?

The java virtual machine and all is bundled with the OS...meaning you dont have to do anything. Java programs will run on your computer
 
JLaFrance said:
I've got Mac OS 10.3.5 and I've been told that the "Java enviroment" came with OSX, but I don't know wher it is or how to set it up. Any help?



Thanks
Why worry about where it is or how to set it up when it just works right from the start? Much better than Windows, don't you think? You use it just like any other Java environment. The javac and java commands are used to compile and run Java programs from the command line, or you can write Java code in Apple's free development tools - Xcode.
 
What do you mean "jar files don't open"? (1) If you double-click on them in Finder, they will run. (2) If you are in terminal, use "java -jar jarfile.jar" to run them. For character-mode java apps, you must run them in terminal using the second method.
 
cubist said:
What do you mean "jar files don't open"? (1) If you double-click on them in Finder, they will run. (2) If you are in terminal, use "java -jar jarfile.jar" to run them. For character-mode java apps, you must run them in terminal using the second method.


No, they don't

"Invalid or corrupt jarfile /Users/John/Desktop/JavaMBS/Code/mbsbb.jar"
 
JLaFrance said:
I've got Mac OS 10.3.5 and I've been told that the "Java enviroment" came with OSX, but I don't know wher it is or how to set it up. Any help?



Thanks

if you want to know where it is type "which java" in the terminal, this works with "which perl" etc... etc... aswell. Download Eclipse from eclipse.org its a prettie good IDE... but make sure you download the SDK version (thats the one that comes with all the Eclipse java stuff you need).
 
I cant open ANY .jar files!! they are all either corrupt of invalid, i need to open these for school.
 
JLaFrance said:
I cant open ANY .jar files!! they are all either corrupt of invalid, i need to open these for school.
Like I said earlier, try installing the Java Update to fix a corrupt Java environment, which is what I think you have.
 
Okay -- so firts off I am not sure when you say jar files do not open -- do you mean from the ui environment -- in other words have you tried to open them with something like StuffIt?

Secondly - the JRE is located in the /Library/Java/Extensions/Home

which has links to the latest commands 1.4.2 I believe -- now if you need a different version for an IDE or something -- you need to install it and then place that installation in your PATH first - does not hurt to set a JAVA_HOME env. variable either.
 
JLaFrance said:
I cant open ANY .jar files!! they are all either corrupt of invalid, i need to open these for school.


Not all .jar files are executable. The class to run on launch will be defined in the manifest file.

You should also try to run them in terminal with the command

java -jar somejar.jar [args]

For example.

java -jar helloworld.jar
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.