|
-
Jan 17th, 2005, 12:13 AM
#1
Thread Starter
Dazed Member
NetBeans 4.0 setup?
I just dl'ed NetBeans 4.0 and im having a bit of a problem. I've ran tomcat from dos before and when i encountered the same error i knew how to fix it, but using NetBeans i haven't a clue. This is the output when i try and Build(f11) from NetBeans.
Code:
The BASEDIR environment variable is not defined
This environment variable is needed to run this program
Out of environment space
Invalid switch
Out of environment space
Using CATALINA_BASE: C:\WINDOWS\.netbeans\4.0\jakarta-tomcat-5.0.28_base
Using CATALINA_HOME: C:\Program Files\netbeans-4.0\nb4.0\jakarta-tomcat-5.0.28
Using CATALINA_TMPDIR:
Using JAVA_HOME: C:\jdk1.5.0
Out of environment space
Out of environment space
Out of environment space
Bad command or file name
I looked up how to define the base directory and NetBeans says the following.
Base Directory. Specifies the base directory for the Tomcat Server. You can set this property when you add a Tomcat Server to the Server Registry. If you set a base directory, then that is where the Tomcat configuration files reside. One reason for specifying a separate base directory is to allow more than one user to use the same server. If no base directory is specified, then the configuration files reside in the home directory.
I still don't know what to do though. Anyone encounter the same problem?
Last edited by Dilenger4; Mar 6th, 2005 at 04:12 PM.
Reason: Uninstalled NetBeans. Went back to notepad.
-
Feb 22nd, 2005, 11:38 PM
#2
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
I hate to dig up old threads but does anyone know how i can get this thing running? Thanks.
-
Feb 23rd, 2005, 10:50 AM
#3
Re: NetBeans 4.0 setup?
if you open the XML file from the project, what does it say in the top. A simple basedir should say something like this:
Code:
<project name="test" default="all" basedir=".">
<target name="init">
<javac srcdir="tasksource" destdir="build/taskclasses"/>
<jar jarfile="mytasks.jar">
<fileset dir="build/taskclasses"/>
</jar>
<taskdef name="customtask" classname="com.mycom.MyCustomTask">
<classpath>
<pathelement location="mytasks.jar"/>
</classpath>
</taskdef>
</target>
</project>
And then a lot of comments and stuff in the middle.
Weird it didn't do that automaitcaly for you. Did you start the project in NetBeans 4.0 or did you try to import a project that was made in an older version or in an other IDE.
ØØ
-
Feb 24th, 2005, 08:20 PM
#4
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
My build.xml file has the following.
Code:
<project name="EmployeeDirectory" default="default" basedir="." xmlns:web="http://www.netbeans.org/ns/web-project/1">
<description>Builds, tests, and runs the project EmployeeDirectory.</description>
<import file="nbproject/build-impl.xml"/>
-
Feb 24th, 2005, 08:32 PM
#5
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
I created a new project. Just somthing simple so i can see what's going on. f11 then f6 and Hello World!. Very strange.
-
Feb 25th, 2005, 07:14 AM
#6
Re: NetBeans 4.0 setup?
 Originally Posted by Dilenger4
I created a new project. Just somthing simple so i can see what's going on. f11 then f6 and Hello World!. Very strange.
So it is working now? Or what?
At least the way I am doing it now when I want to use my old NetBeans 3 projects, is that I am starting a new project in NetBeans 4 with or without a main class. Then when it is created, I copy all the java files to the newly created "src/ProjectName" folder. And that works every time.
ØØ
-
Feb 28th, 2005, 08:23 PM
#7
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
Jesus im so out of it. I guess that's what happens when you stop coding for a while. The Hello World code worked cause it didn't have anything to do with accessing a database. So i will assume that the problem still stands if i try to use tomcat with NetBeans.
-
Mar 1st, 2005, 12:00 PM
#8
Re: NetBeans 4.0 setup?
Ohhh then I missunderstood your question all the time..
Well never used Tomcat before. What version are you running?
I found this BTW. Maybe it can help you on your way:
http://www.comp.dit.ie/bduggan/Cours...20NetBeans.pdf
http://web.netbeans.org/doc/UsingTomcat.html
ØØ
-
Mar 3rd, 2005, 10:28 AM
#9
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
Im running tomcat 5.0.28. Thanks for the info. I think i know what might fix my problem. Let me give it a try then ill post back.
-
Mar 3rd, 2005, 11:18 AM
#10
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
Fixed it! Stupid NetBeans comes with tomcat. So i had to change a piece of my autoexec.bat file from this, SET CATALINA_HOME=C:\Jakarta\jakarta-tomcat-5.0.28 to this, SET CATALINA_HOME=C:\Program Files\netbeans-4.0\nb4.0\jakarta-tomcat-5.0.28.
-
Mar 3rd, 2005, 11:37 AM
#11
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
Nope i thought that it was working but. When i used to run tomcat from the command line at first i would get the "Out of environment space" errors but i new how to fix the problem. This Jsp book i had gave you a way to allocate memory on the command line and it fixed everything. NoteMe ill have to read that .pdf you gave.
-
Mar 3rd, 2005, 12:11 PM
#12
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
I read the .pdf file and it says to set or change the JAVA_HOME and CATALINA_HOME environment variables go to the system applet in the control panel then advanced tab --> environment variables. Im running win98 and i dont have that so i guess it's a winxp thing. For the java_home var the .pdf says to set it to C:\Program Files\j2sdk_nb\j2sdk1.4.2 I have this directory C:\Program Files\netbeans-4.0\nb4.0 which i cannot find any version of the jdk in it or any of the sub directories. So unless i can find the directory where netbeans stores the jdk i cannot set the java_home var.
-
Mar 3rd, 2005, 08:20 PM
#13
Re: NetBeans 4.0 setup?
First of all, sorry, I have been put off a couple of days since I had to make the move to WinXP because of some DirectX compatibility..
Second of all. In Win98 and Me you change the environment variables the same way.
Go to:
Start->Run->"msconfig"
Choose the autoexec.bat tab, and edit away. Or add or what ever. About the JDK, did you download a bundle or something when you installed NetBeans? if not then you had to download the J2(SE) JDK separate, so then you can have installed it somewhere else then in your NetBeans folder. (just a shot in the dark here).
ØØ
Last edited by NoteMe; Mar 3rd, 2005 at 09:12 PM.
-
Mar 3rd, 2005, 08:28 PM
#14
Re: NetBeans 4.0 setup?
Interesting thing. Just downloading NetBeans my self here on XP. And noticed this:
Note: If you uninstall the J2SDK 1.4.2_07 software, but wish to continue using NetBeans IDE 4.0, you must set the IDE's -jdkhome parameter to point to an alternate installation of the SDK.
To change the value of -jdkhome:
1. Navigate to the bundle installation's netbeans4.0\etc directory. By default, the bundle NetBeans IDE installation is located at C:\Program Files\NetBeans4.0.
2. Open the netbeans.conf file in a text editor, and edit the netbeans_jdkhome parameter.
What does your netbeans_jdkhome parameter say?
[Edit]I just reread your first post. It looks like it is set to C:\jdk1.5.0, do you have your JDK installed there?
-
Mar 4th, 2005, 12:36 PM
#15
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
The netbeans_jdkhome parameter says netbeans_jdkhome="C:\jdk1.5.0" which is now incorrect because i moved it to C:\Program Files\netbeans-4.0\nb4.0\ but everything should have been ok before i move it cause the jdk_home param was pointing to the correct place. Ill edit the jdk_home param in the netbeans.conf to point to the new jdk location and see if that solves the problem.
-
Mar 4th, 2005, 01:53 PM
#16
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
While i can run NetBeans now instead of getting that "Cannot find java.exe" dialog after double clicking the netbeans icon on my desktop. The other problem still remains. When i ran tomcat from the command line i used to get the same "Out of environment space" errors. I fixed it typing in somthing that was in a Jsp O'reilly book but i don't have access to it anymore. Even if i did i wouldn't know what to do since tomcat is running from NetBeans and not the commandline.
Code:
The BASEDIR environment variable is not defined
This environment variable is needed to run this program
Using CATALINA_BASE: C:\WINDOWS\.netbeans\4.0\jakarta-tomcat-5.0.28_base
Using CATALINA_HOME: C:\Program Files\netbeans-4.0\nb4.0\jakarta-tomcat-5.0.28
Using CATALINA_TMPDIR:
Using JAVA_HOME: C:\Program Files\netbeans-4.0\nb4.0\jdk1.5.0
Out of environment space
Invalid switch
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Bad command or file name
-
Mar 4th, 2005, 02:00 PM
#17
Re: NetBeans 4.0 setup?
Did you add JAVA_HOME and CATALINA_HOME to your system environment variables too?
[Edit] Remember that you have to restart for the changes in system environment variables to take effect.
ØØ
-
Mar 4th, 2005, 02:16 PM
#18
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
Posted byNoteMe
Did you add JAVA_HOME and CATALINA_HOME to your system environment variables too?
Since tomcat comes bundled with NetBeans it looks like they are already added.
I just wish i knew what the BASEDIR environment variable was.
-
Mar 4th, 2005, 02:20 PM
#19
Re: NetBeans 4.0 setup?
As you posted your self 10 posts or so up, it looks like your basedir is set to ".", guess that means that it is pointing to the dir you have your app in. Not sure though.
But about the "out of environment space". Think this might help:
20. (Sect. 2) How do I fix the message about "out of environment space"?
[*] This occurs under Windows when you have long CLASSPATH names. You
need to increase the environment space. On Windows 95,8 put this in
your c:\windows\system.ini
[NonWindowsApp]
CommandEnvSize=4096
On NT you can right-click on My Computer, select System Properties then
go to the Environment tab and then increase COMSPEC to the value you
want.
The previous suggestion to put this in your config.sys:
shell=command /e:4096
apparently causes you to create two copies of command.com which wastes
memory.
-
Mar 4th, 2005, 02:32 PM
#20
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
Ill try that. Might just do the trick.
-
Mar 6th, 2005, 04:11 PM
#21
Thread Starter
Dazed Member
Re: NetBeans 4.0 setup?
Nope didn't work. I put [NonWindowsApp] CommandEnvSize=4096 in the system.ini file and the "Out of environment space" errors keep popping up. I uninstalled NetBeans and went back to using notepad. Im moving in a couple of weeks so ill just use notepad for now then i probably go back to using Eclipse. Thanks for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|