Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

importing java class files

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this statement in a jsp file
<%@ page import="java.util.*" %>

and I am only able to access the File class by using the following syntax
java.io.File
Where an I going wrong?
Thanks david
 
Padmaja Godbole
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To make use of File class without fully specified class name import java.io.* also.
[ July 08, 2003: Message edited by: Padmaja Godbole ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64700
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why did you think that importing java.util would also pick up java.io?
bear
 
Manish Sharma
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I don't thing there any problem in this statement. Anyway try to use this
<%@ page language="java" %>
<%@ page import="java.util.*" %>
or can you send your JSP file ?

waiting for reply
with regards
Manish

Originally posted by david allen:
I have this statement in a jsp file
<%@ page import="java.util.*" %>

and I am only able to access the File class by using the following syntax
java.io.File
Where an I going wrong?
Thanks david
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64700
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I don't thing [sic] there any problem in this statement.

While there's no problem, there's no way it is going to import the io package either. For that

is needed.
bear
[ July 09, 2003: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic