help with properties class
- From: divyatiwari123@xxxxxxxxx
- Date: 27 Feb 2007 23:17:37 -0800
What am I doing wrong in this program??
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
import java.util.Properties;
class PropEg
{
public static void main(String arg[])
{
Properties p;
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
String pvalue = p.getProperty("path");
System.out.println("Property path="+pname);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I'm getting the following errors:
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
3 errors
.
- Follow-Ups:
- Re: help with properties class
- From: Andrew Thompson
- Re: help with properties class
- Prev by Date: Re: Parsing or Casting a JtextField? Help requested....
- Next by Date: Re: Making a panel and its contents transparent
- Previous by thread: Parsing or Casting a JtextField? Help requested....
- Next by thread: Re: help with properties class
- Index(es):