Please look at below and let me know if some one has solution for this issue.
when the code is trying to import the class directly an error is displayed saying " '.' expected ".
I tires with JDK 1.5 , JDK 1.3 and JDK 1.4 , results are same.. If this is resolved with any updated version of JDK, let me the version(minor) so that i can compile the actual classes of the application.
Example programs:-
Is there any way that Y imports the X class without receive the:
Last edited by Scott; 12-08-2010 at 11:04 AM..
Reason: Please use code tags
Here class X is in default package (actually called unnamed package) and class Y is in a named package (ypkg). An unnamed package class can't be imported in any other package. To import a class in some other named package, that class has to be in some named package.
So you can put class X in some package and then import it.
Classes in unnamed package can ONLY be used by other classes in unnamed package. They are visible to other members of the unnamed package since they
are in the same package, but they are not visible to compilation units in
other packages.
classes X, Y without package name are not getting imported. The error is with JDK 1.6 .. I require the working JDK for this type of importing ? I cannot move the classes and class has to be imported explicitly.
Your code might work if you drop the import statement for the class in the unnamed package. But if it doesn't work, you have code that doesn't conform to the language standard as implemented by the JDK you're trying to use.
That means you change the code or you change the JDK you're using.
I just downloaded jdk, but am unsure about updating the PATH variable.
What steps should I follow ? Evidently I have to/prefer to be logged in as root to
install jdk on my UBUNTU 10.04 linux.BTW, this question needs to go in another
forum, but out of disuse I have forgotten my root... (1 Reply)
Hello,
I have installed the default JDK from Software centre, but when i type whereis JDK on the terminal.. i don't see any path :mad:
i need JDk to install a tool ... Hurry!!! please HELP:confused::confused: (4 Replies)
Current platform: Sun OS 5.9 Solaris
isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
Problem: Fail to start tomcat server
ps -ef | grep tomcat
nothing displays...
Steps:
Installed jakarta-tomcat-5.0.30
Installed jdk 1.6 and set path in profile... (11 Replies)
hi all i tried to install jdk on solaris 10 2008 and i used these packages in installation
pkgadd -d SUNWj5cfg SUNWj5dmo SUNWj5dev SUNWj5rt SUNWj5jmp SUNWj5man
all was good except one (SUNWj5rt)
some of the output
ERROR: attribute verification of... (3 Replies)
I'm trying to install JDK (Java Development tools) and i get this:
WARNING:
The <SUNWj6dev> package "JDK 6.0 Dev. Tools (1.6.0)" is
a prerequisite package and should be installed.
WARNING:
The <SUNWj6rtx> package "JDK 6.0 64-bit Runtime Env.
(1.6.0)" is a prerequisite package and should be... (0 Replies)
Hello,
I try to find the file jdk-1.3.1_03-fcs.rpm (pre-requisite for Oracle Applications 11.5.8) for Linux x86 but it doesn't available anywhere...
Maybe here, somebody have it ? :o
Rgds (1 Reply)
Hi,
some questions please :
1- what does do instfix ?
2- what does lslpp -l ?
3- how to verify JDK version on a UNIX server (AIX) ?
Many thanks before. (2 Replies)