This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes URL is not a String ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "URL is not a String ???" Watch "URL is not a String ???" New topic
Author

URL is not a String ???

achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
Hi.
I tried to get the URL thru getCodeBase(), but got an error "cannot resolve symbol"
The following snippet compiles.

Howver I do not want the "/" there, so how do I turn it the getCodeBase() into a string ???
toString(getCodeBase()) throws up all sorts of errors.


humanum errare est.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
How about getCodeBase().toString()


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
THX Thomas
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: URL is not a String ???