Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netbeans installation problem with java 1.4? 1

Status
Not open for further replies.

rahmanjan

Programmer
Apr 13, 2003
180
AU
hi all,

I have installed Netbeans 3.4.1 and when i am trying to run it it raises the error.

"Java 1.3 or later cannot be found in your machine. ..."

I have jdk 1.4 and it is working properly. what can go wrong?

did anyone had the same problem?

regards
 
Do you have the JAVA_HOME Defined to the location of your J2SE install?
 
sorry

i don't know what you pointing to.
please elaborate bit

regards
 
If you are using Windows do the following:

1. go to your Control Panel
2. Click on the System Icon
3. Go to the Advance Tab
4. Click on Enviroment Variables
5. Under System or User variables do the following:
- Create a Variable called JAVA_HOME
- Under Variable value: insert the location on the Java directory. For Example if you install the Java SDK on C:\Java1.4.1 then that will be you Variable value.

Hopefully that is the problem.
 
thanks a lot Jvz,

So kind of you. But i forgot last time to tell i am running it in win 98 and aparently No Advanced tab in my System's. Anyways to set in in win 98 or Netbean is designed only for NTs?

regards
 
I would think so... Check/Do the following: (let me know if after doing the following it does not work)... Also (sorry for the dumb question) can you make sure that you download the SDK...and not the JRE.

Update the PATH variable
You can run the Java 2 SDK without setting the PATH variable, or you can optionally set it as a convenience.
Should I set the PATH variable?
Set the PATH variable if you want to be able to conveniently run the Java 2 SDK executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. If you don't set the PATH variable, you need to specify the full path to the executable every time you run it, such as:

C:> \jdk1.3.1\bin\javac MyClass.java

It's useful to set the PATH permanently so it will persist after rebooting.
How do I set the PATH permanently?
To set the PATH permanently, add the full path of the jdk1.3.1\bin directory to the PATH variable. Typically this full path looks something like C:\jdk1.3.1\bin. Set the PATH as follows, according to whether you are on Windows NT or Windows 95/98/2000/ME.


Capitalization doesn't matter. Click "Set", "OK" or "Apply".
The PATH can be a series of directories separated by semi-colons (;). Microsoft Windows looks for programs in the PATH directories in order, from left to right. You should only have one bin directory for a Java SDK in the path at a time (those following the first are ignored), so if one is already present, you can update it to jdk1.3.1.


The new path takes effect in each new Command Prompt window you open after setting the PATH variable.

Windows 98, Windows 95 -
To set the PATH permanently, open the AUTOEXEC.BAT file and add or change the PATH statement as follows:

Start the system editor. Choose "Start", "Run" and enter sysedit, then click OK. The system editor starts up with several windows showing. Go to the window that is displaying AUTOEXEC.BAT.

Look for the PATH statement. (If you don't have one, add one.) If you're not sure where to add the path, add it to the right end of the PATH. For example, in the following PATH statement, we have added the bin directory at the right end:

PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1\BIN

Capitalization doesn't matter. The PATH can be a series of directories separated by semi-colons (;). Microsoft Windows searches for programs in the PATH directories in order, from left to right. You should only have one bin directory for a Java SDK in the path at a time (those following the first are ignored), so if one is already present, you can update it to jdk1.3.1.

To make the path take effect in the current Command Prompt window, execute the following:
C:> c:\autoexec.bat

To find out the current value of your PATH, to see if it took effect, at the command prompt, type:
C:> path

Also in the autoexec.bat Add the line:

set JAVA_HOME = <Place the location on the Java SDK Here>


Check the CLASSPATH variable

The CLASSPATH variable is one way to tell applications written in the Java programming language (including the Java 2 SDK utilities) where to look for user classes (classes that you develop). (The -classpath command-line switch is the preferred way.) If your machine does not have the CLASSPATH variable set, you can ignore the rest of this step. To check this, run the set command from the DOS prompt:
C:> set

If CLASSPATH does not appear in the list of settings, it is not set. If your CLASSPATH variable is set to some value, you may want to clean up your CLASSPATH settings, so read on.
Should I modify the CLASSPATH variable?
The Java 2 SDK will work fine even if CLASSPATH is set for an earlier version of the SDK software, as long as it contains the current directory &quot;.&quot;. However, if your CLASSPATH contains classes.zip (which was only in JDK 1.0.x and JDK 1.1.x), and you don't plan to continue using those earlier versions, you can remove that setting from the CLASSPATH now. In any case, if CLASSPATH is set, it should include the current directory -- this makes it possible to compile and then run classes in the current directory.

How do I modify the CLASSPATH?
Use the same procedure you used for the PATH variable in the previous step and either:

Remove the CLASSPATH environment variable entirely.
With Java 2 SDK, the default value is &quot;.&quot;, the current directory. To include any user classes, use the -classpath command line switch instead with java, javac, javadoc and other tools. This is the recommended approach because it doesn't force one CLASSPATH for all applications.
-OR-
If you have applications that require CLASSPATH be set, keep those required user classes in CLASSPATH and include the current directory &quot;.&quot; If you're no longer using JDK 1.1.x, remove classes.zip.
 
Thanks for your kind and long info ;-)

I appreciate it. I will try to consider it later, right now i am in my win XP ... so ...

But still what about the JAVA_HOME thing for windows 98?

regards
 
In the AUTOEXEC.BAT add the following line.

SET JAVA_HOME = C:\Java1.4.1 (The location on your JAVA install).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top