ActiveX in Java
Is there any way to implement ActiveX objects in Java??
Anycode examples sites will help?
Is there any way to implement ActiveX objects in
Java??
Anycode examples sites will help?Yes, by using Microsoft J++. But why would you want to? If you want to do Java, don't do ActiveX. If you want ActiveX objects, do it in VB or C++ instead.
Similar Messages
-
Unable to Embed ActiveX in Java
Hi,
We are trying to embed an activex control (ocx control) in java using third party tool JacoZoom. We are not able to create an instance of com.inzoom.axjni.ActiveX class using
ActiveX w = new ActiveX("DTDLG.DTDlgCtrl.1");
System.out.println(" W : " + w);
While printing the value of this object it displays
the following:
com.inzoom.axjni.ActiveX[canvas0,0,0,0x0,invalid]
We are not able to find out why it is invalidating the object?
Please guide us.........
Thanks,
VimalThe object for com.inzoom.axjni.ActiveX seems to have been created ok. The print out shows that you have an instance of the class.
After creation, you will need to add the object to a visual component. Since you are using ActiveX (not JActiveX), you should use an AWT container to add the instance. Once added and once the parent is visible on screen, it will get validated in the sense that it can paint itself on screen.
If you use Swing, you should use JActiveX instead of ActiveX.
As far as I understand how JacoZoom sets up ActiveX, the "invalid" only means that the component does not yet have a device (screen) to paint itself on.
Good luck, Sylvia -
Call ActiveX from Java? (not Runtime.exec())
The Java ActiveX Bridge allows access from Visual Basic to Java components. Is it also possible to communicate the other way round, i.e. calling ActiveX components (DLLs ...) from within Java? (Perhaps via JNDI?)
Thanks but i don't look for a 3rd party library (and of course not one that was last changed in 2001 ...). I'm playing around with System.loadLibrary() that seems to work, but when calling a function from this DLL, i just get
java.lang.UnsatisfiedLinkError: ComputeValuewith ComputeValue being the following visual basic DLL:
Public Function ComputeValue(value As String) As String
ComputeValue = ">>" & value & "<<"
End Function -
ActiveX to Java (???)
I'm looking for ways to connect Microsoft based GUI code to Java back ends.
Does anybody know, if I can use the ActiveX bridge to do that? An idea would be, for example, to subscribe to a JMS topic in the bean and then package the bean to be used for communication with the server side application, while all the GUI stuff happens in C++, VB, whatever.
Is that possible? Pass data from the ActiveX code to the bean to the server and vice versa?
LaiSenHi,
I wrote a Java Bean which communicates with an MS-Excel worksheet (and vice versa) using a simple String object. The ActiveX component (the bean) is an object in the worksheet accessed through VBA.
No problem to ship You the source code.
You can also use a third party product like 'J-Integra' which is much more comfortable.
Kind regards -
Printing PDF by using ActiveX in java application
Hi All,
I'm working on an application that creates pdf documents. The aim is to make a silent printing of these documents so without any user action.
I tried several solution. I tried PrintJob from javax.print and Desktop from java.awt. I'm not satisfy by these both solution.
So now I would like to use Acrobat through the COM interface.
Could you indicate to me where I can find a documentation or some examples of implementtion about this interface and its usage into java. I googled but I found not example of implementaiton ?
Thanks
S.Ok .... .
I tried in java by using jacob the following code to use Acrobat but I found no information regarding the call of the Acrobat functions (open file, print file, ...)
My exemple is :
ComThread.InitSTA();
ActiveXComponent oAcroPDF = new ActiveXComponent("AcroPDF.PDF");
try {
oAcroPDF.invoke("LoadFile", fileName);
oAcroPDF.invoke("PrintAll"); -
i need embed Internet Explorer or Flash Macromedia into mi application make in java
get API at http://www.simtel.net/product.php?url_fb_product_page=60701
and read example with MS IE. Example sources are packed with binaries in proper JARs. -
Java applet to ActiveX controls
is it possible to write an applet which internally talks to a
an activex control written in VB?. i have a requirement where
we have to write some components to be used with both IE and Netscape.
not sure how to go about it.Yes, you can do this.
I worked on a similar requirement some years ago; MSDN has samples on how to do this. The basic idea is to use VBScript to access the "dom" and get hold of the applet object.
Try searching on MSDN with ActiveX and Java.
Hope this helps.
S -
Error after deploying the application in PI java system
Hi all,
I have created a test web dynpro java application and deployed in PI7.1 java engine. Using the JCO's maintained i hav connected to ECC7.1 system and created a model to call a bapi. After deploying and running the application, I got the following error. Please let me know the solution
Regards
Sagar
500 Internal Server Error SAP NetWeaver Application Server/Java AS
The initial exception that caused the request to fail, was:
java.lang.NullPointerException
at com.sap.conn.jco.rt.DefaultDestinationManager.checkProperties(DefaultDestinationManager.java:405)
at com.sap.conn.jco.rt.DefaultDestinationManager.update(DefaultDestinationManager.java:142)
at com.sap.conn.jco.rt.DefaultDestinationManager.searchDestination(DefaultDestinationManager.java:292)
at com.sap.conn.jco.rt.DefaultDestinationManager.getDestinationInstance(DefaultDestinationManager.java:90)
at com.sap.conn.jco.JCoDestinationManager.getDestination(JCoDestinationManager.java:61)
... 82 more
See full exception chain for details.
Failed to process request. Please contact your system administrator.
While processing the current request, an exception occured which could not be handled by the application or the framework.
If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
For further information about the Web Dynpro error page, error analysis and a description of well-known error situations, see SAP note 1113811.
System Environment
Client
Web Dynpro Client Type HTML Client
User agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6.3)
Client Type msie6
Client Type Profile ie6
ActiveX enabled
Java Applets enabled
Accessibility mode disabled
Rendering engine: Lightspeed
Inline CSS: enabled
Validate by rendering: enabled
Server
Web Dynpro Runtime vendor: 'sap.com', name: 'tc/wd/webdynpro', location: 'SAP AG', counter: '7.1100.20081021173332.0000', change number: '28470', codeline: NW711_00_REL
J2EE Engine 7.11.3710.27866.20080910102732
System ID (SID) PID
Server Node ID |1698650|16986|Server 00 00_16986|sappidev01.xtium.com/10.255.30.89|SERVER|RUNNING
Java VM SAP Java 64-Bit Server VM, version:5.1.027, vendor: SAP AG
Operating system Windows 2003, version: 5.2, architecture: amd64
Application
Java EE Application (deployable object) demo.sap.com/pegatest
Web Dynpro Application Pegatestappli
Request URI /webdynpro/dispatcher/demo.sap.com/pegatest/Pegatestappli
Version vendor: 'demo.sap.com', name: 'pegatest', location: 'localDevelopment', counter: '20100112141118', change number: 'null'
Session & Other
Session Locale en_US
Session Timezone Pacific Standard Time
Time of Failure Tue Jan 12 00:39:45 PST 2010 (Java Time: 1263285585307)
Session User ClientUser(id=USER.R3_DATASOURCE.J2EE_ADMIN, name=J2EE_ADMIN)
Client Session Id bxuvisJvMVwF2Jn5_M0-ODXALydDRLAhJgFa6xkA_SAP
Client Window Id 09190ac2ff5611dea2480050568315be
Application Session Id 09190ac3ff5611dea70e0050568315be
Web Dynpro Code Generation Infos
demo.sap.com/pegatest
Error Information
Detailed Exception Chain
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exception was thrown in preprocessing phase of application session ApplicationSession(id=09190ac3ff5611dea70e0050568315be, name=com.sap.demo.pegatest.pegatestappli.Pegatestappli). The causing exception is nested. RID=09190ac0ff5611deb9b80050568315be
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doPreprocessing(ClientSession.java:680)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:239)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:258)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToRequestManager(AbstractExecutionContextDispatcher.java:202)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.doService(DispatchHandlerForRequestManager.java:38)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:95)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToRequestManager(ExecutionContextDispatcher.java:140)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:92)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:104)
at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doGet(AbstractDispatcherServlet.java:54)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:140)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:37)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:466)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:291)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:396)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:385)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:76)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:240)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:457)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:250)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:109)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)
Caused by: com.sap.tc.webdynpro.progmodel.context.DictionaryException: InvocationTargetException
at com.sap.tc.webdynpro.progmodel.context.DictionaryHandler.getDataType(DictionaryHandler.java:192)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.init(DataAttributeInfo.java:434)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initUnmappedAttributes(NodeInfo.java:978)
at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:294)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:950)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:954)
at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:69)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:205)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:552)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doPreprocessing(ClientApplication.java:1296)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToApplicationDoPreprocessing(AbstractExecutionContextDispatcher.java:146)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForAppPreprocessing.doService(DispatchHandlerForAppPreprocessing.java:35)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:95)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToApplicationDoPreprocessing(ExecutionContextDispatcher.java:100)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:74)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:571)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:602)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doPreprocessing(ApplicationSession.java:252)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doPreprocessing(ClientSession.java:677)
... 48 more
Caused by: com.sap.dictionary.runtime.DdException: InvocationTargetException
at com.sap.dictionary.runtime.ProviderFactory4J7.getProvider(ProviderFactory4J7.java:36)
at com.sap.dictionary.runtime.DdDictionaryPool.getProvider(DdDictionaryPool.java:96)
at com.sap.dictionary.runtime.DdDictionaryPool.makeDictionary(DdDictionaryPool.java:75)
at com.sap.dictionary.runtime.DdDictionaryPool.makeDictionary(DdDictionaryPool.java:63)
at com.sap.dictionary.runtime.DdBroker.getDataType(DdBroker.java:224)
at com.sap.tc.webdynpro.progmodel.context.DictionaryHandler._getScalarType(DictionaryHandler.java:462)
at com.sap.tc.webdynpro.progmodel.context.DictionaryHandler.getDataType(DictionaryHandler.java:171)
... 67 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sap.dictionary.runtime.ProviderFactory4J7.getProvider(ProviderFactory4J7.java:21)
... 73 more
Caused by: com.sap.conn.jco.JCoException: (106) JCO_ERROR_RESOURCE: Destination DEV_ECC6_220_METADATA does not exist
at com.sap.mdi.jco7.Factory.makeException(Factory.java:41)
at com.sap.mdi.jco7.Destination.<init>(Destination.java:35)
at com.sap.mdi.jco7.Destination.make(Destination.java:21)
at com.sap.mdi.jco7.Factory.getDestination(Factory.java:28)
at com.sap.dictionary.runtime.mdi.DataProvider.<init>(DataProvider.java:115)
... 78 more
Caused by: com.sap.conn.jco.JCoException: (106) JCO_ERROR_RESOURCE: Destination DEV_ECC6_220_METADATA does not exist
at com.sap.conn.jco.rt.DefaultDestinationManager.update(DefaultDestinationManager.java:163)
at com.sap.conn.jco.rt.DefaultDestinationManager.searchDestination(DefaultDestinationManager.java:292)
at com.sap.conn.jco.rt.DefaultDestinationManager.getDestinationInstance(DefaultDestinationManager.java:90)
at com.sap.conn.jco.JCoDestinationManager.getDestination(JCoDestinationManager.java:61)
at com.sap.mdi.jco7.Destination.<init>(Destination.java:32)
... 81 more
Caused by: java.lang.NullPointerException
at com.sap.conn.jco.rt.DefaultDestinationManager.checkProperties(DefaultDestinationManager.java:405)
at com.sap.conn.jco.rt.DefaultDestinationManager.update(DefaultDestinationManager.java:142)
... 85 moreyes, you are getting Cross Origin Problem .So, you need to disable the web security for chrome.
Go to properties of chrome , and add this after path of chrome.
--disable-web-security
After this restart the chrome.
Please follow the below link for reference.
windows - Is it possible to run Chrome with and without web security at the same time? - Super User
Regards
Sridevi -
I am running an FTP server "Rumpus" and generally it works very well.
It does FTP and FTP via HTTP. We use it as an internal FTP server within our company.
However, there is a drag and drop feature that has stopped working on most clients that are connecting using Firefox and Safari.
The problem seems to be that the drag and drop function is a Java applet that requires the client to accept a digital signature, and on almost all machines the window prompting users to accept the certificate/signature never pops up.
The drag and drop feature works on a Windows 2003 server box, and one Mac. The other 35 macs we run all fail to load the applet. The clients connecting are a mix of 10.5.8 and 10.6.3 machines. There is no proxy server, all system updates have been done. Occasionally if I run "cocktail" and clean caches it might work once before crashing Safari or Firefox. I tried Firebug in Firefox but it does not catch anything, no messages in Console either. Under the Java preferences pane, what versions of Java need to be turned on? Any history of other things that might conflict with Java? Any suggestions...Make sure the Java version selected is current:
http://support.apple.com/kb/TS3489
Mac OS X has its own built-in FTP server, which is documented here:
http://www.dummies.com/how-to/computers-software/macs-os-x/Mac-OS-X-Snow-Leopard .html?sort=POPULAR&page=3
And Leopard has one as well:
http://www.ehow.com/how4674062set-server-mac-os-leopard.html
Finally, if your problem is connecting to another FTP server, SFTP is well done by Fugu for the Mac:
http://rsug.itd.umich.edu/software/fugu/
And regular passive ftp is easy with the light mode of
http://www.rbrowser.com/ 's RBrowser.
Both work well with Leopard & Snow Leopard.
Java is great when it works, but it can get really bogged down if it is a Java client on a PC that requires ActiveX PC plugins. While any Intel Mac can run Windows to act on ActiveX, and possibly WINE, ActiveX based Java is very insecure. I recommend steering away from non-Mac based Java apps wherever possible. -
The ActiveX control cannot be instatiated --VC++
When I try to insert any Javabean ActiveX control in VC++ resource dialog(design time).. I get the following error..
"The ActiveX control cannot be instatiated"..
If I create it at runtime..It does not get painted..
if I resize my application my control appears and then disappears
If I try in Visual basic.. I am able to insert the control
and run.. but it crashes at the very end..
Any ideasI have also had painting problems when embedding a ActiveX'ed Java bean into
a VC++ application. I think what we did was a transparent background. For some
reason the background from the VC++ application painted over the ActiveX'ed bean.
I cannot remember all the details now, but it was definitely a problem with the background
from VC++.
Sylvia -
Handling LabView events in ActiveX
Hi all,
I know most ActiveX discussion here is about getting ActiveX to work inside of LabView, but I'm trying to go the other way around.
General Question:
How to I catch or listen to events generated by LabView (in VB or whatever)? And is there some kind of library of LabView ActiveX events?
More specific:
If anyone has ever used the Jacob libraries for using ActiveX from Java, how would I create a LabView event listener from within Java? I can create a VI ActiveXComponent, but I don't know how to use it to listen to events.
Any help on either part of the question will be most appreciated!
Thanks,
Sam"SamF" <[email protected]> wrote in message news:[email protected]..
Thanks for both of your replies, I'm pretty certain that it is possible to generate ActiveX events from LabView, but unfortunately those links don't deal with events. Those are what I used to get to where I am -- opening and running a VI from ActiveX -- but I can't find anything on generating events.If it really seems as though there is no way for LabView to generate ActiveX events (or just catch those that are automatically generated), then I have another question: Is it possible to use LabView to catch its events internally (using it's own events methods), and write to, say, an excel file everytime an event is generated?My thinking is that even if LabView doesn't throw events, other programs such as Excel do, and so if the events were routed through Excel I could catch *those* events.(BTW, I know there are examples of writing to Excel, but I'm looking for something that is *event* driven).Any help either on catching LabView events or using LabView events to write to an MS program will be much appreciated, as always!Thanks,Sam
Sure it's possible to build an activex server. No doubt about that.
If I where to communicate events between the LabVIEW code and another language, I'd think about occurrences or windows events.
There is documentation available about occurrence communication between dll's, cin's and LabVIEW. Never used it, so I can't help you much further.
The windows events are well documented in the msdn. They should be available in any language, though relatively simple api calls.
And you can always use window messages. If you have a window handler of the main program available in LabVIEW, you can use sendmessage or postmessage to communicate to it. The other way around is more difficult, but seems not necessary.
Hope it helps,
Wiebe. -
How to call Java Store Procedure Part III
Hi APC
Everything is working now but when I exce this line
exec :n := PK_FILE_READER.F_GET_FILE_COUNT('C:\')
It did give me a number of file count but the problem was the C:\ dir is from
the server side not from the local PC C Drive.
My question is there a way you can point to your local drive? or your network drive? to get the file count
thanks
davidYou would either need to have some component that runs on the client machine (i.e. an application you deploy on the client either directly or through something like an ActiveX control/ Java applet on a web site) or your client file system would have to be mounted and accessible to the server at the file system level.
In other words, not easily.
Justin -
while using the axbridge can the bean be a JFrame..i tried doing that ..but the frame is not visible while using the activex control
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.tree.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
import org.xml.sax.*;
public class Abhix extends JFrame implements Serializable
private DocumentBuilder builder;
private DocumentBuilderFactory factory ;
private Document doc;
private static final int DEFAULT_WIDTH = 400;
private static final int DEFAULT_HEIGHT = 400;
public Abhix()
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
setTitle("DOMTreeTest");
setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
JMenu fileMenu = new JMenu("File");
JMenuItem openItem = new JMenuItem("Open");
openItem.addActionListener(new
ActionListener()
public void actionPerformed(ActionEvent event) { openFile(); }
fileMenu.add(openItem);
JMenuItem exitItem = new JMenuItem("Exit");
exitItem.addActionListener(new
ActionListener()
public void actionPerformed(ActionEvent event) { System.exit(0); }
fileMenu.add(exitItem);
JMenuBar menuBar = new JMenuBar();
menuBar.add(fileMenu);
setJMenuBar(menuBar);
Open a file and load the document.
public void openFile()
JFileChooser chooser = new JFileChooser();
chooser.setCurrentDirectory(new File("."));
chooser.setFileFilter(new
javax.swing.filechooser.FileFilter()
public boolean accept(File f)
return f.isDirectory() || f.getName().toLowerCase().endsWith(".xml");
public String getDescription() { return "XML files"; }
int r = chooser.showOpenDialog(this);
if (r != JFileChooser.APPROVE_OPTION) return;
File f = chooser.getSelectedFile();
try
if (builder == null)
factory = DocumentBuilderFactory.newInstance();
builder = factory.newDocumentBuilder();
doc = builder.parse(f);
catch (IOException e)
JOptionPane.showMessageDialog(this, e);
catch (ParserConfigurationException e)
JOptionPane.showMessageDialog(this, e);
catch (SAXException e)
JOptionPane.showMessageDialog(this, e);
public String get()
Element root = doc.getDocumentElement();
NodeList children = root.getChildNodes();
for (int i = 0; i < children.getLength(); i++)
Node child = children.item(i);
if (child instanceof Element)
Element childElement = (Element)child;
String text = textNode.getData().trim();
break;//for 1st node only
return text;
} -
Hello,
I'm new in this forum.
I would know if it's possible to open TestStand from JAVA.
If yes, how ?
ThanksTestStand is built on ActiveX. So if you can call activex from Java then you can call TestStand.
My guess is that you need some sort of COM bridge for Java that will allow it to call ActiveX objects. Then you would create a TS engine and then use that engine handle to manipulate TestStand.
Here is a document on the object model for TestStand:
http://www.ni.com/white-paper/8301/en/
Hope this helps,
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~ -
The initial exception that caused the request to fail, was:
com.sap.tc.useragent.UserAgentServiceException: Syntax Error in number '$4' of User-Agent Number Element ID 'engineVersion'.
at com.sap.tc.useragent.ElementTypeNumber.createElement(ElementTypeNumber.java:34)
at com.sap.tc.useragent.UserAgentElement.createElement(UserAgentElement.java:34)
at com.sap.tc.useragent.UserAgentElement.copy(UserAgentElement.java:71)
at com.sap.tc.useragent.UserAgentTemplate.instantiate(UserAgentTemplate.java:45)
at com.sap.tc.useragent.detection.RegExpDetector.detectUserAgent(RegExpDetector.java:33)
... 62 more
See full exception chain for details.
Failed to process request. Please contact your system administrator.
While processing the current request, an exception occured which could not be handled by the application or the framework.
If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
For further information about the Web Dynpro error page, error analysis and a description of well-known error situations, see SAP note 1113811.
Correction Hints
Exception could be caused by the development component: com.sap.tc.useragent.interface
Note: The above hints are only a guess. They are automatically derived from the exception that occurred and therefore can't be guaranteed to address the original problem in all cases.
System Environment
Client
Web Dynpro Client Type AJAX Client
User agent Mozilla/5.0 (Android; Mobile; rv:24.0) Gecko/24.0 Firefox/24.0
Client Type ff
Client Type Profile nn7
ActiveX disabled
Java Applets enabled
Accessibility mode disabled
Inline CSS n/a
Validate by rendering true
Server
Web Dynpro Runtime vendor: 'sap.com', name: 'tc/wd/webdynpro', scV: 'sap.com', scN: 'WD-RUNTIME', location: 'SAP AG', counter: '7.3005.20130111125833.0000', R: '7.30', SP: '5', PL: '20', change number: '255333', codeline: NW730CORE_05_REL
J2EE Engine 7.30.3710.270166.20130816104554
System ID (SID) FP1
Server Node ID |13769650|137696|Server 00 01_137696|ciFP1/10.72.16.58|SERVER|RUNNING
Java VM SAP Java Server VM, version:6.1.038 19.1-b02, vendor: SAP AG
Operating system Linux, version: 2.6.32-220.el6.x86_64, architecture: amd64
Application
Java EE Application (deployable object) sap.com/pb
Web Dynpro Application PageBuilder
Request URI /webdynpro/resources/sap.com/pb/PageBuilder
Version vendor: 'sap.com', name: 'pb', scV: 'sap.com', scN: 'EP-RUNTIME', location: 'SAP AG', counter: '7.3005.20111228115104.0000', R: '7.30', SP: '5', PL: '4', change number: '160458'
Session & Other
Session Locale en_GB
Session Timezone India Standard Time
Time of Failure Sun Oct 27 09:59:27 IST 2013 (Java Time: 1382848167814)
Session User ClientUser(id=USER.PRIVATE_DATASOURCE.un:CC172020, name=CC172020)
Http Session Id 978BAO1ZCsh8JZ7REyIA575jsir4QQGyG9IA_SAP
Client Window Id WID1382848129974
Application Session Id CrXVdgZ0571vfwcUljh9Bw--Q4*zmQ0kblXVHMfCG18ZBg--
Web Dynpro Code Generation Infos
sap.com/pb
WD web module webdynpro/resources/sap.com/pb: SapDictionaryGenerationCore 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:24:28+0000, changelist=159000, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb: SapDictionaryGenerationTemplates 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:24:57+0000, changelist=159000, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb: SapGenerationFrameworkCore 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:14:41+0000,
WD web module webdynpro/resources/sap.com/pb: SapMetamodelCommon 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:17:37+0000, changelist=159372, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb: SapMetamodelCore 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:15:03+0000, changelist=159372, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb: SapMetamodelDictionary 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:20:22+0000, changelist=159002, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb: SapMetamodelWebDynpro 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:25:40+0000, changelist=159462, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb: SapWebDynproGenerationCore 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:37:46+0000, changelist=159461, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb: SapWebDynproGenerationTemplates 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:37:55+0000, changelist=159461, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb: SapWebDynproRuntimeGen 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:35:55+0000, changelist=159464, host=pwdfm257, is-central=true)
sap.com/pb_api
WD (release=NW730CORE_05_REL, buildtime=2011-12-28T16:24:57+0000, changelist=159000, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapGenerationFrameworkCore 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:14:41+0000, changelist=159048, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapIdeWebDynproCheckLayer 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:37:31+0000, changelist=159461, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapMetamodelCommon 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:17:37+0000, changelist=159372, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapMetamodelCore 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:15:03+0000, changelist=159372, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapMetamodelDictionary 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:20:22+0000, changelist=159002, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapMetamodelWebDynpro 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:25:40+0000, changelist=159462, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapWebDynproGenerationCore 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:37:46+0000, changelist=159461, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapWebDynproGenerationTemplates 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:37:55+0000, changelist=159461, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/pb_api: SapWebDynproRuntimeGen 7.3005.20111228114942.0000 (release=NW730CORE_05_REL, buildtime=2011-12-28T16:35:55+0000, changelist=159464, host=pwdfm257, is-central=true)
sap.com/tc~wd~api
WD web module webdynpro/resources/sap.com/tc~wd~api: SapDictionaryGenerationCore 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:27:04+0000, changelist=159000, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapDictionaryGenerationTemplates 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:27:18+0000, changelist=159000, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapGenerationFrameworkCore 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:05:47+0000, changelist=159048, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapIdeWebDynproCheckLayer 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:39:20+0000, changelist=180142, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapMetamodelCommon 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:10:50+0000, changelist=159372, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapMetamodelCore 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:07:26+0000, changelist=159372, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapMetamodelDictionary 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:22:41+0000, changelist=210375, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapMetamodelWebDynpro 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:27:36+0000, changelist=159462, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapWebDynproGenerationCore 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:39:36+0000, changelist=180142, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapWebDynproGenerationTemplates 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:39:43+0000, changelist=180142, host=pwdfm257, is-central=true)
WD web module webdynpro/resources/sap.com/tc~wd~api: SapWebDynproRuntimeGen 7.3005.20130109144853.0000 (release=NW730CORE_05_REL, buildtime=2013-01-11T17:37:00+0000, changelist=223591, host=pwdfm257, is-central=true)Oh man it looks like a problem with the web server.
Its an error that happens on SAP, even my dad reported an error like this to me but i wasn't able to solve it.
What i find is that its an error with browser incompatibility,
Check this http://scn.sap.com/message/10338540
Maybe you are looking for
-
SMARTFORMS - Adicionar linha no Smart em tempo de execução
Bom dia Pessoal. Desenvolvi um Fomulário no Smartforms para Nota QM - RNC Fornecedor, onde pego determinado número de nota, e através desse número copio as informações das tabelas em uma estrutura de dados no qual criei. Tudo estava tranquilo, até qu
-
Adding subtitles in Premiere Elements 13
How do I add subtitles/closed captioning (for the hard of hearing) into my video using Premiere Elements 13?
-
Hi Gurus, Can any one please tell me the complete procedure for configuring output type. Requiremnt is I have to configure a o/p type for Order Confirmation & Invoice. regards, Ajoy
-
How to debug module pool program
Hi everybody, How to debug module pool program ,please send any material for module pool programming . Thanks & Regards, Siddivinesh.Jogu [email protected]
-
HR Implementation - Clarification on Org. Unit & Personnel Subarea
Hello Experts, We are implemenating OM in which Company is distribute into Plants(PA),which is further Diveded into Department,which is further divided into Sections,which is furter divided into Gang no. Company -> Plants -> Department ->Sections ->G