• 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

Compile error

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't seem to figure out why this code won't compile. I keep getting this error message:
Sort.java:22: cannot resolve symbol
symbol : method sort (java.lang.String[])
location: class Arrays
Arrays.sort(s);
^
1 error
I have j2sdk 1.4.1.02 installed
Thank you for any responses.

import java.util.*;
public class Sort
{
public static void main(String argv[])
{
Sort s = new Sort();
}
Sort()
{
String s[] = new String[4];
s[0]="z";
s[1]="b";
s[2]="c";
s[3]="a";
Arrays.sort(s);
for(int i=0;i< s.length;i++)
System.out.println(s[i]);
}
}
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jacob,
Gee dude, it compiles and runs fine on my machine. What OS are you using?
Michael Morris
 
Jacob Michaels
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using XP Home
I am also using TextPad editor.
Just for grins, I typed the command in the command prompt and it compiled and ran fine;
maybe I need to see if I have the lastest version of TextPad.
Thank you!!
[ March 29, 2003: Message edited by: Jacob Michaels ]
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jacob,
I use TextPad also. It's as close to an IDE as an old fart like me is going to get. You can check the command for compile Java with Configure->Preferences. When the dialog comes up, click the + on Tools and highlight Compile Java, you can fully qualify the compiler path, add command line parameters, etc.
Michael Morris
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic