Opening .doc files from Java
Ok, here's my problem.
I'm using Java to create an autorun program for a little thing I'm putting together.
One of the options should be "Read documentation" . However, to do that, I need to make my program open a Microsoft Word (.doc) document. What is the command/how can I do this? By open, I mean open the file in MS Word for viewing.
When you say "where filename is the path" do you mean
type in "\documentation\file.doc" or is it a variable?It's a variable in the example. It doesn't matter -- just as long as the resulting string passed to exec will contain the correct file name so the OS will see it.
Similar Messages
-
Cant open doc files from the server on MacBook Air after upgrading to Maverick
Cant open doc files from the server on MacBook Air after upgrading to Maverick, I can only open up docx file. Thank you!
Thanks for the suggestion! I don't use Phantasm or VectorScribe (or any Astute Graphics plugins for that matter). I do, however, have a Wacom tablet and have a few plugins that concern using Blurb Book Creator as well as LiveSurface Context.
I did the very unfortunate and foolish act of upgrading to Maverick without a backup, so postponing isn't an option for me.
I geuss my question at this point would be, would it be worthwhile to wipe all the adobe products from my harddrive and re-install them? Or would that be a useless endeavor.
I don't have an external hard-drive so backing up and re-installing the entire OS would be a bit much. Any suggestions? -
can i open servlet file from java
do you mean linking to a servlet from java application?
have you try this?
URL toServlet = new URL("URLtoServlet");
URLConnection servletConnection = toServlet.openConnection(); -
Opening .doc files from IFS
Hi,
I have a question about some functionality in the default web package with ifs. It is probably quite basic, but I am having difficulty with it. In the out of the box web ui, if I click on an uploaded .doc file, Microsoft Word gets loaded in my browser with the file openned.
I am using the JAVA API, and I have uploaded and foldered a .doc file. When I click on it, href="//computer/path/file.doc" word opens, but I get the file was not found.Any ideas?? Thank you.
IanIan
The decision on which application the browser runs is taken by the browser based on information supplied in the HTTP response.
Here's an updated version of the RenderContent method that gives you some degree of control over this process...
// $Header$
* Please complete these missing tags
* @author
* @rref
* @copyright
* @concurrency
* @see
package ifs.pm.common.jsp;
import oracle.ifs.adk.http.HttpUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletInputStream;
import oracle.ifs.beans.Selector;
import oracle.ifs.beans.Format;
import java.util.Enumeration;
import java.util.Locale;
import java.net.URLEncoder;
import java.lang.Class;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import oracle.ifs.adk.security.IfsHttpLogin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.File;
import ifs.pm.common.trace.Alert;
import oracle.ifs.beans.LibraryObject;
import oracle.ifs.beans.ClassObject;
import oracle.ifs.beans.Document;
import oracle.ifs.beans.LibraryObjectDefinition;
import oracle.ifs.beans.Attribute;
import oracle.ifs.common.AttributeValue;
import oracle.ifs.beans.PublicObject;
import oracle.ifs.beans.FolderPathResolver;
import oracle.ifs.beans.LibrarySession;
import oracle.ifs.common.IfsException;
import oracle.ifs.beans.LibraryService;
import oracle.ifs.beans.LibrarySession;
import oracle.ifs.common.CleartextCredential;
import oracle.ifs.common.ConnectOptions;
import java.util.Hashtable;
import java.util.Date;
import java.text.SimpleDateFormat;
public class JspHelper extends Object
public static final String ACTION = "Action";
public static final String OPERATION = "Operation";
public static final String POLICY = "Policy";
public static final String MIMETYPE = "MimeType";
public static final String OPEN = "Open";
public static final String DOWNLOAD = "Download";
public static final String RENDER = "Render";
public static final String WEBLOGON = "/Login";
public static final String USERNAME = "username";
public static final String PASSWORD = "password";
public static final String SERVICE = "service";
public static final String SCHEMA_PASSWORD = "schemapassword";
public static final String IFSHTTPLOGIN = "IfsHttpLogin";
public static final String IFSWEBROOT = "/ifs/webui";
public static final String IFSTIMEOUT_URL = "/html/timeout.html";
private static String m_ServletPath = null;
private static final boolean DEBUG = true;
private static final String OPEN_SAVEAS_DIALOG = "oracleifs/download";
* Please complete the missing tags for JspHelper
* @param
* @return
* @throws
* @pre
* @post
private static Hashtable characterEncoding = new Hashtable();
static {
characterEncoding.put("+","%2B");
characterEncoding.put("#","%23");
characterEncoding.put("&","%26");
characterEncoding.put(" ","%20");
characterEncoding.put("'","%27");
characterEncoding.put(":","%3A");
characterEncoding.put("(","%28");
characterEncoding.put(")","%29");
characterEncoding.put("-","%2D");
private static String getServletPath()
return m_ServletPath;
public static String generateURL(Long id)
// Creates an Encoded URL from a Docid
String url = "";
if (getServletPath() != null) {
url = getServletPath();
url = url + "/";
url = url + (String) characterEncoding.get(":");
url = url + id.toString();
return url;
public static String generateURL(String path)
// Creates an Encoded URL from a Docid
String url = "";
if (getServletPath() != null) {
url = getServletPath();
if (!path.startsWith("/")) {
url = url + "/";
url = url + encodePath(path);
return url;
private static void setupServletPath(HttpServletRequest req)
// If never initialized, get the servlet path and store
// in the static
if ( null == m_ServletPath )
String contextPath = null;
String servletPath = "";
// Start with an empth string
m_ServletPath = "";
//let's figure out whether we're running under Servlet API 2.2
//or an earlier version
Class c = req.getClass();
try
//getContextPath() is first defined in 2.2
Method m = c.getMethod("getContextPath", null);
contextPath = (String)m.invoke(req, null);
catch (NoSuchMethodException e1)
catch (InvocationTargetException e2)
catch (IllegalAccessException e3)
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): contextPath = " + contextPath);
servletPath = req.getServletPath();
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): servletPath = " + servletPath);
if ( null != contextPath )
m_ServletPath = contextPath;
if ( null != servletPath )
m_ServletPath += servletPath;
else
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): not first time through.");
if (DEBUG) {
Alert.log ("JspHelper.setupServletPath(): m_ServletPath = " + m_ServletPath);
private static String getReposPath( HttpServletRequest request )
String result = null;
String path = request.getParameter(DOCUMENT_PATH);
if (null == path) {
path = request.getParameter(ALTERNATIVE_PATH);
return getReposPath(path);
public static String getReposPath(String path)
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Initial Path = " + path);
if (path != null) {
if ( ( null != getServletPath() ) && path.startsWith(getServletPath())) {
path = path.substring(getServletPath().length());
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Stripped Path = " + path);
path = undoSubstitutions(path);
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Converted Path = " + path);
if (DEBUG) {
Alert.log("JspHelper.getReposPath(request) Final Path = " + path);
return path;
public static String encodePath(String path)
// Substitute '%', then everything else
path = replaceString(path,"%","%25");
return doSubstitutions(path);
public static String decodePath(String path)
path = undoSubstitutions(path);
return replaceString(path,"%25","%");
public static String doSubstitutions(String path)
String encodedPath = path;
Enumeration keys = characterEncoding.keys();
while (keys.hasMoreElements()) {
String source = (String) keys.nextElement();
String target = (String) characterEncoding.get(source);
encodedPath = replaceString(encodedPath,source,target);
return encodedPath;
public static String undoSubstitutions(String path)
String encodedPath = path;
Enumeration keys = characterEncoding.keys();
while (keys.hasMoreElements()) {
String source = (String) keys.nextElement();
String target = (String) characterEncoding.get(source);
encodedPath = replaceString(encodedPath,target,source);
return encodedPath;
public static String getReposPath( HttpServletRequest request )
return HttpUtils.getIfsPathFromJSPRedirect(request);
public static String generateURL(HttpServletRequest request, Long id)
return HttpUtils.getURLFromIfsPath(request,":" + id.toString());
public static String generateURL(HttpServletRequest request, String path)
return HttpUtils.getURLFromIfsPath(request,path);
public JspHelper()
IfsException.setVerboseMessage( true );
* Please complete the missing tags for getArgumentAsString
* @param
* @return
* @throws
* @pre
* @post
public static String getArgumentAsString( Object arg )
if( null == arg )
return "";
else
return arg.toString();
* Please complete the missing tags for getArgumentAsString
* @param
* @return
* @throws
* @pre
* @post
public static String getArgumentAsString( String formatMask, Date arg )
if( null == arg )
return "";
else
SimpleDateFormat sdf = new SimpleDateFormat( formatMask );
return sdf.format( arg );
* Please complete the missing tags for getSession
* @param
* @return
* @throws
* @pre
* @post
public static LibrarySession getSession( HttpServletRequest request, HttpServletResponse response )
throws IfsException
if( DEBUG )
Alert.log( "getSession(request,response): Entering Method." );
dumpServletParameters( request );
// setupServletPath(request);
LibrarySession ifsSession = null;
HttpSession httpSession = request.getSession( true );
if( null != httpSession )
IfsHttpLogin ifsLogin = ( IfsHttpLogin ) httpSession.getValue( IFSHTTPLOGIN );
if( ifsLogin != null )
ifsSession = ifsLogin.getSession();
if( null == ifsSession )
try
// String timeoutPath = generateURL(request,getTimeOutURL());
String timeoutPath = HttpUtils.getURLFromIfsPath( request, getTimeOutURL() );
if( DEBUG )
Alert.log( "getSession(request,response): Unable to get a valid Session = assuming Timeout problem. Redirecting to " + timeoutPath );
response.sendRedirect( timeoutPath );
catch( IOException ioe )
throw new IfsException( 9999, ioe );
return ifsSession;
* Please complete the missing tags for getObject
* @param
* @return
* @throws
* @pre
* @post
public static PublicObject getObject( HttpServletRequest request, HttpServletResponse response )
throws IfsException
// Will return null and set a Redirect to the Timeout Page if the Sesssion
// is null.
String path = null;
PublicObject po = null;
LibrarySession ifsSession = getSession( request, response );
if( null != ifsSession )
// path = getReposPath(request);
path = HttpUtils.getIfsPathFromJSPRedirect( request );
if( path.charAt( 1 ) == ':' )
Long docId = new Long( path.substring( 2 ) );
po = ifsSession.getPublicObject( docId );
else
FolderPathResolver fpr = new FolderPathResolver( ifsSession );
fpr.setRootFolder();
po = fpr.findPublicObjectByPath( path );
if( DEBUG )
Alert.log( "getObject(request,response): Object is a " + po.getClassname() );
po = po.getResolvedPublicObject();
return po;
* Please complete the missing tags for getExtendedAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getExtendedAttributeValues( LibraryObject lo, HttpServletRequest request )
throws IfsException
// Returns a Library Object Definition containing the Attribute Values for each
// Extended Attribute which appears as a parameter in the request obvject.
ClassObject co = lo.getClassObject();
Attribute [] attributes = co.getExtendedClassAttributes();
return getAttributeValues( attributes, request );
* Please complete the missing tags for getEffectiveAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getEffectiveAttributeValues( LibraryObject lo, HttpServletRequest request )
throws IfsException
// Returns a Library Object Definition containing the Attribute Values for each
// Extended Attribute which appears as a parameter in the request obvject.
ClassObject co = lo.getClassObject();
Attribute [] attributes = co.getEffectiveClassAttributes();
return getAttributeValues( attributes, request );
* Please complete the missing tags for getAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getAttributeValues( Attribute [] attributes, HttpServletRequest request )
throws IfsException
LibraryObjectDefinition def = new LibraryObjectDefinition();
if( attributes != null )
for( int i = 0; i < attributes.length; i++ )
AttributeValue av = getAttributeValue( attributes [ i ], request );
if( av != null )
def.setAttribute( av );
return def;
* Please complete the missing tags for getAttributeValue
* @param
* @return
* @throws
* @pre
* @post
public static AttributeValue getAttributeValue( Attribute attribute, HttpServl etRequest request )
throws IfsException
AttributeValue av = null;
String name = attribute.getName();
String newValue = request.getParameter( name );
if( newValue != null )
if( newValue.equals( "" ) )
av = AttributeValue.newNullAttributeValue( attribute.getDataType() );
else
av = AttributeValue.newAttributeValue( newValue );
av.setName( name );
return av;
* Please complete the missing tags for downloadContent
* @param
* @return
* @throws
* @pre
* @post
public static void downloadContent( HttpServletRequest request, HttpServletResponse response )
throws IfsException
boolean download = false;
String action = request.getParameter( ACTION );
if( action != null )
if( action.equals( DOWNLOAD ) )
download = true;
Alert.log( "JspHelper.downloadContent(): download = " + download );
try
Document doc = ( Document ) JspHelper.getObject( request, response );
OutputStream os = response.getOutputStream();
if( download )
response.setContentType( OPEN_SAVEAS_DIALOG );
response.setHeader( "Content-Disposition", "attachment; filename=" + doc.getName() );
else
response.setContentType( doc.getFormat().getMimeType() );
response.setHeader( "Content-Disposition", "inline; filename=" + doc.getName() );
response.setContentLength( ( int ) doc.getContentSize() );
InputStream is = doc.getContentStream();
byte [] bytesRead = new byte [ 1024 ];
for( int byteCount = is.read( bytesRead, 0, bytesRead.length );
byteCount > 0;
byteCount = is.read( bytesRead, 0, bytesRead.length ) )
os.write( bytesRead, 0, byteCount );
catch( Exception e )
throw new IfsException( 9999, e );
* Please complete the missing tags for dumpServletParameters
* @param
* @return
* @throws
* @pre
* @post
public static void dumpServletParameters( HttpServletRequest request )
// setupServletPath(request);
Enumeration parmList = request.getParameterNames();
Alert.log( "Parameter List:" );
while( parmList.hasMoreElements() )
String parmName = ( String ) parmList.nextElement();
Alert.log( " " + parmName );
Alert.log( "Parameter Processing Completed." );
* Please complete the missing tags for obtainSession
* @param
* @return
* @throws
* @pre
* @post
public static LibrarySession obtainSession( HttpServletRequest request, HttpServletResponse response )
throws IfsException
if( DEBUG )
Alert.log( "obtainSession(request,response): Servlet Parameters = " );
dumpServletParameters( request );
// setupServletPath(request);
HttpSession httpSession = request.getSession( true );
if( httpSession != null )
IfsHttpLogin ifsLogin = ( IfsHttpLogin ) httpSession.getValue( IFSHTTPLOGIN );
if( ifsLogin != null )
LibrarySession ifsSession = ifsLogin.getSession();
if( ifsSession != null )
return ifsSession;
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Unable to get Session. - Attempting to create new Session" );
LibrarySession ifs = null;
String username = "guest";
String password = "welcome";
String service = "IfsDefault";
String schemaPassword = "manager";
String suppliedUsername = request.getParameter( USERNAME );
String suppliedPassword = request.getParameter( PASSWORD );
String suppliedService = request.getParameter( SERVICE );
String suppliedSchemaPassword = request.getParameter( SCHEMA_PASSWORD );
if( suppliedUsername != null )
username = suppliedUsername;
if( suppliedPassword != null )
password = suppliedUsername;
if( suppliedService != null )
service = suppliedService;
if( suppliedSchemaPassword != null )
schemaPassword = suppliedSchemaPassword;
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Creating new Session." );
Alert.log( " Username = " + username );
Alert.log( " Password = " + password );
Alert.log( " Service = " + service );
Alert.log( " Schema Password = " + schemaPassword );
LibraryService ifsService = new LibraryService();
CleartextCredential me = new CleartextCredential( username, password );
ConnectOptions connect = new ConnectOptions();
connect.setLocale( Locale.getDefault() );
connect.setServiceName( service );
connect.setServicePassword( schemaPassword );
LibrarySession ifsSession = ifsService.connect( me, connect );
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Session Created." );
JspLogin login = new JspLogin();
login.setSession( ifsSession );
httpSession.putValue( IFSHTTPLOGIN, login );
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Login Object Saved." );
return ifsSession;
* Please complete the missing tags for replaceString
* @param
* @return
* @throws
* @pre
* @post
public static String replaceString( String string, String string1, String string2 )
int offset = string.indexOf( string1 );
switch( offset )
case - 1 :
return string;
case 0 :
return string2 + replaceString( string.substring( string1.length() ), string1, string2 );
default:
return string.substring( 0, offset ) + string2 + replaceString( string.substring( offset + string1.length() ), string1, string2 );
* Please complete the missing tags for printLink
* @param
* @return
* @throws
* @pre
* @post
public static void printLink( javax.servlet.jsp.JspWriter out,
String name,
String url,
String color )
throws java.io.IOException
if( null != url )
if( url.indexOf( "http://" ) != 0 )
url = "http://" + url;
out.println( "<BR><A HREF=\"" + url + "\"><FONT COLOR=\"" + color + "\"><B>" + name + "</B></FONT></A>" );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
String dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
out.println( "<FONT COLOR=\"" + titleColor + "\">" + titleValue + ": </FONT> <FONT COLOR=\"" + dataColor + "\"><B>" + dataValue + "</B></FONT><BR>" );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Integer dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Boolean dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Date dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for renderContent
* @param
* @return
* @throws
* @pre
* @post
public static void renderContent( HttpServletRequest request, HttpServletResponse response )
throws IfsException
Document doc = ( Document ) JspHelper.getObject( request, response );
boolean download = false;
boolean renderedOutput = false;
String mimeType = null;
// Determine if we are opening or Downloading Content based on Action
String action = request.getParameter( ACTION );
if( action != null )
if( action.equals( DOWNLOAD ) )
download = true;
if( DEBUG )
Aler t.log( "JspHelper.downloadContent(): download = " + download );
// Determine is we want Raw or Rendered Content. For Rendered Content both
// Operation and Policy must be supplied.
String operation = request.getParameter( OPERATION );
String policy = request.getParameter( POLICY );
if( ( null != operation ) && ( null != policy ) )
renderedOutput = true;
if( DEBUG )
Alert.log( "JspHelper.downloadContent(): renderedOutput = " + renderedOutput );
// Determine if contentType comes from Document or is supplied explicity.
mimeType = request.getParameter( MIMETYPE );
if( null == mimeType )
mimeType = doc.getFormat().getMimeType();
if( DEBUG )
Alert.log( "JspHelper.downloadContent(): mimeType = " + mimeType );
// Process as Requested.
try
response.setContentType( mimeType );
String filename = doc.getName();
String fileExtension = filename.substring( filename.lastIndexOf( '.' ) + 1 );
filename = filename.substring( 0, filename.lastIndexOf( '.' ) - 1 );
Selector mySelector = new Selector( getSession( request, response ) );
mySelector.setSearchClassname( Format.CLASS_NAME );
mySelector.setSearchSelection( Format.MIMETYPE_ATTRIBUTE + "='" + mimeType + "'" );
if( mySelector.getItemCount() > 0 )
Format f = ( Format ) mySelector.getItems( 0 );
fileExtension = f.getExtension();
filename = filename + '.' + fileExtension;
if( DEBUG )
Alert.log( "JspHelper.RenderContent(): Filename = " + filename );
if( download )
response.setHeader( "Content-Disposition", "attachment; filename=" + filename );
else
response.setHeader( "Content-Disposition", "inline; filename=" + filename );
InputStream is;
if( renderedOutput )
is = doc.renderAsStream( operation, policy, null );
else
is = doc.getContentStream();
response.setContentLength( ( int ) doc.getContentSize() );
OutputStream os = response.getOutputStream();
byte [] bytesRead = new byte [ 1024 ];
for( int byteCount = is.read( bytesRead, 0, bytesRead.length );
byteCount > 0;
byteCount = is.read( bytesRead, 0, bytesRead.length ) )
os.write( bytesRead, 0, byteCount );
catch( Exception e )
throw new IfsException( 9999, e );
* Please complete the missing tags for dumpInputStream
* @param
* @return
* @throws
* @pre
* @post
public static void dumpInputStream( ServletInputStream sis )
throws IOException
FileOutputStream fos;
if( File.separator.equals( "\\" ) )
fos = new FileOutputStream( "C:\\temp\\request.txt" );
else
fos = new FileOutputStream( "/tmp/request.txt" );
byte [] bytes = new byte [ 1024 ];
for( int bytesRead = sis.readLine( bytes, 0, bytes.length );
bytesRead > 0;
bytesRead = sis.read( bytes, 0, bytes.length ) )
Alert.log( "JspHelper.dumpInputStream() BytesRead = " + bytesRead );
fos.write( bytes, 0, bytesRead );
fos.close();
* Please complete the missing tags for getTimeOutURL
* @param
* @return
* @throws
* @pre
* @post
private static String getTimeOutURL()
Locale locale = Locale.getDefault();
String country = locale.getCountry();
String language = locale.getLanguage().toLowerCase();
String localizedFolder = language;
if( country != null )
if( ( ! language.equalsIgnoreCase( "en" ) ) | |
( ( language.equalsIgnoreCase( "en" ) ) && ( ! country.equalsIgnoreCase( "US" ) ) ) )
language = language + "_" + country.toUpperCase();
return IFSWEBROOT + "/" + language + IFSTIMEOUT_URL;
null -
Open .doc file in java on Windows 98/2000
Hi all,
I need to open a .doc file on Windows 98/2000 PC thriugh java.I have used the command
Runtime.getRuntime().exec(new String[] {"cmd", "/C", "start", "\"\"", filename});
This command works fine on Window 2000 but gives IO Exception: CreateProcess: start <filename> error=2
So I tried the command
Runtime.getRuntime().exec("start"+filename);
Now this command works fine on Windows 98 but gives the same error on Win2000.
Someone please suggest a command which will work fine on all Windows OS.
Thanks in advanceHave a look at the Java Desktop Integration Components Project https://jdic.dev.java.net/documentation/index.html
especially look at
https://jdic.dev.java.net/nonav/documentation/javadoc/jdic/org/jdesktop/jdic/desktop/Desktop.html#open(java.io.File)
which opens a File using the default application associated with this kind of file. -
Not opening .doc files from cd??
Hi,
I have various .doc files on cd. I want to use pages to open them. When i drag them from the cd onto either the pages icon or try the same using "file, open" from within pages i get an error message saying that it cannot open the file.
If i drag the same .doc files onto the hard drive first i can open them in pages no problem.
I need to be able to open them from the cd. Does anyone know what is wrong here or how it can be fixed?
Many thanks.Hello
My guess is that the device must be set as read/write to permit to expand the Index.xml.gz file which contains the doc's description.
I just guess because I saw the Index.xml file during the save process but, even with huge documents I was unable to see the expansion process at work.
I was also able to see the Index.xml file if I double click the Index.xml.gz icon.
Yvan KOENIG (from FRANCE jeudi 21 février 2008 20:08:49) -
Can not open .doc files from Finder
I installed Snow Leopard and now I'm having trouble with .doc files. I use Microsoft Office 2004. When I try to open a .doc file directly from the internet or by clicking on it from Finder or desktop, it won't open. Instead I have to go into Word and click open then browse. Any ideas on how to fix this?
This works only for files that I know have been created in Mac Office 2004, but any other files I download - for instance, from school - will not open in this way. I followed your suggestion, but Word was already the default application used and the "change all" box was unclickable.
I tried right clicking on the file, going to the "open with" menu, then clicking "other" and selected Word that way. I made sure that "always open with" was checked, but it still didn't help. -
Trial question: Can't open .doc files from web page
I'm using Dreamweaver on a Mac, and I have a link on a page
that should bring up a doc file. When I preview the page in Safari,
it brings up a directory listing which highlights the file so that
you can double-click and open the file. (Of course, I'd love for it
to go ahead and open the file, but my understanding is that
Dreamweaver Mac doesn't support that.) However, when I preview in
Internet Explorer, I either get a message that the File is Not
Found or it just spins and never brings up anything. The file is in
the root directory of my site (same directory as my index.html.
Any ideas?
Thanks!
KimDo you have Word installed on your Mac? If you don't, it
won't open.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"kshorb" <[email protected]> wrote in
message
news:eenckl$h3a$[email protected]..
>I used code similar to that below, but the .doc file
never opened in IE. I
>did
> find, however, if I link to a .pdf it works just fine.
So I just went
> ahead
> and converted my .doc to a .pdf and changed the href.
Maybe it's
> something
> specific to my computer... Thanks.
>
> <a href="yourdoc.doc">Click here to open Word Doc
> </a>
> -
Opening HTML file from java GUI
Can someone please tell me how I can open a HTML file in Internet Explorer from a Java GUI,
I have an asssignment I am doing for college and I was toying with the idea of putting in helpfiles, for the program, can anyone tell me the easiest way of apcomplishing this???
Thanks in advance for your help,
KaspahAlthough this should answer your question, there are other (cross platform) ways to do what you want. As opposed to your "must have internet explorer" solution. Swing has a built in html viewer you might use, for example. I've been doing some reading on java/xml solutions. I don't consider myself knowledgeable enough (yet) to comment on that solution though. A delimited text file would be another solution. Useing that solution you could treat the file like a set of parrallel arrays on the hard drive and disply your text on pre-formated labels. Anyway, here is a link to you answer......
http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Runtime.html#exec(java.lang.String)
Ron_W -
How to open a file from thumbdrive by Java!
Can anyone reply me the Java sample code to open a file from thumbdrive. Currently I can only open files from my "C"Drive. The Drive which I will be using for my thumbdrive is F Drive.
Thank you!Currently I need to make changes to this code so that it can read the "my file" from my f drive instead of the c drive.
/public class Main {
public Main() {
public static void main(String[] args) {
try {
//Runtime.getRuntime().exec("cmd /c start myfile.doc");
//Runtime.getRuntime().exec("cmd /c start \"myfile.doc\"");
Runtime.getRuntime().exec("cmd /c start myfile.pps");
//Runtime.getRuntime().exec("cmd /c start myfile.xls");
//Runtime.getRuntime().exec("cmd /c start myfile.pdf");
//Runtime.getRuntime().exec("myfile.doc");
catch (Exception x) {
x.printStackTrace();
catch (Error e) {
e.printStackTrace();
} -
How to open an PDF file from Java Application
Hi
I am developing a GUI application in java swing.
on clicking one button, I want to open PDF file from my swing application.
Is there any API through which I can achieve this?
Tapan Maru
Sun Certified Java ProgrammerHere's a way to do it (if I understand you
correctly). Just let explorer.exe do it for you.
import java.awt.*;
public class openPDF
Desktop desktop = Desktop.getDesktop();
public openPDF()
open("test.pdf");
public void open(String path)
try
Runtime.getRuntime().exec("explorer.exe "+path);
} catch(Exception e) { System.out.println("NAI!
I! ERROR!\n"+e); }
public static void main(String[] args)
openPDF myApplication = new openPDF();
Why do you have a Desktop object as a member but instead of using it, you execute a command with Runtime (which is not platform independent!)???
-Puce -
Cannot open Microsoft Word .doc files from any website (.docx are ok)
That is a legitimate Mozilla newsletter. As it says in the email:
You're receiving this email because you subscribed to receive email newsletters and information from Mozilla. If you do not wish to receive these newsletters, please click the Unsubscribe link below.
Unsubscribe https://www.mozilla.org/en-US/newsletter/existing/ad9febcf-65ac-41fd-810b-798945f448f3/
Modify your preferences https://www.mozilla.org/en-US/newsletter/existing/ad9febcf-65ac-41fd-810b-798945f448f3/ " -
Hi,
I need some help.
Product=weblogic5.1.0
Revision=(Release Level)=
Problem Description=
I am doing cluster of weblogic server, I have no problem to set up the
cluster and to run servlet and EJB examples.
However, on my command line for startcluster I got a lot of message as
followed:
Fri Aug 18 11:31:44 EDT 2000:<E> <MulticastSocket> Multicast socket receive
error: java.lang.RuntimeException: I/O error opening JAR file from
file:/D:/weblogic/mycluster/server86/tmp_deployments/ejbjar-17327.jar
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java, Compiled Code)
at java.util.zip.ZipFile.<init>(ZipFile.java, Compiled Code)
at weblogic.boot.ServerClassLoader.deploy(ServerClassLoader.java,
Compiled Code)
at
weblogic.cluster.AnnotatedServiceOffer.expandClassPath(AnnotatedServiceOffer
.java, Compiled Code)
at
weblogic.cluster.AnnotatedServiceOffer.readObject(AnnotatedServiceOffer.java
, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(WLOb
jectInputStreamBase.java, Compiled Co
de)
at
weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObjectInpu
tStreamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectInputStr
eamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readArrayList(WLObjectInput
StreamBase.java, Compiled Code)
at weblogic.cluster.StateDump.readObject(StateDump.java, Compiled
Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(WLOb
jectInputStreamBase.java, Compiled Co
de)
at
weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObjectInpu
tStreamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectInputStr
eamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjectInputS
treamBase.java, Compiled Code)
at weblogic.cluster.TMSocket.execute(TMSocket.java, Compiled Code)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
The message freshed about every 20 seconds.
Another question, I used a iplanet web server as a proxy server with a
cluster of two weblogic servers pluged in, although I set
weblogic.properties to round-robin, however, when I run a fibonacci servlet,
it does not do the round-robin. It always go to one machine for a lot of
times. Any idea?
Thank you for your help.
Tom
May i presume that your cluster is configured on a shared file system?.
I have seen this problem only if you cluster is configured on different machines
and if the directory structure is not identical.
let us know..
Kumar
Cameron Purdy wrote:
> First, update to SP4 (or SP5 if it is out now). Second, follow the cluster
> instructions on setting up deployments for a cluster. The only
> implementation that I have used is the single shared location that all the
> servers load from.
>
> --
>
> Cameron Purdy
> http://www.tangosol.com
>
> "Tom Gan" <[email protected]> wrote in message
> news:[email protected]...
> > Hi,
> > I need some help.
> >
> > Product=weblogic5.1.0
> > Revision=(Release Level)=
> > Problem Description=
> > I am doing cluster of weblogic server, I have no problem to set up the
> > cluster and to run servlet and EJB examples.
> > However, on my command line for startcluster I got a lot of message as
> > followed:
> > Fri Aug 18 11:31:44 EDT 2000:<E> <MulticastSocket> Multicast socket
> receive
> > error: java.lang.RuntimeException: I/O error opening JAR file from
> > file:/D:/weblogic/mycluster/server86/tmp_deployments/ejbjar-17327.jar
> > java.util.zip.ZipException: error in opening zip file
> > at java.util.zip.ZipFile.open(Native Method)
> > at java.util.zip.ZipFile.<init>(ZipFile.java, Compiled Code)
> > at java.util.zip.ZipFile.<init>(ZipFile.java, Compiled Code)
> > at weblogic.boot.ServerClassLoader.deploy(ServerClassLoader.java,
> > Compiled Code)
> > at
> >
> weblogic.cluster.AnnotatedServiceOffer.expandClassPath(AnnotatedServiceOffer
> > .java, Compiled Code)
> > at
> >
> weblogic.cluster.AnnotatedServiceOffer.readObject(AnnotatedServiceOffer.java
> > , Compiled Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(WLOb
> > jectInputStreamBase.java, Compiled Co
> > de)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjectInputS
> > treamBase.java, Compiled Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObjectInpu
> > tStreamBase.java, Compiled Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectInputStr
> > eamBase.java, Compiled Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjectInputS
> > treamBase.java, Compiled Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readArrayList(WLObjectInput
> > StreamBase.java, Compiled Code)
> > at weblogic.cluster.StateDump.readObject(StateDump.java, Compiled
> > Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(WLOb
> > jectInputStreamBase.java, Compiled Co
> > de)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjectInputS
> > treamBase.java, Compiled Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObjectInpu
> > tStreamBase.java, Compiled Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectInputStr
> > eamBase.java, Compiled Code)
> > at
> >
> weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjectInputS
> > treamBase.java, Compiled Code)
> > at weblogic.cluster.TMSocket.execute(TMSocket.java, Compiled Code)
> > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
> > Code)
> >
> > The message freshed about every 20 seconds.
> >
> > Another question, I used a iplanet web server as a proxy server with a
> > cluster of two weblogic servers pluged in, although I set
> > weblogic.properties to round-robin, however, when I run a fibonacci
> servlet,
> > it does not do the round-robin. It always go to one machine for a lot of
> > times. Any idea?
> > Thank you for your help.
> > Tom
> >
> >
> >
-
Hi,
I need some help.
Product=weblogic5.1.0
Revision=(Release Level)=
Problem Description=
I am doing cluster of weblogic server, I have no problem to set up the
cluster and to run servlet and EJB examples.
However, on my command line for startcluster I got a lot of message as
followed:
Fri Aug 18 11:31:44 EDT 2000:<E> <MulticastSocket> Multicast socket receive
error: java.lang.RuntimeException: I/O error ope
ning JAR file from
file:/D:/weblogic/mycluster/server86/tmp_deployments/ejbjar-17327.jar
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java, Compiled Code)
at java.util.zip.ZipFile.<init>(ZipFile.java, Compiled Code)
at weblogic.boot.ServerClassLoader.deploy(ServerClassLoader.java,
Compiled Code)
at
weblogic.cluster.AnnotatedServiceOffer.expandClassPath(AnnotatedServiceOffer
.java, Compiled Code)
at
weblogic.cluster.AnnotatedServiceOffer.readObject(AnnotatedServiceOffer.java
, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(WLOb
jectInputStreamBase.java, Compiled Co
de)
at
weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObjectInpu
tStreamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectInputStr
eamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readArrayList(WLObjectInput
StreamBase.java, Compiled Code)
at weblogic.cluster.StateDump.readObject(StateDump.java, Compiled
Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(WLOb
jectInputStreamBase.java, Compiled Co
de)
at
weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObjectInpu
tStreamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectInputStr
eamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjectInputS
treamBase.java, Compiled Code)
at weblogic.cluster.TMSocket.execute(TMSocket.java, Compiled Code)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
The message freshed about every 20 seconds.
Another question, I used a iplanet web server as a proxy server with a
cluster of two weblogic servers pluged in, although I set
weblogic.properties to round-robin, however, when I run a fibonacci servlet,
it does not do the round-robin. It always go to one machine for a lot of
times. Any idea?
Thank you for your help.
TomHi,
I need some help.
Product=weblogic5.1.0
Revision=(Release Level)=
Problem Description=
I am doing cluster of weblogic server, I have no problem to set up the
cluster and to run servlet and EJB examples.
However, on my command line for startcluster I got a lot of message as
followed:
Fri Aug 18 11:31:44 EDT 2000:<E> <MulticastSocket> Multicast socket receive
error: java.lang.RuntimeException: I/O error ope
ning JAR file from
file:/D:/weblogic/mycluster/server86/tmp_deployments/ejbjar-17327.jar
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java, Compiled Code)
at java.util.zip.ZipFile.<init>(ZipFile.java, Compiled Code)
at weblogic.boot.ServerClassLoader.deploy(ServerClassLoader.java,
Compiled Code)
at
weblogic.cluster.AnnotatedServiceOffer.expandClassPath(AnnotatedServiceOffer
.java, Compiled Code)
at
weblogic.cluster.AnnotatedServiceOffer.readObject(AnnotatedServiceOffer.java
, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(WLOb
jectInputStreamBase.java, Compiled Co
de)
at
weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObjectInpu
tStreamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectInputStr
eamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readArrayList(WLObjectInput
StreamBase.java, Compiled Code)
at weblogic.cluster.StateDump.readObject(StateDump.java, Compiled
Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(WLOb
jectInputStreamBase.java, Compiled Co
de)
at
weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjectInputS
treamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObjectInpu
tStreamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectInputStr
eamBase.java, Compiled Code)
at
weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjectInputS
treamBase.java, Compiled Code)
at weblogic.cluster.TMSocket.execute(TMSocket.java, Compiled Code)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
The message freshed about every 20 seconds.
Another question, I used a iplanet web server as a proxy server with a
cluster of two weblogic servers pluged in, although I set
weblogic.properties to round-robin, however, when I run a fibonacci servlet,
it does not do the round-robin. It always go to one machine for a lot of
times. Any idea?
Thank you for your help.
Tom -
Want to open specific file from DMS Doc. thorugh Function
HI,
is there any function module to open specific file from DMS Document. ?
There is already one function module DOCUMENT_SHOW_DIRECT to open File from document. But
in case of there are more than one file in DMS Document is it giving me Popup menu to open file from List.
I just want to open any single file without any popup from DMS Document.Hi,
from standard point of view this kind of pop-up is always raised by the function module in case there are multiple originals assigned to the document info record.
Best regards,
Christoph
Maybe you are looking for
-
wait wait wait, I must be making a stupid mistake I set my new song tempo at 80.. I make sure its that way in the transport bar, etc etc I audition a loop, like it, drop it in timeline it plays the same tempo as it did in audition. I go to the tempo
-
Remove Soap Header while calling a WS from BPEL 11g
Hi My requirement is to remove the entire SOAP Header tag in the invoke activity. How this can be achieved? Please help thanks Sesha
-
Hi Experts, I am working on newly installed XI system and I am trying to run one simple file to file scenario. I am getting this error when I checked in SXMB_MONI <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!-- Request Message Mappin
-
Can not turn on location services
The "Location Services" on my iPhone 5 is greyed out and will not allow me to turn it on? Whats up? I just installed IOS 7, Find my iPhone is selected, on my phone, my iMac and the iCloud. They all have the same message, "Online, Location Services of
-
Hi, I am tring to set up clustering on my laptop(Windows XP home OS) using Medrec Tutorials for Weblogic SP4.Its giving me SocketException.Same had worked when tried on Win2000 OS.I tried with SP2 also but its giving the same exception. Please let me