CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 how to set the classpaths in environmetal variables

Print topic Send  topic

Author Message
zeeshan

Posts: 1
Posted: 11/16/2007, 10:11 AM

hi,
I am new to java and I just installed jdk1.5. my programs were compiled but not executing. can any one help me to overcome this problem. while executing its showing a message like " out of bound exception"
can any one tell in detail how to set path and classpath in detail.
thanks
View profile  Send private message
andrewi

Posts: 162
Posted: 11/16/2007, 2:11 PM

I'm also new to Java, and I second your request.

I've just got some pages to execute - I found that it wouldn't even build without the correct paths and classpath set. In case it helps, this is my setup.

WinXP JDK 1.5.0_06
Tomcat 4.1 (installed to default locations),
latest Ant (no installer, just unzipped to C:\Ant).

I used Tomcat 4.1 because this version had a servlet.jar. I couldn't find the jar in later versions, and CC needs it. (I don't have a clue what any of these things are!)

These are the CC settings I have:
(in Options->Paths)
JAVA SDK Home: C:\Program Files\Java\jdk1.5.0_06
JAVVA Ant Home: C:\ant\

(in Site settings)
Class Path: C:\Program Files\Apache Software Foundation\Tomcat 4.1\common\lib\servlet.jar

Code Language: JSP 1.1 JDK 1.3
Target JDK: JDK 1.3 and 1.5 both worked (online help for this not working?)
Target Server: Tomcat 4
Manager URL: http://localhost:8080/manager
Manager login and pwd: as set during Tomcat install.
RegExpAPI: JDK1.4


All other project settings blank. This worked, using an Access database, on Tomcat running on the local machine. I tried both war-file and unpacked deployment methods; both worked.

There are two settings Server Path & Context Path. Online help just says they're for Tomcat server, but no other hints as to what they're for. I left them blank, and it worked on Tomcat.

From my 6-hours' experience of Java, I'd say that if it builds, you've probably got the environment paths right. However, I'm convinced that there are greater experts than me.

I've got to applaud CCS - It's let me build a working application in Java (or jsp or servlets) - a language I don't even know the proper name for. That's handy because I've got to write something for an iplanet server. But I'd have been grateful for a little more detail in the CCS Help File - just a bit more explanation on set up. I had to do a lot of trial and error, which should have been unnecessary.
View profile  Send private message
andrewi

Posts: 162
Posted: 11/21/2007, 5:54 AM

You can get additional debugging information to help you track problems - e.g. class files (jars) that the application cannot find at runtime.

To turn on error logging:

go to Project Settings, Server/Script
in Path To Logfile enter name of a logfile (e.g. C:\mylogfile.txt)
Set Level of Logging to Debug

Rebuild and run the problematic page(s). Failures to load class files will appear in the log file. The log file also seems to include a lot of other info that could be useful - such as the SQL being run to fill a page component.
View profile  Send private message
k_archana

Posts: 2
Posted: 01/11/2008, 3:08 AM

first goto ---mycomputer then to ---properties --then --advanced --then to --environment variables--

in environment variables
click --new --then a new window appears and in which we have to include the following 3 paths one by one
STEP 1 : 1) variable name : JAVA_HOME
2) variable path : c:\programfiles\java\jdk1.5.01
then
STEP 2 : 1)variable name : PATH
2)variable path : %path% c:\programfiles\java\jdk1.5.0-01\bin;
then
STEP 3 : 1)variable name: CLASS PATH
2)variable path : %CLASS PATH% c:\programfiles\java\jdk1.5.0-01\lib;

(if u r using servlets,then change variable path in STEP3 as : %CLASS PATH% c:\program files\java\jdk1.5.0-01\lib;D:\projar\servlet.java\sqljdbc.java; )

(here D is the directory in which i created a folder named projar ,and in this folder i have servlet.java and sqljdbc.java files. These files are the JAR Files... Iam giving my path, u change this path accoring to ur folder and directory in which the servlet.java and sqljdbc.java contain ok... if u have still problem then post ur problem i will try to clear ok..)

_________________
archana
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.