• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to convert Char?  RSS feed

qionghua yang
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a database table name parameter. The parameter table lists the common directory and file names used by Java program and Smalltalk program. The common direcotory and path names are like "..\Common\Out.dat". It works well in Smalltalk. But I have problem in using it in Java. In my Java program, I will have a look up in the parameter table and get the common directory. Then I use the common directory to create a file. But sine the '\', I could not get the directory correctly.
***My Java code starts here ******
//retrieve common directory from table
String fileString = retrieve(); //..Common\\Out.dat
File aFile = new File(fileString);
***My Java code Ends here ******
I would like to either find '\' and replace it with '\\'. Does anyone have the same experience?
Any hint would be really apprecited. Thanks!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!