Issue running java program as perforce custom tool - perforce

I am trying to run one simple main java program with the help of perforce custom tools , but its giving me below error.
Could not create java virtual machine
Below are my configuration
Application : "C:\Java\jdk1.7.0_67\bin\java.exe"
Argument : "-cp C:\Java\jdk1.7.0_67\bin com.test.mapNullInput"
Start In :C:\Java\jdk1.7.0_67\bin
Run in terminal window is checked
_JAVA_OPTION is also set in system variable.
Any idea why ?

Related

what is it wrong? about jar file in linux running

0
I am using Java 11
when I running the source code in intelligence it was working very well but when I packed jar flie after that I running the jar file it show the error
like
"Java.lang.classnamefoundexception: org.apache.hive.jdbc.HiveDriver"
when I running the jar I use this command
"Java-jar test.jar"
the part of source code is "Class.forName("org.apache.hive.jdbc.HiveDriver")
I don't understand I run in local(intellij) is good work
but I used in Linux env it show above the error
if know the why is wrong please give me a hand
I want to add up image I can't do it because of my company policy... thanks
I searched all the site

Cocoa = How to run script in background without launching terminal in C

In my Cocoa Application, I am running a script by using c functions like setenv() and popen(). It executes the script perfectly. But the issue is, At runtime, popen() opens the Terminal app and after the script is executed, It closes the Terminal app automatically. I want to execute the script without opening the Terminal app.
I found a solution to use NSAppleScript. But This class is available only in Foundation, but not available in Core Foundation. I want the same feature to be written in C. How to achieve this.
Please advice.
Use NSTask to execute the script. This allows you to have it run in background while still being able to specify environment variables, monitor output, etc.

How to make webDriver testsuite created in windows machine to run in a linux box

I have got selenium WebDriver testsuite done using TestNg framework. I have used selenium webDriver 2.44.0 & FF32.
Now my build team wants my test to run in their demo box which is linux machine. 10..*.248 box
What i have done till now. I am not using any other tools like jenkis, maven etc.
Created java project 'myproject' testsuite in ecplise luna using
TestNg frame in my windows machine
Created a runnable Jar for myproject( myproject-version-1.0.1.jar)
Placed the runnable jar in 248 box using winSCP in a folder /home/project/
In 248 machine FF37 is available. So i upgraded my script with selenium 2.45.0 . It runs fine in my windows machine with FF32 version also.
Now using putty i logged into 248 machine and reached the folder /home/project/ where my runnable jar is placed.
I executed the shell command java -jar myproject-version-1.0.1.jar
Console shows the following exception:
[TestNG] Running:
Command line suite
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
Error: no display specified
I know i have not done correctly. I read few links posted here about about setting display in linux machine , using Xvfb – the X Virtual FrameBuffer.
Webdriver Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
I think the person who posted the question in above link had done the similar settings. !
Can somebody please help me with this as i am not able to understand :( Step by step process so that i can run my script in build team's machine.
I am very new to this field and doing all this for the first time. I read someting about headless GUI etc. I am not able to understand.
Would really appreciate if you could help me understand the steps involved.
You have done pretty much the right things as specified in the question
One thing that I came to observer that you have not specified complete URL in the get method. This might cause you some trouble. So first edit
driver.get("docs.seleniumhq.org/");
to
driver.get("http://docs.seleniumhq.org/");
If the code still doesn't works. Then try bundling latest selenium-java.jar and selenium-standalone.jar
But from the error it also seems that may be port 7055 is not free. (but I think you already checked that.)
So the problem gets a little bit confined to the selenium jars which are often incompatible if they are of different versions.

Installing JavaComm API on Ubuntu

I know this question has been asked several times around the internet, but I have spent about a week trying to solve this problem with little luck.
I am trying to install JavaCommAPI (an archived Java package to allow communication with rs232) on a remote linux Ubuntu 11.0, 32-bit server in order to deploy a web project which I have developed on a local apache server on my windows PC.
The thing that puzzles me is, I am able to get the .war web project to deploy on a local apache server on a separate 32-bit LinuxMint16 PC by correctly placing the javax.comm.properties, comm.jar, and libSerialParallel.so files in their respective places.
I use System.getProperty("java.library.path"); in order to find the correct library path in order to install correct files.
On my LinuxMint16:
javax.comm.properties -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib
comm.jar -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext
libSerialParallel.so -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386
....works!
On my remote Ubuntu server I did the exact same for its reported library path
(for example: /usr/local/jdk/jdk1.7.0_45/jre/lib/javax.comm.properties ;
/usr/local/jdk/jdk1.7.0_45/jre/lib/ext/comm.jar ;
/usr/local/jdk/jdk1.7.0_45/jre/lib/i386/libSerialParallel.so)
...fails =(
Things of note: I added the needed apache jars and comm.jar to my libraries in Eclipse using the BuildPath wizard (right click on project --> Build Path-->add external jars) which points to local files on my PC which I obviously cannot use for a remote server which I am only accessing through command line. May this is affecting it somehow?
I tried to get error output (System.err) from the Java Console printed to a separate file for my remote server as that feedback was very helpful in getting all the files sorted on my LinuxMint PC.
PrintStream ps = new PrintStream(pathName);
System.setOut(ps);
System.setErr(ps);
Which again, is oddly working beautifully to print the stream to a local .txt file on my LinuxMintPC but not to the one I designate on my remote ubuntu server.
I am really at a wits end here!! Am I mixing and matching appropriate versions of Systems prohibiting things to run smoothly? I am not sure how to proceed from here, if anyone has any insights I would die of happiness. Thanks
I needed to install OPEN JDK7 on my ubuntu, put files in appropriate library paths (as described above) and now it works.

What's the difference between an application launcher and type in an application name and run it from teriminal?

I have a QT application. When I use my created application launcher to start it, it doesn't work.
However, if I go to terminal and run the application from there, it works.
I'm wondering what their differences are.
Thanks.
Maybe your application launcher doesn't contain the right command and environment?
How is your launcher trying to start the program? Are any errors being reported?
It could be that the current directory is not set as expected. Or the command line parameters being sent aren't formatted correctly. Hard to say without seeing some code or an error message.

Resources