My environment is Windows 98. I installed java in the c:\jdk 1.2.2 directory with a path for this directory in autoexec.bat. Most of my source and class files are in a directory name c:\java, so I presume this is my default directory. When I want to run an application, I just type in the command "java classname" from this directory. I have a subdirectory under java called testdir. I created a source file called Forest with a package statement "package testdir;" at the beginning of the file and compiled it from this subdirectory so my class files are now in c:\java\testdir. I can't get the program to run under the c:\java directory with the command "java Forest" or under the c:\java\testdir directory with the same command. Judging from the error messages, the loader is looking for a file named testdir/Forest, so I tried using "java testdir/Forest" and that works under the c:\java directory. Isn't the forward slash a Unix naming convention for directories? Can anyone explain what is going on here?
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
posted
0
That is a bit strange. My guess is that there's some code that they developed on Solaris which they neglected to change in the Windows version. However, try "java testdir.Forest" instead - that should work, and is platform-neutral.
"I'm not back." - Bill Harding, Twister
Betty Reynolds
Ranch Hand
Joined: Feb 16, 2000
Posts: 111
posted
0
Thanks Jim. That worked.
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
dear friends , pl help me out following message is there "java.awt.event not found on import" (i am using jdk 1.2.1 ),when i try to import event package,... i have also tried to use package class to find what packages are available but again the message "package class not found " is there. how can i know what packages are there ? pl tell me thanks samar