Total members 11807 |It is currently Wed Dec 11, 2019 2:23 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka



Go to page Previous  1, 2


I feel good to know that many have similar names as that of mine..i used to thought that it is kind of least common name.... well thanks...now i have finally finished re-installing.

now too i m unable to set the permanent path of java...
i already have tried setting a path in environment variables but it still its not working so i have to set the path to bin again and again for compilation purposes...

1 more query i was running a small program and getting an error in that too...
Can u help the program is--
Code:
public class myanimallist
{
private animal[] animals = new animal[5];
private int nextindex = 0;

public void add(animal a)
{
if(nextindex < animals.length)
{
animals[nextindex] = a;
System.out.print("animal added at " + nextindex);
nextindex++;
}
}

}


public class animal
{
public static void main(String[] args)
{
myanimallist list = new myanimallist();

dog d = new dog();

cat c = new cat();
list.add(d);
list.add(c);
}
}

As i m trying to understand the polymorphism in java but i m getting 4 errors in animal class after compilation that too related with dog and cat objects or reference variables or whatsoever....




Author:
Newbie
User avatar Posts: 6
Have thanks: 0 time

You must set your JAVA_HOME variable and add it to your Path.http://www.codemiles.com/posting.php?mode=reply&f=20&sid=684d69fda86e359d58e0acfd2e146819&t=6941#

Right click on My Computer, select Properties. Select Advanced. Click on the Environment Variables button.
Add a new system variable. Name it JAVA_HOME. Its value should be the path to the top of the Java install. C:\program files\java or the equivalent.

Now edit the Path variable and add the following to the end - ;%JAVA_HOME%\bin

Save the changes.
Start a command window (Start:Run:cmd:enter) or Programs:Accessories:DOS command window). Type java -version and press enter. If you get bad command or filename, you did not set the JAVA_HOME correctly.


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

:rules: :anno: You must set your JAVA_HOME variable and add it to your Path.

Right click on My Computer, select Properties. Select Advanced. Click on the Environment Variables button.
Add a new system variable. Name it JAVA_HOME. Its value should be the path to the top of the Java install. C:\program files\java or the equivalent.

Now edit the Path variable and add the following to the end - ;%JAVA_HOME%\bin

Save the changes.
Start a command window (Start:Run:cmd:enter) or Programs:Accessories:DOS command window). Type java -version and press enter. If you get bad command or filename, you did not set the JAVA_HOME correctly.


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time
Post new topic Reply to topic  [ 13 posts ]  Go to page Previous  1, 2

  Related Posts  to : Java error
 Java download error     -  
 Error 500: java.lang.NoClassDefFoundError: org.apache.common     -  
 ERROR     -  
 Deliberate Error     -  
 Check DNS error     -  
 skymiles error     -  
 error in code     -  
 Error handling in AJAX     -  
 Invalid Argument error in IE7     -  
 AJAX SYNTAX ERROR IE     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com