• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java JDK Installation Problem - Need Help!

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!

 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Gary Farms
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic