Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
sk8save #1
New instance of Java Class
I have this:
f = CreateObject("java","java.io.FileInputStream");
The class that i'm creating an instance of:
public FileInputStream(String name)
I tried:
f =
CreateObject("java","java.io.FileInputStream").new Instance("#fullPathFileName#")
;
This didn't work. Any ideas how else I could create a new instance of the
class I mention?
sk8save Guest
-
instance of class into sub?
How can i put cgi instance into sub? i have main cgi script: #!/usr/bin/perl -w use CGI; use strict; use makepage; .... my $cg=new CGI; ....... -
Instance- and class-variables (was mixing in class methods)
Hi -- On Thu, 2 Oct 2003, Mark J. Reed wrote: Also, every object should have the right to maintain state in instance variables that are... -
Instance- and class-variables (was mixing in class methods)
Hi -- On Fri, 3 Oct 2003 dblack@superlink.net wrote: And of course the fact that it might actually be self.class.class_eval { @var } also... -
Instance- and class-variables (was mixing in class methods)
Hi -- On Thu, 2 Oct 2003, Gavin Sinclair wrote: Ummm, what array? :-) I think you'd need something like: class Project class << self... -
Can't find class java.lang.NoClassDefFoundError. (Wrong class path?)
While creating JVM, I am getting the following error: Can't find class java.lang.NoClassDefFoundError. (Wrong class path?) I gave all the... -
Symantec #2
Re: New instance of Java Class
Coldfusion uses "init" to create a instance. So you might want to try:
objFile = CreateObject("java","java.io.FileInputStream");
f = objFile.init("#fullPathFileName#");
Originally posted by: sk8save
I have this:
f = CreateObject("java","java.io.FileInputStream");
The class that i'm creating an instance of:
public FileInputStream(String name)
I tried:
f =
CreateObject("java","java.io.FileInputStream").new Instance("#fullPathFileName#")
;
This didn't work. Any ideas how else I could create a new instance of the
class I mention?
Also, if I'm to catch the proper Exceptions, would this be the appropriate way
to do so?
<cfcatch type="java.io.FileNotFoundException">No file!</cfcatch>
Symantec Guest



Reply With Quote

