dcsimg
trouble with getCodeBase()
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alcene_Ester
Posted On:   Tuesday, November 19, 2002 01:40 PM

Hi! I'm trying to use the getCodeBase() method in my applet so as to load server side files whlie allowing this code to be portable (online & offline use). My IDE (Forte) or maybe my classpath doesn't contain the right information since I can't compile the code. here is a sample of it: URL fileURL=new URL(getCodeBase().toString() + fileName); I do seem to import the right files: import java.awt.*; import java.awt.event.*; import java.applet.*; import java.net.*; import java.io.*; But this doesn't seem to be enough... I still get this error message:------------- IO.java [15] cannot resolve symbol    More>>

Hi!

I'm trying to use the getCodeBase() method in my applet so as to load server side files whlie allowing this code to be portable (online & offline use). My IDE (Forte) or maybe my classpath doesn't contain the right information since I can't compile the code. here is a sample of it:


URL fileURL=new URL(getCodeBase().toString() + fileName);


I do seem to import the right files:

import java.awt.*;

import java.awt.event.*;

import java.applet.*;

import java.net.*;

import java.io.*;


But this doesn't seem to be enough...

I still get this error message:-------------

IO.java [15] cannot resolve symbol

symbol : method getCodeBase ()

--------------------------------------------


any help is welcome!


gracias!    <<Less

Re: trouble with getCodeBase()

Posted By:   Alcene_Ester  
Posted On:   Tuesday, November 19, 2002 03:21 PM

K Actually I found the answer...after 4weeks!, pfff

Nobody ever mentions anywhere that getCodeBase() works only in the same class as that of the init() method!!!!!!!

So there you go.. for those who had the same problem.



Ciao Gringos!
About | Sitemap | Contact