Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

java execution path

Posted on 2002-04-16
8
Medium Priority
?
729 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
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 
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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

650 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