How to create a network file system on a small ethernet lan?
Hi there,
Have been wondering about creating a network file system on a small ethernet based lan. i don't know anything about how you do this but figure you need more than a normal external hardrive Many thanks for any responses
Hi there,
As far as I understand, you would like to be able to have a central location that all your computers can access and store files?
If this is the case, and you want to use your lan router, there are many products that do such a thing. These devices are known as "Network Attached Storages" or NAS. They plug into your router like your computers do, and then allow your computers to access hard drives stored in the devices.
The following link shows some NAS units on the tech shopping site Newegg.
http://www.newegg.com/Store/SubCategory.aspx?SubCategory=124&name=Network-Storag e-NAS
Hope that helps, and let me know if you have any more questions!
Elliott
Similar Messages
-
Hi,
Can anyone tell me how can I create a program that will allow me to share file between multiple operating systems like windows and linux in a network.Basically I want to create a network file system browser between heterogeneous file systems.http://jcifs.samba.org/ May help with Window's shares.
http://j-ftp.sourceforge.net/ This is a client that supports lots of protocols and is GPL'ed so you can look at the source if you need but be sure you understand the license first.
I'm not sure if you can get something that works with java.io.File but across the network. I'm pretty sure you need to use something provided by your OS for that. It'd be great if someone proved me wrong on this. -
How to create the log file in remote system using log4j.
Hi,
How to create the log file in remote system using log4j. please give me a sample code or related links.The below example i used for create the log file in remote system but it return the below exception.Is there any authandication parameter for accessing the remote path? Please help.
public class Logging
Logger log=null;
FileAppender fileapp=null;
public Logging(String classname)
try
log = Logger.getLogger(classname);
String path=" [\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt|file://\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt]";
fileapp = new FileAppender(new PatternLayout("%r [%t] %-5p %c %x - %m%n"),path, true);
log.addAppender(fileapp);
log.info("Logger initilized");
}catch(Exception ex)
ex.printStackTrace();
java.io.FileNotFoundException: \\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt (The network path was not found)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.FileAppender.<init>(FileAppender.java:109)
at annwyn.logger.BioCapLogger.<init>(Logging.java:23)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Please help.
Thanks in advance.
Saravanan.KSorry path is missing for the above request.
path="\\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt ";
please help.
Saravanan.K -
How to create different log files for each of web applications deployed in OC4J
Hi All,
I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
1. how to create different log files for each of my deployed web applications ?
2. what are the advantages in running multiple instances of oc4j and in what case we should run
multiple instances of OC4J ?
3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
Thanks and Regards,
Kumar.Hi Avi,
First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
Thanks and Regards,
Ravi. -
How to Create a PSD file in C#
How to Create a PSD file in C#
Converting an image file to .psd is easy in Aperture - just export the image version with one of the export presets "PSD - Original size" or "PSD - Half size".
But I suspect, that will not solve your problem, since you are trying to create a watermark in Aperture and probably want to create a transparent background for the watermark, to give it an arbitrary shape. That cannot be done in Aperture. Aperture does not support compositing and layers. If you want to create an image of an arbitrary shape with a transparent background you need to use a program that supports compositing. Since you do not have Photoshop, you could try the free GIMP instead (afaik, there is no Lion version of GIMP; the most recent version is Mt. Lion only; you could try if the Snow Leopard version works on your system).
Any program that you own, that lets you write or draw on a transparent background will be fine. The Watermark file does not necessarily need to be a psd-file. A png will also work. You can also use Preview to convert between image formats or to annotate an image with text.
Regards
Léonie -
Service for network file system fails to install
Installation of the File Service and Service for NFS in Windows 2008 R2 server fails. Following are the steps used to perform the install.
Open Server Manager from Start> All Programs> Administrative Tools> Server Manager.
Click on the Roles node in the left pane, and then click the
Add Roles link.
On the Add Roles Wizard welcome page, click Next to continue.
From the list of roles to install, select File Services, and click
Next to continue.
On the Introduction to File Services page, click Next to continue.
On the Select Role Services page, keep the File Server box checked and select
Services for Network File System. Click Next to continue.
On the Confirmation page, review the settings and click the Install button.
Click Close when the wizard completes.
ServerManager Log:
From the ServerManager.log file under C:/Windows/Logs I can see the below.
2272: 2013-02-12 16:13:51.479 [CBS] IsCacheStillGood: True.
2272: 2013-02-12 16:14:05.534 [Provider] System changed since last refresh: False
2272: 2013-02-12 16:15:45.816 [InstallationProgressPage] Loading progress page...
2272: 2013-02-12 16:15:45.831 [InstallationProgressPage] Begining Sync operation...
2272: 2013-02-12 16:15:45.842 [Sync]
Sync Graph of changed nodes
==========
name : File Services
state : Changed
rank : 1
sync tech: CBS
guest[1] : File Server
guest[2] : Distributed File System
guest[3] : File Server Resource Manager
guest[4] : Services for Network File System
guest[5] : Single Instance Storage
guest[6] : Windows Search Service
guest[7] : Windows Server 2003 File Services
guest[8] : BranchCache for network files
provider : FileServerRoleProvider
name : Services for Network File System
state : Changed
rank : 2
sync tech: CBS
provider : FileServerRoleProvider
name : File Server
state : Changed
rank : 2
sync tech: CBS
provider : FileServerRoleProvider
2272: 2013-02-12 16:15:45.842 [Sync] Calling sync provider of Services for Network File System ...
2272: 2013-02-12 16:15:45.843 [FileServer] Sync:: guest: 'Services for Network File System', guest deleted?: False
2272: 2013-02-12 16:15:45.843 [FileServer] Begin installation of 'Services for Network File System'...
2272: 2013-02-12 16:15:45.843 [FileServer] Install: Guest: 'Services for Network File System', updateElement: 'ServicesForNFS-ServerAndClient;ClientForNFS-Infrastructure;NFS-Administration;ServerForNFS-Infrastructure'
2272: 2013-02-12 16:15:45.843 [FileServer] Installation queued for 'Services for Network File System'.
2272: 2013-02-12 16:15:45.843 [Sync] Calling sync provider of File Server ...
2272: 2013-02-12 16:15:45.843 [FileServer] Sync:: guest: 'File Server', guest deleted?: False
2272: 2013-02-12 16:15:45.843 [FileServer] Begin installation of 'File Server'...
2272: 2013-02-12 16:15:45.843 [FileServer] Install: Guest: 'File Server', updateElement: 'CoreFileServer'
2272: 2013-02-12 16:15:45.843 [FileServer] Installation queued for 'File Server'.
2272: 2013-02-12 16:15:45.844 [CBS] installing 'ServicesForNFS-ServerAndClient ClientForNFS-Infrastructure
NFS-Administration ServerForNFS-Infrastructure CoreFileServer ' ...
2272: 2013-02-12 16:15:46.315 [CBS] ...parents that will be auto-installed: '<none>'
2272: 2013-02-12 16:15:46.316 [CBS] ...default children to turn-off: '<none>'
2272: 2013-02-12 16:15:46.325 [CBS] ...current state of 'ServicesForNFS-ServerAndClient': p:
Staged, a: Staged, s: UninstallRequested
2272: 2013-02-12 16:15:46.325 [CBS] ...setting state of 'ServicesForNFS-ServerAndClient' to
'InstallRequested'
2272: 2013-02-12 16:15:46.335 [CBS] ...current state of 'ClientForNFS-Infrastructure': p: Staged,
a: Staged, s: UninstallRequested
2272: 2013-02-12 16:15:46.336 [CBS] ...setting state of 'ClientForNFS-Infrastructure' to 'InstallRequested'
2272: 2013-02-12 16:15:46.345 [CBS] ...current state of 'NFS-Administration': p: Staged, a:
Staged, s: UninstallRequested
2272: 2013-02-12 16:15:46.345 [CBS] ...setting state of 'NFS-Administration' to 'InstallRequested'
2272: 2013-02-12 16:15:46.354 [CBS] ...current state of 'ServerForNFS-Infrastructure': p: Staged,
a: Staged, s: UninstallRequested
2272: 2013-02-12 16:15:46.354 [CBS] ...setting state of 'ServerForNFS-Infrastructure' to 'InstallRequested'
2272: 2013-02-12 16:15:46.363 [CBS] ...current state of 'CoreFileServer': p: Staged, a: Staged,
s: UninstallRequested
2272: 2013-02-12 16:15:46.363 [CBS] ...setting state of 'CoreFileServer' to 'InstallRequested'
2272: 2013-02-12 16:15:46.373 [CBS] ...'ServicesForNFS-ServerAndClient' : applicability: Applicable
2272: 2013-02-12 16:15:46.390 [CBS] ...'ClientForNFS-Infrastructure' : applicability: Applicable
2272: 2013-02-12 16:15:46.408 [CBS] ...'NFS-Administration' : applicability: Applicable
2272: 2013-02-12 16:15:46.426 [CBS] ...'ServerForNFS-Infrastructure' : applicability: Applicable
2272: 2013-02-12 16:15:46.435 [CBS] ...'CoreFileServer' : applicability: Applicable
2272: 2013-02-12 16:15:46.493 [CbsUIHandler] Initiate:
2272: 2013-02-12 16:15:46.494 [InstallationProgressPage] Installing...
2272: 2013-02-12 16:15:51.958 [CbsUIHandler] Error: -2147021879 :
2272: 2013-02-12 16:15:51.958 [CbsUIHandler] Terminate:
2272: 2013-02-12 16:15:52.035 [InstallationProgressPage] Verifying installation...
2272: 2013-02-12 16:15:52.049 [CBS] ...done installing 'ServicesForNFS-ServerAndClient
ClientForNFS-Infrastructure NFS-Administration ServerForNFS-Infrastructure CoreFileServer '.
Status: -2147021879 (80070bc9)
2272: 2013-02-12 16:15:52.052 [FileServer] Skipped configuration of 'Services for Network File System' because install operation failed.
2272: 2013-02-12 16:15:52.053 [FileServer] Skipped configuration of 'File Server' because install operation failed.
2272: 2013-02-12 16:15:52.053 [Provider]
[STAT] ---- CBS Session Consolidation -----
[STAT] For
'Services for Network File System',
'File Server'[STAT] installation(s) took '6.2058637' second(s) total.
[STAT] Configuration(s) took '0.0002143' second(s) total.
[STAT] Total time: '6.206078' second(s).
2272: 2013-02-12 16:15:52.053 [Provider] Error (Id=0) Sync Result - Success: False, RebootRequired: True, Id: 105
2272: 2013-02-12 16:15:52.053 [Provider] Error (Id=0) Sync Message - OperationKind: Install, MessageType: Error, MessageCode: -2147021879, Message: <null>, AdditionalMessage: The requested operation failed. A system reboot
is required to roll back changes made
2272: 2013-02-12 16:15:52.053 [Provider] Error (Id=0) Sync Result - Success: False, RebootRequired: True, Id: 255
2272: 2013-02-12 16:15:52.053 [Provider] Error (Id=0) Sync Message - OperationKind: Install, MessageType: Error, MessageCode: -2147021879, Message: <null>, AdditionalMessage: The requested operation failed. A system reboot
is required to roll back changes made
2272: 2013-02-12 16:15:52.054 [InstallationProgressPage] Sync operation completed
2272: 2013-02-12 16:15:52.054 [InstallationProgressPage] Performing post install/uninstall discovery...
2272: 2013-02-12 16:15:52.056 [Provider] C:\Windows\system32\ServerManager\Cache\CbsUpdateState.bin does not exist.
2272: 2013-02-12 16:15:52.056 [CBS] IsCacheStillGood: False.
2272: 2013-02-12 16:15:52.526 [CBS] >>>GetUpdateInfo--------------------------------------------------
2272: 2013-02-12 16:15:59.342 [CBS] Error (Id=0) Function: 'ReadUpdateInfo()->Update_GetInstallState' failed:
80070bc9 (-2147021879)
2272: 2013-02-12 16:15:59.342 [CBS] <<<GetUpdateInfo--------------------------------------------------
2272: 2013-02-12 16:15:59.380 [DISCOVERY] hr: -2147021879 -> reboot required.
2272: 2013-02-12 16:15:59.390 [InstallationProgressPage] About to load finish page...
2272: 2013-02-12 16:15:59.390 [InstallationFinishPage] Loading finish page
2272: 2013-02-12 16:15:59.401 [InstallationFinishPage] Finish page loaded
In Windows Event long I can see the following events logged:
Event 3002, Port Map:
Windows(R) failed a request to register RPC Port Mapper on TCP port 111. RPC Port Mapper cannot start.
Network File System (NFS) clients use RPC Port Mapper (also known as Portmap and Rpcbind) to discover NFS protocols on remote servers. Without RPC Port Mapper, Server for NFS
cannot start and NFS clients cannot access files on this server.
Verify that no other software is registered on TCP port 111, then start Server for NFS manually (which will also start RPC Port Mapper).
Event 7000, Service Control Manager:
The Server for NFS Open RPC (ONCRPC) Portmapper service failed to start due to the following error:
A device attached to the system is not functioning.
Event 7001, Service Control Manager:
The Server for NFS Driver service depends on the Server for NFS Open RPC (ONCRPC) Portmapper service which failed to start because of the following error:
A device attached to the system is not functioning.
Event 7001, Service Control Manager:
The Server for NFS service depends on the Server for NFS Driver service which failed to start because of the following error:
The dependency service or group failed to start.
Based on a technet forum I have already checked and made sure there is no other service running on port 111 (command used is netstat -a -b -o).
Dependent Service Status:
During the installation process “Client for NFS” seems to have gone well and the service started successfully. But the “Server for NFS” failed, when checked for the status of the dependent process “portmap” service failed to start with the WIN32_EXIT_CODE
“31 (0x1f)”. Please find below the query result.
C:\Users\CMMAdmin>sc query rpcxdr
SERVICE_NAME: rpcxdr
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
C:\Users\CMMAdmin>sc query msnfsflt
SERVICE_NAME: msnfsflt
TYPE : 2 FILE_SYSTEM_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
C:\Users\CMMAdmin>sc query portmap
SERVICE_NAME: portmap
TYPE : 1 KERNEL_DRIVER
STATE : 1 STOPPED
WIN32_EXIT_CODE : 31 (0x1f)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
C:\Users\CMMAdmin>
As the EXIT CODE is 31 ( A device attached to the system is not functioning), I have checked device manager and made sure there is no yellow warning shown against any hardware device. Further I am not sure how to proceed and debug this issue.
Please let me know if you have any suggestion on how debug this issue further.
Thanks
-PoopeshHey,
I had this same problem running MS Server 2008 R2 and server log is as follow:
name : Services for Network File System
state : Changed
rank : 2
sync tech: CBS
ant. : empty
pred. : File Services
provider : FileServerRoleProvider
5676: 2014-01-14 14:08:57.474 [Sync] Calling sync provider of Services for Network File System ...
5676: 2014-01-14 14:08:57.521 [FileServer] Sync:: guest: 'Services for Network File System', guest deleted?: False
5676: 2014-01-14 14:08:57.536 [FileServer] Begin installation of 'Services for Network File System'...
5676: 2014-01-14 14:08:57.536 [FileServer] Install: Guest: 'Services for Network File System', updateElement: 'ServicesForNFS-ServerAndClient;ClientForNFS-Infrastructure;NFS-Administration;ServerForNFS-Infrastructure'
5676: 2014-01-14 14:08:57.536 [FileServer] Installation queued for 'Services for Network File System'.
5676: 2014-01-14 14:08:57.536 [CBS] installing 'ServicesForNFS-ServerAndClient ClientForNFS-Infrastructure NFS-Administration
ServerForNFS-Infrastructure ' ...
5676: 2014-01-14 14:09:00.173 [CBS] ...parents that will be auto-installed: '<none>'
5676: 2014-01-14 14:09:00.173 [CBS] ...default children to turn-off: '<none>'
5676: 2014-01-14 14:09:00.204 [CBS] ...current state of 'ServicesForNFS-ServerAndClient': p: Staged, a: Staged, s: UninstallRequested
5676: 2014-01-14 14:09:00.204 [CBS] ...setting state of 'ServicesForNFS-ServerAndClient' to 'InstallRequested'
5676: 2014-01-14 14:09:00.235 [CBS] ...current state of 'ClientForNFS-Infrastructure': p: Staged, a: Staged, s: UninstallRequested
5676: 2014-01-14 14:09:00.235 [CBS] ...setting state of 'ClientForNFS-Infrastructure' to 'InstallRequested'
5676: 2014-01-14 14:09:00.266 [CBS] ...current state of 'NFS-Administration': p: Staged, a: Staged, s: UninstallRequested
5676: 2014-01-14 14:09:00.266 [CBS] ...setting state of 'NFS-Administration' to 'InstallRequested'
5676: 2014-01-14 14:09:00.282 [CBS] ...current state of 'ServerForNFS-Infrastructure': p: Staged, a: Staged, s: UninstallRequested
5676: 2014-01-14 14:09:00.282 [CBS] ...setting state of 'ServerForNFS-Infrastructure' to 'InstallRequested'
5676: 2014-01-14 14:09:00.313 [CBS] ...'ServicesForNFS-ServerAndClient' : applicability: Applicable
5676: 2014-01-14 14:09:00.360 [CBS] ...'ClientForNFS-Infrastructure' : applicability: Applicable
5676: 2014-01-14 14:09:00.422 [CBS] ...'NFS-Administration' : applicability: Applicable
5676: 2014-01-14 14:09:00.469 [CBS] ...'ServerForNFS-Infrastructure' : applicability: Applicable
5676: 2014-01-14 14:09:01.624 [CbsUIHandler] Initiate:
5676: 2014-01-14 14:09:01.624 [InstallationProgressPage] Installing...
5676: 2014-01-14 14:09:35.117 [CbsUIHandler] Error: -2147021879 :
5676: 2014-01-14 14:09:35.117 [CbsUIHandler] Terminate:
5676: 2014-01-14 14:09:41.170 [InstallationProgressPage] Verifying installation...
5676: 2014-01-14 14:09:41.264 [CBS] ...done installing 'ServicesForNFS-ServerAndClient ClientForNFS-Infrastructure NFS-Administration
ServerForNFS-Infrastructure '. Status: -2147021879 (80070bc9)
5676: 2014-01-14 14:09:41.279 [FileServer] Skipped configuration of 'Services for Network File System' because install operation failed.
5676: 2014-01-14 14:09:41.279 [Provider]
[STAT] ---- CBS Session Consolidation -----
[STAT] For
'Services for Network File System'[STAT] installation(s) took '43.7368586' second(s) total.
[STAT] Configuration(s) took '0.0062843' second(s) total.
[STAT] Total time: '43.7431429' second(s).
5676: 2014-01-14 14:09:41.279 [Provider] Error (Id=0) Sync Result - Success: False, RebootRequired: True, Id: 105
5676: 2014-01-14 14:09:41.279 [Provider] Error (Id=0) Sync Message - OperationKind: Install, MessageType: Error, MessageCode: -2147021879, Message: <null>, AdditionalMessage: The requested operation failed. A system reboot is required to roll back changes
made
5676: 2014-01-14 14:09:41.279 [InstallationProgressPage] Sync operation completed
5676: 2014-01-14 14:09:41.279 [InstallationProgressPage] Performing post install/uninstall discovery...
5676: 2014-01-14 14:09:41.295 [Provider] C:\windows\system32\ServerManager\Cache\CbsUpdateState.bin does not exist.
5676: 2014-01-14 14:09:41.295 [CBS] IsCacheStillGood: False.
5676: 2014-01-14 14:09:43.900 [CBS] >>>GetUpdateInfo--------------------------------------------------
5676: 2014-01-14 14:09:57.394 [CBS] Error (Id=0) Function: 'ReadUpdateInfo()->Update_GetInstallState' failed: 80070bc9 (-2147021879)
5676: 2014-01-14 14:09:57.410 [CBS] <<<GetUpdateInfo--------------------------------------------------
5676: 2014-01-14 14:09:57.488 [DISCOVERY] hr: -2147021879 -> reboot required.
5676: 2014-01-14 14:09:57.613 [InstallationProgressPage] About to load finish page...
5676: 2014-01-14 14:09:57.628 [InstallationFinishPage] Loading finish page
5676: 2014-01-14 14:09:57.644 [InstallationFinishPage] Finish page loaded
My solution was to run netstat -ano to identify what process was running on port TCP/UDP :111, then with the command tasklist I got PID matching with the task name. Once identified I stopped the process, rebooted and installed
the NFS service. On top of that, before installing NFS services I disabled firewall and antivirus. It worked fine for me. I hope this will be usefull for you. By the way, don't forget to enable all process back!
Have a good one! -
How to create new XML file using retreived XML content by using SAX API?
hi all,
* How to create new XML file using retreived XML content by using SAX ?
* I have tried my level best, but output is coming invalid format, my code is follows,
XMLFileParser.java class :-
import java.io.StringReader;
import java.io.StringWriter;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.XMLFilterImpl;
public class PdfParser extends XMLFilterImpl {
private TransformerHandler handler;
Document meta_data;
private StringWriter meta_data_text = new StringWriter();
public void startDocument() throws SAXException {
void startValidation() throws SAXException {
StreamResult streamResult = new StreamResult(meta_data_text);
SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
try
handler = factory.newTransformerHandler();
Transformer transformer = handler.getTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
handler.setResult(streamResult);
handler.startDocument();
catch (TransformerConfigurationException tce)
System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
super.startDocument();
public void startElement(String namespaceURI, String localName,
String qualifiedName, Attributes atts) throws SAXException {
handler.startElement(namespaceURI, localName, qualifiedName, atts);
super.startElement(namespaceURI, localName, qualifiedName, atts);
public void characters(char[] text, int start, int length)
throws SAXException {
handler.characters(text, start, length);
super.characters(text, start, length);
public void endElement(String namespaceURI, String localName,
String qualifiedName) throws SAXException {
super.endElement("", localName, qualifiedName);
handler.endElement("", localName, qualifiedName);
public void endDocument() throws SAXException {
void endValidation() throws SAXException {
handler.endDocument();
try {
TransformerFactory transfactory = TransformerFactory.newInstance();
Transformer trans = transfactory.newTransformer();
SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
DOMResult dom_result = new DOMResult();
trans.transform(sax_source, dom_result);
meta_data = (Document) dom_result.getNode();
System.out.println(meta_data_text);
catch (TransformerConfigurationException tce) {
System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
catch (TransformerException te) {
System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
} CreateXMLFile.java class :-
Sax.startDocument();
Sax.startValidation();
Sax.startElement("", "pdf", "pdf", new AttributesImpl());
Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());
String xmp_str = new String(meta_data.getByteArray(),"UTF8");
char[] xmp_arr = xmp_str.toCharArray();
Sax.characters(xmp_arr, 0, xmp_arr.length);
Sax.endElement("", "pdf", "pdf");
Sax.endValidation();
Sax.endDocument();
Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
* In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
is not an XML type text, it just an Normal text Why that ?
* Please help me what is the problem in my code?
Cheers,
JavaImranSax.startDocument();
Sax.startValidation();
Sax.startElement("", "pdf", "pdf", new AttributesImpl());
Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());
String xmp_str = new String(meta_data.getByteArray(),"UTF8");
char[] xmp_arr = xmp_str.toCharArray();
Sax.characters(xmp_arr, 0, xmp_arr.length);
</code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
<code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
Sax.endValidation();
Sax.endDocument();
* I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
* I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
Thanks,
JavaImran{code} -
Want to access network file system using JFileChooser
Hi all,
I want to access and display the drives of a network file system in the JFileChooser dialog. For example by specifying a machine name, I want to access the drives(C, E, F....) of that machine. Can anyone please guide me on how to go forward with this.
Thanks in advanceAny links or guidance provided would bhi helpful
-
How to create a pdf file from multiple images ?
Dear All,
I want to create a SINGLE page pdf file from two or more page size images that are combined to make a single page pdf. Again, this question is on pdfs that are made out of several, atleast two color images and a black-and-white mask for one of them.
I have such pdf files from an unknown source (the producer is edited out) whereby there are three tiff images, obtained using the well known pdfimages extractor.
When I want to make a pdf out of tiff or png or other image formats, I right click and tell Adobe Acrobat to make a pdf.
However, I dont know how I can give a command to select say, three tif images and specify which is the mask for which and then join them in a way that I get the pdf from the composite of the two color images and a mask for one of them.
Please help me out.
I am a little familiar with the pdf structure skeleton and when necessary, fixed xref tables in one of my favorite editors. A few years ago, I also wrote a bunch of javascripts to make some annotations and needed some automation and used some itext type libraries. However, I need your help in this problem as I am now rusty and forgot some of what I studied to solve my earlier problems. This is a new problem for me. Gentle hints from you would be very nice to help me in this problem. Please specify if necessary what manual and pages to read. in the pdfspec.
Best Regards
Disabled Veteran [physically handicapped]Hello Again.
On Fri, May 11, 2012 at 12:20 PM, lrosenth <[email protected]> wrote:
>
> Re: How to create a pdf file from multiple images ?
>
> created by lrosenth in PDF Language and Specifications - View the full
> discussion
> ________________________________
>
> No clue who Irving is…
>
I was hoping to have your first name so its easy for me to address you.
> I have no clue what OS platform, programming language, etc. you use so
> can’t really narrow things down.
I would gladly mention that I am working on windows platform, preferably XP.
I can also work on linux for free products that come with it.
> Also, as this is an Adobe forum, we only
> recommend Adobe products – so there may be other options that even my list
> wouldn’t include.
But adding other products, for the help of an adobe products user,
even if it outside adobe, shall add greater prestige to your company
and give impression of user-centeredness.
> If you read ISO 32000-1:2008 (aka the PDF standard), you will find the
> information about Images and Image Masks well described. I didn’t think I
> needed to repeat any of that information.
Well, just add the few pdf stanzas since you are proficient on it and
I am presently a little rusty as I mentioned. Just asking a little
extra yard, not even to go an extra mile.
> And, if you read that same document, you will see that there is NO SUCH
> THING as a “text only PDF”. All PDF documents are structured binary files.
Well, ascii format or uncompressed format that is human readable. I
know its a binary file, but human readable ascii version of it.
I hope you can give me some stanza and various other approaches
possible so I can select or combine things for myself. I see only a
miniscule number of posts claiming to have written masks in this forum
and then with no details.
Regards
Roger
Message was edited by: dying veteran
because the adobe posting system went crazy and truncated all except the first line ... dunno why -
How to check if a file system in global zone is shared on zones
Hello,
Would you by any chance know how to detect if a file system in the global zone is shared with any zones created from the global zone (either shared with readonly or read-write)?
Thanks in advance.
Regards
FrankUsually they're shared via lofs. So try 'df -kZ -F lofs'.
Darren -
How to store preferences in file system on Windows?
I have 2 questions related to preferences using.
1. How to store preferences in file system (not in registry) on Windows? I see file system implementation of Preferences (java.util.prefs.FileSystemPreferences). But this implementation is linux-specific (use native methods). Does universal implementation exist?
2. How to store custom files in preferences? I need to store some user-specific files (XML files, for example) somewhere. These files are naturally user preferences. So my idea is to store it using Preferences. But it seems like there is no such posibility in standard preferences. I believe many peoples have the same problem. Does anyone have solution?
Please help me!
Thank you in advance.Preferences is supposed to keep all this data
handling away from you, so you shouldn't bother. If
you'd like to write a file, just write a file. You
could create a "Settings" object and serialize it.I understand your reasonings. But unfortunately I have requirements to use file system preferences both on Linux and Windows. My bosses think there are many problems because of registry. Don't ask what problems, they didn't say. I cannot change their requirements. I must to implement it.
Maybe somebody already solved this proplem. I will very grateful for help.
Once again: simply write and read a custom file. Why
do you use Preferences at all costs when they don't
do what you want to?I have requirements to implement saving of files in the same manner as saving of preferences. It may be different code from Preferences. But it will be the best to have the same code if it possible.
Any way I believe the need to save user-specific files as preferences is quite widespread. -
How to create a flat files and how i used this
hi Guys and gals,
I am david. I want to know how to create a flat files. I don't know about it also. pls explain it and also pls help me to create a flat files. If u have any program for creating pls send me.
I want to know about retrive the datas from flat files and also insert a record into it.
pls guide me
i need this immediately
davidvoid newMethod() throws Exception {
// Reading from a flat file
String data;
BufferedReader br = new BufferedReader(new FileReader("c:\filename1.txt"));
while ((data = br.readLine()) != null) {
System.out.println(data);
// Writing to a flat file
BufferedWriter bw = new BufferedWriter(new FileWriter("c:\filename2.txt"));
bw.write("sample data");
// After writing the data close the file
bw.close();
} -
How can I transfer my files/system in VAIO laptop (w/ S400 Firewire port) to my New Macbook Pro?
Do I need to buy an adapter? How do I setup the software to make these two system connected?r95941081 wrote:
Thanks for your answering. But the issue is that I'll often transfer a large amount files from PCs to the Macbook, and I'm explring the way to use firewire since there is indeed an i-S400 port in the VAIO laptop, and it's much faster.
USB 2 is faster than Firewire 400 and USB 3 is faster than Firewire 800
If it was another Mac you were transferring from then you could use Firewire Target Disk Mode which makes the boot drive of the old Mac appear on the desktop of the new Mac to rapidly copy files, but you have a Windows PC with no FWTDM capability.
So to connect the two machines requires a network be setup over Ethernet and mucking around with the complexities of all that and it still takes awhile to finish. One can't setup a network with a PC over USB or Firewire, only Firewire with another Mac.
You get a external USB drive, USB 3,2,1 is fine and just drag and drop copy, the machine does all the work and you go do something else until it's finished, then repeat the same with the Mac.
Fast simple and effective, let it copy overnight if you have too.
I routinely clone my entire hard drive via USB 2 and it only takes a hour and a half for 350GB.
By the time you figure out how to network a Mac and a PC over Ethernet and getting it work to transfer files, you could be done already via USB. -
How to create the exe files for java application
How to create the exe file for java application?
got any software to do that?
ThanksIn terms of converting java applications into exe files, there are 3 schools of thought:
1) Instead of converting it to an exe, convert it to a jar file. Jar files are more portable than exe files because they can be double-clicked on any operating system. The caveat is that a Java interpreter must be installed on the target computer for the double-clicking to work.
http://developer.java.sun.com/developer/Books/javaprogramming/JAR/
2) Create an exe launcher that, when double-clicked, attempts to find a Java interpreter on the local computer and launches the Java application. The exe file is still double-clickable but whether your java application runs depends on whether a Java interpretor is installed on the target computer.
http://www.sureshotsoftware.com/exej/
http://www.objects.com.au/products/jstart/index.jsp
http://www.duckware.com/products/javatools.html
http://www.ucware.com/jexec/
http://www.rolemaker.dk/nonRoleMaker/javalauncher/
http://www.jelude.cjb.net/
http://thor.prohosting.com/~dfolly/java/index.html
3) Create an exe launcher that bundles a Java interpretor. Same as above but when the exe file is double-clicked, it searches for a Java interpreter and if one is not found, it installs one on the target computer. The caveat is that the exe file would have an overhead of 10 MB in size for the interpreter.
http://www.excelsior-usa.com/jet.html (evaluation version available)
4) Convert the Java application into a native exe file. The caveat is that if you use Swing for your GUI, it won't be converted. Also this option is still somewhat experimental.
Can't think of any free options right now. -
hello
how to create a new file myfile.txt in folowing URL
http://www.mydomain.com/upload/myfile.txtregardsthe_Orient wrote:
corrected code
I will to create a text file on webserver
this file hasethe content "Hello World"
</div>
try
String S="Hello World"
URL url = new URL("http://www.mydomain.com");
URLConnection hpCon = url.openConnection();
hpCon.setDoOutput(true);
File file = new File("http://www.mydomain.com/studentes/info.txt");
file.createNewFile();
// how to use FileOutputStream here
OutputStreamWriter out = new OutputStreamWriter(hpCon.getOutputStream());
out.write(content);
out.close();
}catch(Exception ex){ex.printStackTrace();}
Exception :
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
{code}
regards
Whoa! Do you know what you're doing? Do you have permission to write on that URL? Or does the pathname parameter you passed on File is correct? How about let the server-side handle the creation of file for you by just requesting it? Do you know how to create a server-side Java program (e.i. Servlet)? Umm.. There's a Java tutorial for this for you to get started: [Reading from and Writing to a URLConnection|http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html].
Ron
Server-Side Development Team
[Java-Man 2004|https://sites.google.com/site/raisoftware6/]
Maybe you are looking for
-
Make 3D Flash wedding photo gallery with songs
Last week, my dearest sister got married. There were about a gazillion things to love about her wedding day… so many moments all wrapped up into one very totally unforgotten event. I took lots of wedding photos on her wedding day and wanted to give h
-
How to mail the html file using javamail????
hi i have captured the output of a jsp page in a html file.... now i wish to send it in the mail ( *** not as an attachment) ie i wish the output of the jsp ie the html file to be displayed in the message box (ie text area) ..... and then when reciev
-
How to change color in the title line?
Hi experts, How to change color in the title line, i show an image for explained better !http://img688.imageshack.us/img688/9259/imagenjar.png! thanks
-
After iOS 6 update, iPad has wrong phone number for Facetime
I have my phone as well as my mom's on my iTunes account. She updated her phone today and signed into my account. When I updated my iPad this evening, it then associated my iPad with her number for Facetime and I've spent the last 2 hours searching f
-
DELL printer on a windows network w/ macbookpro client
I purchased a macbook pro recently, which i run on a home WLAN. I keep finding my windows desktop in the printer browser, but I don't know the name required to acess it or the password. Can someon tell me what i am not doing?