cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to add Date Tag into the content through java program?

usamal
1-Visitor

How to add Date Tag into the content through java program?

Hi all,

I need to add additional Party Tag into the content through a java program. But first of all I am not able to get window controller for the editor. I tried this code..

Runtime.getRuntime().exec("C:/Program Files (x86)/PTC/Arbortext Editor/bin/x86/editor.exe"+" "+"C:/JWBIntegration/JWBIntegeration/resource/testdata/Ia53cfdb05f8e11e49822a9299f05e77f.xml");

  LOG.info("Arbortext Loaded");

  Thread.sleep(30000);

  Window windowHandler = Application.getActiveWindow();

  LOG.info(windowHandler);

windowHandler.close();

As per code the editor should be closed. But the program terminated with below error

java.lang.UnsatisfiedLinkError: com.arbortext.epic.Application._GetActiveWindow()J

  at com.arbortext.epic.Application._GetActiveWindow(Native Method)

  at com.arbortext.epic.Application.access$700(Application.java:38)

  at com.arbortext.epic.Application$8.call(Application.java:500)

  at com.arbortext.epic.Application$8.call(Application.java:498)

  at com.arbortext.epic.AOMAccessController.execute(AOMAccessController.java:150)

  at com.arbortext.epic.Application.getActiveWindow(Application.java:511)

  at com.thomson.integration.content.AdditionalPartiesUpdateTest.testMetaData(AdditionalPartiesUpdateTest.java:42)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

  at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

  at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

  at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

  at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)

  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)

  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)

  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)

  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)

  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)

  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)

  at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

  at org.junit.runners.ParentRunner.run(ParentRunner.java:363)

  at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

  at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

I am getting stuck here. Not able to get window handler and could not able go further for addition of AP tag. Below Image is screenshot of my arbortext editor. In Lowermost row There is a tag named as AP followed by K and TC. I just need to put this tag into my content through java code. How to do this ?Capture.PNG

0 REPLIES 0
Announcements

Top Tags