aspose file tools*
The moose likes Beginning Java and the fly likes Java JDK Installation Problem - Need Help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java JDK Installation Problem - Need Help!" Watch "Java JDK Installation Problem - Need Help!" New topic
Author

Java JDK Installation Problem - Need Help!

Gary Farms
Ranch Hand

Joined: Jun 24, 2000
Posts: 57
Below is my program Access.java which resides in c:\java. It generates a "NoSuchMethodError" when I run it on my Windows 2000 computer at work. When my friend here at work runs the SAME program on his Windows 2000 computer, it runs fine. I have No idea why! I suspect it's a classpath problem, but I use the same classpath on my Windows 98 computer at home w/o a problem.
For windows 2000, I set my path statement by going into the Control Panel ->System->Advanced Tab and adding a user variable named path.
To set my classpath, I use sysedit. Anyway, here's what my path and classpath statements look like in my c:\autoexec.bat
path=c:\windows;c:\windows\command;c:\java
path=c:\jdk1.3.1\jre\bin;c:\jdk1.3.1\bin;%path%
set classpath = .;%classpath%;c:\jdk1.3.1\jre\lib;c:\java\;
Finally, here's my c:\java\Access.java program that blows up (only on MY Windows 2000 machine)
//Access.java
class Other
{
public void fnc(int b)
{
System.out.println("integer received = " + b);
}
}
public class Access
{
public static void main(String[] args)
{
Other a = new Other();
a.fnc(48);
}
}
Any help would be deeply appreciated!

Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Gary, Why did you start another thread instead of just continuing the conversation. This gets really confusing for the rest of us.
So now I am going to repeat what I said 2 days ago.
At any rate. The system FOUND your class, therefore it is NOT a classpath problem. UNLESS you have more that one Access.class file on your hard drive. First thing is to make sure that there is ONLY one.
Next make sure that you did not TYPO on the main line signature. That is the MOST common cause for this error.
Finally make sure that the name of the class EXACTLY matches the name of the file and that you EXACTLY type it that way when you invoke it.
Then tell us what happened.


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

Joined: Jun 24, 2000
Posts: 57
I ran the search command and there is only 1 Access.class file in c:\java It's not a typo problem either since it's been happening for awhile now. If this is not a claspath problem, what could it be???
As I said, this program runs fine on my Windows 98 home computer, and my co-worker's Windows 2000 computer. He even watched me run it yesterday unsuccessfully on my machine, before I emailed it to him and he was able to run it fine.
This situation is getting frustrating. How can Java allow a situation like this, and make finding a solution so obscure?
Thank you for your continued support!
Originally posted by Gary Farms:
Below is my program Access.java which resides in c:\java. It generates a "NoSuchMethodError" when I run it on my Windows 2000 computer at work. When my friend here at work runs the SAME program on his Windows 2000 computer, it runs fine. I have No idea why! I suspect it's a classpath problem, but I use the same classpath on my Windows 98 computer at home w/o a problem.
For windows 2000, I set my path statement by going into the Control Panel ->System->Advanced Tab and adding a user variable named path.
To set my classpath, I use sysedit. Anyway, here's what my path and classpath statements look like in my c:\autoexec.bat
path=c:\windows;c:\windows\command;c:\java
path=c:\jdk1.3.1\jre\bin;c:\jdk1.3.1\bin;%path%
set classpath = .;%classpath%;c:\jdk1.3.1\jre\lib;c:\java\;
Finally, here's my c:\java\Access.java program that blows up (only on MY Windows 2000 machine)
//Access.java
class Other
{
public void fnc(int b)
{
System.out.println("integer received = " + b);
}
}
public class Access
{
public static void main(String[] args)
{
Other a = new Other();
a.fnc(48);
}
}
Any help would be deeply appreciated!

Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
OH!!! < the light dawns > I just remembered that Microsoft had some problems supporting Java in the early releases of Win2000. I would guess that your friend has a more recent version - or has downloaded the service packs that Microsoft put out. I don't know where the fixes for Java went in but look through these:
http://www.microsoft.com/windows2000/server/evaluation/news/bulletins/sp1.asp http://www.microsoft.com/windows2000/server/evaluation/news/bulletins/sp2.asp
If these don't fix it, we could try looking through their other documentation.
[This message has been edited by Cindy Glass (edited August 03, 2001).]
Ponraj Siva
Greenhorn

Joined: Aug 01, 2001
Posts: 5
Hai,
Fine and expect the same from u.
As what cindy Glass has said there where some bugs in early release of WIN2000 so try updating your windows2000.or try creating a batch file containing
path=%path%;c:\java;
classpath=%classpath%;c\java;
and run the batch file which may help you.
bye&have a nice day,
with regards,
Ponraj Siva
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java JDK Installation Problem - Need Help!