Parent directory for EM10g GRID
Hi,
i have a default database 10g in linux system under parent directory as
/home/oracle/oracle/product/10.2.0...
now when i am trying to install EM grid control wiht new database, i give parent directory as
/home/oracle/oracle/OracleHomes/....
is this correct? Can someone help me please.
Thanks,
Philip.
It is correct. What ever you call or where ever you install your Oracle Home is up to you.
Similar Messages
-
According to http://www.oracle.com/technology/software/new_downloads.html there should be a new download EM10g Grid Control Release 2 (10.2.0.1) for HP-UX Itanium. Unfortunately I cannot find the software on the download page. Can anyone help?
Kind regards..........LorenzBelow is what's available for download thru OTN. To ensure my question is clear, approximately when will the MICROSOFT WINDOWS version finally be released:
Enterprise Manager 10g Grid Control Release 1 (10.1.0.2)
Oracle Enterprise Manager 10g Grid Control Release 1 (10.1.0.2) for Linux x86
Oracle Enterprise Manager 10g Grid Control Release 1 (10.1.0.2) for Solaris Operating System (SPARC) (32-bit)
Oracle Enterprise Manager 10g Grid Control Release 1 (10.1.0.2) for HP-UX
Oracle Enterprise Manager 10g Grid Control Release 1 (10.1.0.2) for AIX5L Based Systems
Oracle Enterprise Manager 10g Grid Control Release 1 (10.1.0.2) for HP Tru64 UNIX -
How to get immediate parent directory name of a file
Hi,
I have file Object that points to a file. I want to know how I can get just the name of the parent immediate to the file For example, if the path of this file is, c:\\ProgramFiles\first\second\third\myFile.txt
In the above, how can I obtain the last directory in which myFile.txt resides ?
Thanks
SangeethaFile myFile = new File("c:\\ProgramFiles\\first\\second\\third\\myFile.txt");
File parentFile = myFile.getParentFile();
String parentDirectory = parentFile.getName();
System.out.println("Parent directory is "+parentDirectory);Here's the explanation...
1) New File is created
2) File.getParentFile returns the immediate parent of the current File, which happens to be a directory.
3) File.getName() returns the name of the File, without the entire directory structure.
Hope this helps :)
Simon -
Reading files from the parent directory
Hi all, I'm just wondering if files can be read from the parent directory.
I've created a package and realise that for one function it needs to read from a file which was created in the parent directory. I've tried:
BufferedReader inPut =
new BufferedReader(new FileReader("../file.txt"))
but it's still saying that it can't find the file.
Any ideas if I can read that file?
ThanksHow about using the getParent() or getParentFile from the File class?
-
I am trying to create an process and action that does the following:
Process outside of PS that stages files for edit
PS Action to set selection(s) (each selection is on its own channel) on the original tif
PS Action to open Background template file (.bmp file)
PS Action to paste selection(s) in place (from channels) into .bmp file
PS Action to flatten document
PS Action to Save As a .bmp using the current file name one directory up
Process outside of PS that cleans up and moves files
I am good on steps 1 through 5 and 7, but cannot figure out step 6 in a Win7 environment. Basically, I edit images in a staging folder before moving them to the parent. Then the parent folder is cleaned up and pulled into a permanent storage location. So the workspace looks like this:
Starting file structure (three .bmp files and two subfolders in ...\parent)
...\parent\File1.bmp {old}
...\parent\File2.bmp
...\parent\File3.bmp
...\parent\Delete\
...\parent\Working\
Next step: New File1.tif is sourced and placed in Working Folder, Current File1 is moved to Delete Folder
...\parent\File2.bmp
...\parent\File3.bmp
...\parent\Delete\File1.bmp {old}
...\parent\Working\File1.tif
Next step: Edit File1.tif in Working Folder and run final action - Save As .bmp in one folder up (...\parent\)
...\parent\File1.bmp {new}
...\parent\File2.bmp
...\parent\File3.bmp
...\parent\Delete\File1.bmp {old}
...\parent\Working\File1.tif
Last step, Cleanup: Remove the Delete/Working subfolders, move files to new location
...\parent\File1.bmp {new}
...\parent\File2.bmp
...\parent\File3.bmp
How can I do the Save As step??I am just using parent to illustrate. It actually looks like this, where parent and file names are variable and each edit work driver may require editing a different {old} bmp:
...\04969\1234_1.bmp {old}
...\04969\1234_2.bmp
...\04969\1234_3.bmp
...\04969\Delete\
...\04969\Working\
How would the coding change for the following:
1) Working multiple edits and editing different files each time
2) Working multiple edits and and the names of the parent directory changed for each edit?
3) Working multiple edits and and the names of the files changed for each edit?
So Edit 1:
...\04969\1234_1.bmp
...\04969\1234_2.bmp {old}
...\04969\1234_3.bmp
...\04969\Delete\
...\04969\Working\
Edit 2:
...\04969\1236_1.bmp
...\04969\1236_2.bmp
...\04969\1236_3.bmp {old}
...\04969\Delete\
...\04969\Working\
Edit 3:
...\89001\2255_1.bmp {old}
...\89001\2255_2.bmp
...\89001\2255_3.bmp
...\89001\Delete\
...\89001\Working\ -
Dynamic update to Inbound Directory for File Adapter Read
I've seen references to others asking similar questions but never a good answer.
I have a process that outputs files into daily dated directories. In other words, my Inbound Direct name is dynamic. I would like BPEL to be able to pick up these files but the Directory Spec for the inbound file adapter seems to be set at design time (or in the case of a Logical Directory Deployment time).
The directory names are in YYYMMDD format. So it would be:
importdir/YYYMMDD
for each day.
Is there a way I can monitor an entire subtree, or have some event that triggers the directory name to be updated (for instance, a process watches the parent directory and kicks off when a new directory is created), or any other method I can inform the FileAdapter to begin polling a different directory.
Thanks.Hi,
Look at this document : [Oracle JCA Adapter for Files/FTP|http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10231/adptr_file.htm#CIAFJCCE]
Romain. -
Hi All, This was regarding installing Oracle 11gR1 on the same linux server machine, where oracle 10.2.0.1.0 resides, i tried to install 11g on the same parent directory /u01 where 10g directory present, i.e,
for 10g - /u01/app/oracle/product/10.2.0/db_1/
and
for 11g - /u01/app/oracle/product/11.1.0/db_1/
my doubt is whether /u01/app/oracle/oraInventory/ will be disturbed ? at the stage of executing configuration scripts, oracle prompted only for root.sh script and didn't ask for oraInstroot.sh?
will the 10g features gets affected ?,
I found 10g database opening successfully after running it's bash_profile, and also when 11g database needed, it also opened successfully (in another session) after its seperate bash_profile being executed in another session,You may be confused between ORACLE_BASE, actually the common directory of both ORACLE_HOMEs (one for 10g, one for 11g).
/u01/app/oracle is your ORACLE_BASE where sit the oraInventory and some other common folders.
/u01/app/oracle/product/10.2.0/db_1 and /u01/app/oracle/product/11.1.0/db_1 are your two ORACLE_HOME to hosts dedicated binaries for each version.
Set the ORACLE_HOME/PATH env. variables in the OS session level according to the version you want to work on in that said session.
Nicolas. -
Hi All,
I have installed Clusterware 11gR2 on two node cluster Solaris 10 U9 SPARC.
After that I run Oracle Database installer and clicked next.
In Installation Options I checked ""Create and Configure Database".
After that I got the error message:
PRCI-1113: Directory /u01/app/grid/product/11.2.0/gridhome does not exist
and OUI terminate.
Information from logs:
INFO: Completed background operations
INFO: Moved to state <installOptions>
INFO: Waiting for completion of background operations
INFO: Completed background operations
INFO: InstallOptions UI Entering & Exiting processInput
INFO: Validating view at state <installOptions>
INFO: Completed validating view at state <installOptions>
INFO: Validating state <installOptions>
INFO: Completed validating state <installOptions>
INFO: InstallOptionsAction Actions.transition called
INFO: selectedInstallOption is :INSTALL_DB_AND_CONFIG
INFO: inventory location is/u01/app/oraInventory
INFO: Is CRS Installed true
INFO: inventory location is/u01/app/oraInventory
WARNING: Error while invoking SRVM..
Refer associated stacktrace #oracle.install.driver.oui.SRVMInstallExceptionHandler:384
SEVERE: [FATAL] PRCI-1113 : Directory /u01/app/grid/product/11.2.0/gridhome does not exist.
Refer associated stacktrace #oracle.install.commons.util.exception.DefaultErrorAdvisor:385
[root@gt1000a /u01/app/oraInventory/logs]#
Please help me resolve that issue.
Regards,
DanielFor clusterware I am using grid user and for Oracle database oracle user.
Here is the output from env command:
[root@gt1000a /export/home/11g]# env
MANPATH=/usr/share/man:/opt/VRTS/man:/usr/dt/man:/usr/man:/usr/openwin/share/man
DTSOURCEPROFILE=true
TERM=xterm
SHELL=/bin/bash
SDT_NO_TOOLTALK=1
GTK_RC_FILES=/etc/gtk/gtkrc://.gtkrc-1.2-gnome2
WINDOWID=96471252
OLDPWD=/tmp/deinstall2011-09-10_12-04-39-AM/logs
DTHELPSEARCHPATH=//.dt/help/root-10.182.43.169-0/%H://.dt/help/root-10.182.43.169-0/%H.sdl://.dt/help/root-10.182.43.169-0/%H.hv://.dt/help/%H://.dt/help/%H.sdl://.dt/help/%H.hv:/usr/dt/appconfig/help/%L/%H:/usr/dt/appconfig/help/%L/%H.sdl:/usr/dt/appconfig/help/%L/%H.hv:/usr/dt/appconfig/help/C/%H:/usr/dt/appconfig/help/C/%H.sdl:/usr/dt/appconfig/help/C/%H.hv
LC_ALL=ja_JP.PCK
USER=root
DTDEVROOT=
XFORCE_INTERNET=True
OPENWINHOME=/usr/openwin
DTXSERVERLOCATION=remote
XMBINDDIR=/usr/dt/lib/bindings
GNOME_KEYRING_SOCKET=/var/tmp/keyring-I5BqD8/socket
SESSION_MANAGER=local/gt1000a:/tmp/.ICE-unix/12267,inet6/gt1000a:32901,inet/gt1000a:32902
SESSION_SVR=gt1000a
HELPPATH=/usr/openwin/lib/locale:/usr/openwin/lib/help
MAIL=/var/mail/root
PATH=/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ucb:/sbin:/usr/sbin:/opt/VRTS/bin:/opt/VRTSvxfs/sbin:/opt/VRTSdbed/bin:/opt/VRTSob/bin:/opt/VRTScps/bin:/opt/VRTSvcs/bin:/opt/VRTSodm/bin:/usr/lib/vxvm/bin:/usr/sfw/bin:/usr/ccs/bin
LC_MESSAGES=ja_JP.PCK
PWD=/export/home/11g
START_SPECKEYSD=no
EDITOR=/usr/dt/bin/dtpad
DTAPPSEARCHPATH=//.dt/appmanager:/usr/dt/appconfig/appmanager/%L:/usr/dt/appconfig/appmanager/C
LANG=ja_JP.PCK
TZ=Japan
SDT_NO_DTDBCACHE=1
XFILESEARCHPATH=/usr/openwin/lib/locale/%L/%T/%N%S:/usr/openwin/lib/%T/%N%S
PS1=[\u@\h \w]#
SESSIONTYPE=altDt
HOME=/
SHLVL=2
DTSCREENSAVERLIST=StartDtscreenSwarm StartDtscreenQix StartDtscreenFlame StartDtscreenHop StartDtscreenImage StartDtscreenLife StartDtscreenRotor StartDtscreenPyro StartDtscreenWorm StartDtscreenBlank
GNOME_DESKTOP_SESSION_ID=Default
G_FILENAME_ENCODING=@locale,UTF-8
LOGNAME=root
AB_CARDCATALOG=/usr/dt/share/answerbooks/ja_JP.PCK/ab_cardcatalog
DTDATABASESEARCHPATH=//.dt/types,/usr/dt/appconfig/types/%L,/usr/dt/appconfig/types/C
XMICONSEARCHPATH=//.dt/icons/%B%M.pm://.dt/icons/%B%M.bm://.dt/icons/%B:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B
DTUSERSESSION=root-10.182.43.169-0
DISPLAY=10.182.43.169:0.0
GTK_IM_MODULE=iiim
XMICONBMSEARCHPATH=//.dt/icons/%B%M.bm://.dt/icons/%B%M.pm://.dt/icons/%B:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B
G_BROKEN_FILENAMES=yes
dtstart_sessionlogfile=/dev/null
COLORTERM=gnome-terminal
_=/usr/bin/env
[root@gt1000a /export/home/11g]#
oracle user profile:
[root@gt1000a /export/home/11g]# cat /export/home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export GRID_HOME=/u01/app/grid/product/11.2.0/gridhome
export GRID_BASE=/u01/app/gridbase
export CRS_HOME=/u01/app/grid/product/11.2.0/gridhome
export CRS_BASE=/u01/app/gridbase
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export LANGUAGE_ID=JAPANESE_JAPAN.JA16SJIS
export NLS_LANG=JAPANESE_JAPAN.JA16SJIS
export LD_LIBRARY_PATH_64=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=$ORACLE_HOME/lib32
export CLASSPATH=:/JRE:/jlib:/rdbms/jlib:/network/jlib
export PATH=$PATH:/u01/app/oracle/product/11.2.0/db_1/bin:/u01/app/grid/bin
[root@gt1000a /export/home/11g]#
Edited by: nagardd on Sep 15, 2011 8:07 AM -
After uploading, template is gone and only parent directory shows
I'm using Dreamweaver CS4 and uploading to Yahoo for my website. When I try to use the preview in browser, the page shows as blank, and when I upload, only the parent directory shows. How can I fix this?
The website is: http://www.optimumtx.com/
Thank you for your timeUhmmm... It looks like you haven't named your default starting page correctly - Yahoo hosting is looking for "home.html" to start from and you currently don't have any document titled that. And seeing your list of files (based on your link you supplied) you also have index.dwt up on the server. The .dwt file extension means it's a template! That's only useful in Dreamweaver to create new pages from and has no business being up on your server. Fix that start page issue and you'll most likely resolve the majority of your issues.
-
Parent directory ./Users/Shared/SC Info does not exist
When I repair my Permissions, I always get this message: parent directory ./Users/Shared/SC Info does not exist
I think it had something to do with Safe Eyes, which I uninstalled.Actually, I'm not sure, but I think that message may be normal if you have deleted the folder. The terms "SC Info" folder and "SC Info.sidb" both appear in the '/usr/bin/strings' output for 'DiskManagementTool', which is involved (somehow) with permissions verification and repair. I get the impression from the web that the items have something to do with iTunes DRM...
-
Newly Created Sub-Directories Don't Have Parent Directory Permissions
Hoping someone may be able to shed some light on this.
Background:
Running 10.4.11 as a file server on a PPC G5 in a small creative office. We have a handful of users accessing via AFP. No other services are running.
I'm using Workgroup Manager as admin tool.
Top level directory has permissions set to Read & Write for Owner, Group & Everyone.
Issue:
When an authenticated user creates a new directory on the server, the new directory does not honor the parent directory permissions for all three user tiers.
Rather, in getting info, the owner is momentarily set to the user who created the directory with read & write, then switches to (unknown) with r&w. The group is momentarily correct and then switches to (unknown) despite the creating user being part of a specific group, and has Read only permissions.
Everyone has Read only permissions.
If a user attempts to fix permissions on a directory they just created, they are unable to do so.
So, throughout the course of the day, I am bombarded with "I don't have permissions...", wherein, i use remote access to hit Workgroup Manager and do a global propagation down of the parent directories permissions to allow access. Until someone else makes a directory
This can't possibly be right. Newly created directories should be set to the parent directory permissions, if i'm not mistaken.
Anyone? Any insight?
Michael B.oh yes.. you are right... its accessible in
http:://rishtey.local/default_1.html
successfully... thanks for that... first of all
now issue is: when i access http://rishtey.local/test.php which contains just a tag to display php info only...
instead of rendering this php file, it just save the file in the download folder.
what could be the issue with it? -
Parent directory paths missing after PDFMaker conversion
I have hyperlinks in a Word document. Relative path links to documents in subfolders (e.g. "subfolder/subdoc.pdf") work fine after conversion to PDF using PDFMaker However, links to a parent directory (e.g. "../parent.pdf") are incorrect after conversion to PDF: the PDF file link is just "parent.pdf".
This is in Acrobat 8 -- has this been fixed in a later version of Acrobat?
Or, am I missing something? Wiring in absolute paths isn't acceptable.
Thanks
BrianThanks for the reply! You're correct; this should be under 10.5 mail services. I'm not sure how the post ended up here, though I'm sure it's my fault.
Thanks for the information on what this file does. Permissions are a possibility, but the underlying problem is that the system is looking for the file in the wrong location. The mail isn't at /var/imap/ anymore, and I've renamed /var/imap/ to /var/old_imap/ to spot just this sort of thing. What I'm trying to find is what in the system is still pointing to /var/imap/ and trying to find a file there. If I could find that, then I could repoint it to the correct path and resolve the issue. It looks like the call is coming from postfix (with the master process), but I see nothing in the postfix config files that would make it still look at /var/imap/. That's what puzzles/concerns me.
Did I explain that well? Thanks again. -
How can i apply border for fluid grid layout div
How can i apply border for fluid grid layout div
<!doctype html>
<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
<!--[if IE 7]> <html class="ie7 oldie"> <![endif]-->
<!--[if IE 8]> <html class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled Document</title>
<link href="boilerplate.css" rel="stylesheet" type="text/css">
<link href="CSS/Layout.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="flexslider.css" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="jquery.flexslider.js"></script>
<!-- Place in the <head>, after the three links -->
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
$('.flexslider').flexslider();
</script>
<!--
To learn more about the conditional comments around the html tags at the top of the file:
paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
* insert the link to your js here
* remove the link below to the html5shiv
* add the "no-js" class to the html tags at the top
* you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
-->
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="respond.min.js"></script>
</head>
<body>
<div class="gridContainer clearfix">
<div id="LayoutDiv1"><img src="SJV-Images/Banners/Dark-green-curved-header.png"/></div>
<div id="LayoutDiv2">
<div class="flex-container">
<div class="flexslider">
<ul class="slides">
<li>
<img src="SJV-Images/Stud1.jpg"/>
</li>
<li>
<img src="SJV-Images/Stud2.jpg" />
</li>
<li>
<img src="SJV-Images/Stud3.jpg" />
</li>
</ul>
</div>
</div> </div>
<div id="Nav">This is the content for Layout Div Tag "Nav"</div>
<div id="Special_Features"><h3 align="center">SPECIAL FEATURES</h3>
<ul>
<li>
It is one of the oldest school.</li>
<li>It was first started as an orphanage for the children of British soldiers, and later moved to its current location.</li>
<li>Rich in Anglo-Indian tradition dating back to three centuries.</li>
<li>The campus now has separate buildings within the campus for year 1 to year 8 (Junior and Sub Junior block) and year 9 to year 12 (Senior and Super Senior block).</li>
<li>The school has montessori facilities in a separate building.</li>
<li>The School also has boarding facilities for students from distant places.</li>
</ul></div>
<div id="History"><img src="SJV-Images/His_Image.png" alt="Hisimage" class="floatleft">
<h3>HISTORY OF OUR SCHOOL</h3><P>In 1750 – a very long time ago,a missionary and a teacher, Christian Frederick Schwartz came to India to work in the Danish Mission at Tranquebar.Due to his own personal charm, genius and integrity, soon he became a trusted envoy to the court of Princes ,both hostile and friendly. He even helped in the training and education of Serfogee Rajah, the adopted son of the Tanjore Raja Tuljagee.</P></div>
<div id="Photo_Gall"><center>
<strong>PHOTO GALLERY</strong>
</center>
<p><img src="SJV-Images/Photogall.png" width="174" height="70" class="floatright"/></p>
</div>
<div id="News_Events"><center>
<strong>NEWS & EVENTS</strong>
</center><center>Annual Day<br><center>
Alumni Meet<br>
Exam Time Table<br>Parents-Teacher's Meet</center>
</center>
<br></div>
<div id="footer">This is the content for Layout Div Tag "footer"</div>
</div>
</body>
</html> -
RAC environment setup for OEM Grid Control
Hi All,
One of my customer is setting up RAC environment for OEM Grid Control, he has following questions.
1) Can I use the DirectNFS client on each RAC node to mount SAN storage created with an OCFS2 filesystem?
2) Can I use the DirectNSF client to mount the shared filesystem loader directory?
3) Should I be using DirectNFS for the shared filesystem loader at all? Or should I just use a normal Linux NFS mount?
4) Is OCFS2 preferred over NFS for the shared filesystem loader?
Any information is highly appriciated.
Thank you,
BhavinPlease check the below doc
http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_EnterpriseManagerBestPractices.pdf -
Parent directory on JFileChooser main panel
Yes I did a search on the forum before posting.
How could I display the parent directory '..' of the current directory on the file list panel of a JFileChooser? It should be selectable/clickable/openable, of course.Thanks camickr.
It does barely works but problems are:
1) A mouse selection on the parent directory [icon + text] item behaves weird at the initial launch time of the program and when we have returned back from a subsub-directory.
2)The parent directory [icon + text] item doesn't come at the top of the file list. How to achieve this requirement?
Here's a quick and dirty SSCCE:
import javax.swing.*;
import javax.swing.filechooser.*;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.io.*;
import java.net.*;
public class ParentFcTest{
JFrame frame;
JFileChooser jfc;
JPanel contentPane, mainPanel;
Box buttonPanel;
JButton convButton, rescanButton;
boolean inProgress;
File cf; // file currently processed
FsvWithParentDir fwp;
FvForPd ffp;
public ParentFcTest(){
frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jfc = new JFileChooser(".", fwp = new FsvWithParentDir());
jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
Component comp = jfc.getComponent(3);
comp.setVisible(false); // hide labels, textfields, buttons etc.
ffp = new FvForPd(fwp);
jfc.setFileView(ffp);
mainPanel = new JPanel(new BorderLayout());
mainPanel.add(jfc, BorderLayout.CENTER);
convButton = new JButton("...Select file or folder");
buttonPanel = new Box(BoxLayout.Y_AXIS);
JPanel p1 = new JPanel();
p1.add(convButton);
rescanButton = new JButton("Update file list");
rescanButton.setBackground(new Color(200, 255, 50));
JPanel p2 = new JPanel();
p2.add(rescanButton);
buttonPanel.add(p1);
buttonPanel.add(p2);
rescanButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
jfc.rescanCurrentDirectory();
contentPane = (JPanel)frame.getContentPane();
contentPane.add(mainPanel, BorderLayout.CENTER);
contentPane.add(buttonPanel, BorderLayout.SOUTH);
frame.pack();
frame.setVisible(true);
jfc.addPropertyChangeListener(new PropertyChangeListener(){
File f;
public void propertyChange(PropertyChangeEvent pce){
f = jfc.getSelectedFile();
if (f == cf){ // we need this because of #$# below
return;
if (inProgress){ // vv restore old selection
jfc.setSelectedFile(cf); // #$# generates another PCE !
JOptionPane.showMessageDialog
(frame, "Can't select a new file while processing current file");
return;
if (pce.getPropertyName().equals
(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)){ // selected
if (f.isFile()){
convButton.setText("Process this file");
else if (f.isDirectory()){
convButton.setText("Open this folder");
else if (pce.getPropertyName().equals
(JFileChooser.DIRECTORY_CHANGED_PROPERTY)){ // physical dir change
convButton.setText("...Select file or folder");
convButton.addActionListener(new Converter(jfc));
} // constructor
class Converter implements ActionListener{
JFileChooser fc;
public Converter(JFileChooser jf){
fc = jf;
public void actionPerformed(ActionEvent e){
JButton btn = (JButton)e.getSource();
if (btn.getText().startsWith("...")){ // message only, no action
return;
File f = fc.getSelectedFile();
if (f.isFile()){
inProgress = true;
rescanButton.setEnabled(false);
cf = f;
convButton.setText("...please wait");
ConvWorker cw = new ConvWorker();
cw.execute();
else{
jfc.setCurrentDirectory(f);
class ConvWorker extends SwingWorker<Object,Object>{
public Object doInBackground(){
return null;
protected void done(){
inProgress = false;
jfc.rescanCurrentDirectory();
convButton.setText("...Select file or folder");
rescanButton.setEnabled(true);
class FvForPd extends FileView{
FsvWithParentDir fsvp;
ImageIcon ii;
public FvForPd(FsvWithParentDir fsv){
fsvp = fsv;
try{
ii = new ImageIcon
(new URL("http://homepage1.nifty.com/algafield/pardir.gif"));
catch (MalformedURLException e){
e.printStackTrace();
public Icon getIcon(File f){
if (f.equals(fsvp.getParent())){
return ii;
else{
return super.getIcon(f);
public String getName(File f){ // it does work but...
if (f.equals(fsvp.getParent())){
return ("..");
else{
return super.getName(f);
public static void main(String[] args){
SwingUtilities.invokeLater(new Runnable(){
public void run(){
new ParentFcTest();
import java.io.*;
import javax.swing.*;
import javax.swing.filechooser.*;
public class FsvWithParentDir extends FileSystemView{
File[] filelist;
File parent;
public File createNewFolder(File containingDir){
File folder = new File(containingDir, "NEWFOLDER");
folder.mkdir();
return folder;
public File[] getFiles(File dir, boolean useFileHiding){
File[] files = super.getFiles(dir, useFileHiding);
File[] nfiles = new File[files.length + 1];
for (int i = 1; i < nfiles.length; ++i){
nfiles[i] = files[i - 1];
parent = dir.getParentFile();
if (parent != null){
nfiles[0] = parent;
filelist = nfiles;
else{
filelist = files;
return filelist;
public File getParent(){
return parent;
// this doesn't work
public Icon getSystemIcon(File f){
if (parent != null && f.equals(parent)){
ImageIcon ii = new ImageIcon(getClass().getResource("/pardir.gif"));
return ii;
else{
return super.getSystemIcon(f);
}
Maybe you are looking for
-
KM document iview transport & the document transport in KM.
We are EP 7.0 SP 18. I have created a KM document iview in dev system and set the Path to document porperty of the document iview to guid of a document in KM. Transported both the iview and KM content to QA system, epa and kmc files. The iview fails
-
DVD Burner Doesn't Fit!! Any others?
Just bought a LaCie 16x LightScribe internal DVD+-R double layer burner since it was recommended on this site, and now come to find it doesn't fit by millimeters due to the mirrored doors. Any other DVD burner suggestions? I mean, a size that actuall
-
L655-S5117's (2) will not recognize Vivitar DVR1240HD but other pc's do
My son and daughter both have L655-S5117's. Both are in good working order, kept updated and well maintained. Both have Win7 64bit home premium. Both have Microsoft wireless mouses occupying one of the two USB slots with no other peripherals. For all
-
Every time prompting me where to save when I am saving as .xls
I have a spreadsheet where I am sending now and then to a windows user and I save the spreadsheet as .xls Whenever I modify and try to save using shortcut control+S then it is prompting me to save in a location. I have to choose location and extentio
-
Mac pro Quad Core... 2 NEC 24" monitors Working away got a kernal panic like wild blinking flickering... Command save, hard shut down 2 Super duper clone boot drives in machine Now, 1st boot drive, safe start, get boot progress bar runs through to th