wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes What sdk's to load Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What sdk Watch "What sdk New topic
Author

What sdk's to load

jim, valenta
Ranch Hand

Joined: Mar 16, 2001
Posts: 47
Hi,
I had JAVA 1.22 for 3D, JRE 1.3.1.01 and SDK 1.3, SDK 1.3.0.02, 3D-1-1-1beta opengl-sdk loaded on my computer. I wanted to update to the newest versions so I downloaded
j2sdk-1-4-0 beta2.win.exe {which installed java2SDK standard Edition v1.4.0 and Java2 Runtime Environment Standard Edition v1.4.0) Also
Java Runtime Environment Standard Edition v1.3
Lastly,m I added 2 new applications for 3d: [3d-1-2-1_03 opengl-sdk and 3d-1-2-1_03 opengl-rt]
My problem is that when I run java space filename at the prompt that it saysbad copmmand or file name. I know the file name is correct. Can anyone tell me if I am using the correct sdk's and jre's??
Thanks
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
You need to get your classpath set to look in the right places for the class files.
From http://developer.java.sun.com/developer/onlineTraining/JavaIntro/contents.html

Runtime Environments and Class Path Settings
The Java runtime environment dynamically loads classes upon the first reference to the class. It searches for classes based on the directories listed in the environment variable CLASSPATH. If you use an IDE, it may automatically handle CLASSPATH internally, or write a classpath setting to the appropriate system file during installation.
If you do not use an IDE, for example, if you're using the Java 2 SDK, you may have to set a classpath before running the Java compiler and interpreter, javac and java, respectively. Also, note that in some situations the installation procedure will automatically update the PATH environment variable, but if you're unable to run javac or java, be aware that this setting could be unchanged.
PATH environment variable settings vary across operating systems and vendors. In a Windows environment, the following setting augments the old/existing PATH setting (%PATH%) with C:\java\bin, the default installation directory for the JDK:
set PATH=%PATH%;C:\java\bin
For this example, when attempting to run a Java IDE, or the Java 2 SDK's compiler or interpreter, Windows includes the directory C:\java\bin in the search for the executable program. Of course, this setting (C:\java\bin) will vary from one developer environment to the next. Note that the path separator character is ; for Windows environments and : for UNIX environments.
If you find it necessary to set the CLASSPATH environment variable, for example, if you're using an early JDK from Sun, it should include all directories on your computer system where you have Java class files that you want the Java compiler and interpreter to locate. As you add new class-file directories, you will typically augment this classpath setting. In a Windows environment, the following statement sets CLASSPATH to include three components/sites:
set CLASSPATH=C:\java\lib\classes.zip;C:\myjava\classes;.
Note that this setting includes a zipped class file archive classes.zip in the lib directory of a particular Java environment's distribution directory, represented generically here as C:\java\. That is, most Java environments can read class files stored in archive files of type .zip and .jar, as well as unarchived class files in any specified directory. During installation, many Java environments "remember" the location of their class files; thus, setting the Java environment's class file location is not necessary. For instance, the Java 2 platform works properly without setting the environment variable (and stores the runtime classes in rt.jar, not classes.zip).
In this example, CLASSPATH's semicolon-separated entries also include C:\myjava\classes, a personal/user collection of class files, and ., which represents the current directory. The latter setting is convenient for working with Java class files in an arbitrary directory that's not listed in the classpath setting.
Windows 9x and NT/2000 users can set classpaths manually with a text editor in the file autoexec.bat, plus Windows NT/2000 users can set a classpath via the control panel's System dialog. UNIX users can set a classpath manually in the appropriate shell script's configuration file. Please refer to the appropriate system reference books and documentation that describe how to set an environment variable.


"JavaRanch, where the deer and the Certified play" - David O'Meara
jim, valenta
Ranch Hand

Joined: Mar 16, 2001
Posts: 47
Hi,
I may be confused. Is JAVA 2 newer than the ones I installed?? If I want to use it for JAVA and JAVA 3d then what files would I need??
jim, valenta
Ranch Hand

Joined: Mar 16, 2001
Posts: 47
Hi,
Thanks, I got it loaded.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Java 2 is a generic term for any release after 1.2. At that time there was such a HUGE change in the language that they felt that it deserved a different title.
You don't need to load them ALL. Just load the one version that you intend to work in. It includes all the previous class files.
 
Don't get me started about those stupid light bulbs.
 
subject: What sdk's to load