?
Solved

java execution path

Posted on 2002-04-16
8
Medium Priority
?
727 Views
Last Modified: 2013-12-24
if i have a java class configured to be accessed (via cfobject) and it uses a .property file or writes to a log, or needs any access to the file system, where is the default location or current directory?
0
Comment
Question by:peteodonnell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 6945397
It should be based on the Java File (if its a servlet, then the web app location, if its a standard java class then wherever that it is).  Irrelevant of CF.

CJ
0
 
LVL 2

Author Comment

by:peteodonnell
ID: 6945493
out of curiousity, i wrote a small java class which creates a file and writes a line to it.  i then have a simple template which creates this class as a cfobject.  on my local machine (iis), the file is created in C:\WINNT\system32.  ???  

why?  where is this configured?  on our testing server, i am unable to find the log file and my java class is unable (i believe) to find its .properties file.
0
 
LVL 2

Author Comment

by:peteodonnell
ID: 6945504
out of curiousity, i wrote a small java class which creates a file and writes a line to it.  i then have a simple template which creates this class as a cfobject.  on my local machine (iis), the file is created in C:\WINNT\system32.  ???  

why?  where is this configured?  on our testing server, i am unable to find the log file and my java class is unable (i believe) to find its .properties file.
0
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
LVL 19

Accepted Solution

by:
cheekycj earned 400 total points
ID: 6945505
When writing log files (esp in NT environment) you should use absolute paths.

I am not sure why it is being written to the system32 dir.

As far as the properties file is, you should again provide the full path to where it is located when you are reading from it.

To make maintenance easier, I would store the log file location in the Properties file too.

Are you using your own logging code or using a logging API like log4j?

CJ
0
 
LVL 2

Author Comment

by:peteodonnell
ID: 6945736
...just my own logging class.  it's very simple, uses a printwriter to write to the same .log file and for now just writes to the current directory (whereever that is)
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6948550
IMHO, I think using absolute paths will be better than trying to figure out the configuration issue.  Absolute paths are usually recommended for files anyways.

CJ
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10784715
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation in the Cleanup topic area:

Accept cheekycj

Please leave any comments here within the next four days.

mrichmon
EE Cleanup Volunteer
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question