using visual library in java applet
Hi,
I try to develop an web application which is use the java applet. So, I just want to ask, is it possible to use the netbeans visual library in the java applet? If not, which library must be used this kind of appliacation and what is the efficent developmen environment (netbeans, java studio creator ?)
best regards,
Ufuk Utku Turuncoglu
ITU, Informatics Institute
HPC Lab
# 1
> Hi,
>
> I try to develop an web application which is use the
> java applet. So, I just want to ask, is it possible
> to use the netbeans visual library in the java
> applet? If not, which library must be used this kind
> of appliacation and what is the efficent developmen
> environment (netbeans, java studio creator ?)
>
> best regards,
>
> Ufuk Utku Turuncoglu
> ITU, Informatics Institute
> HPC Lab
Depends on the format of the library; what are names the files that comprise this library?
(T)
# 3
Add org-netbeans-api-visual.jar into your jar/classpath and you should be
OKassuming your Applet is signed/jar packed, you will have to jump through
some hoops to get rg-netbeans-api-visual.jar accessible from your main
jar.
Namely....
class YourClass
{
void copyResourceFromJarToExtDir(String tResource)
{
InputStream dllInputStream = getClass().getClassLoader().getResourceAsStream(tResource);
fileSeparator = System.getProperty("file.separator").charAt(0);
String extDir = System.getProperty("java.home")+fileSeparator+"lib"+fileSeparator+"ext";
File outFile = null;
try
{
BufferedInputStream binStream = new BufferedInputStream(dllInputStream);
outFile = new File(extDir+fileSeparator+tResource);
BufferedOutputStream boutStream = new BufferedOutputStream(new FileOutputStream(outFile));
System.out.println("saveing to"+outFile.toString());
int b = -1;
while((b = binStream.read()) != -1)
{
boutStream.write(b);
}
binStream.close();
binStream.close();
boutStream.flush();
boutStream.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
To summarize pack the rg-netbeans-api-visual.jar into your Applets main jar and call copyResourceFromJarToExtDir("rg-netbeans-api-visual.jar");
In your Applet.init() and you will be able to access the rg-netbeans-api-visual.jar
directly.
Good Luck!
(T)