Could not dind main class: XXXXX .the program will exit - double

MM hey ^_^
i was following this post HERE and when opening .bat file an error says :
could not dind main class: net.minecraft.LauncherFrame.the program will exit.
any suggestions ??

You should probably paste the actual .bat file you used, but I believe that method no longer works with starting the minecraft launcher executable.

Related

IDLE Error: Opens my .py file instead of the .txt data file

I'm a Python/programming novice and this is probably an novice mistake, but I've scoured the internet for answers and have found none! I'm learning on a Rosalind module that's about opening data files. http://rosalind.info/problems/ini5/ I'm pretty sure I understand everything clearly, so I'm frustrated about my inability to do this simple task.
I'm using Python 3.6.2 and IDLE. The assignment is to simply open a .txt file and read a few lines.
I downloaded the .txt file to my working directory. Then, I opened up IDLE Shell and made sure I was in the right working directory (using ls & cd). I then opened a new IDLE .py file and wrote a script:
f = open('filename.txt', 'r')
f.readlines()[2]
I saved the script as p5.py. Then, I tried to run the script by calling F5. In the Shell, I got this message:
================ RESTART: /Users/liv/Desktop/Rosalind/p5.py =================
Is that an error? I think it's just a message from IDLE that IDLE has opened p5.py. Therein lies my problem, because now I have the wrong file open.
I started realizing that when I used the Shell and called it to print, and it came back with an empty string.
What am I doing wrong?? How do I get IDLE to open the filename.txt file? ...not the .py file.
The RESTART line means that IDLE has sent p5.py to Python to be run, which is exactly what you want and what you asked. Python should have then opened the text file, read it, retrieved the 3rd line, and stopped. Since p5.py has no output statements and does not raise any exceptions, you will not see anything. If you change the 2nd line to
print('line is ', f.readlines()[2])
then you should see something.

how to turn off the gecko driver (0.18v) logs in selenium 3.5.3

.
Here are these logs that are continuously coming till the end line of code and its very irritating. i need help to turn off these logs
this is an issue of selenium 3.01 and above. I have read it from this link:
You can use LoggingPreferences class and enable the properties. Try this answer it may helps you:
Create a windows batch file with below commands and provide that batch file as a parameter while setting the gecko driver property. Please see the below code.
Batch File as gecko.bat:
#ECHO OFF
C:\Selenium\****\geckodriver.exe --log fatal %* > NUL 2>&1
Set Gecko driver system property in the script before initializing the Firefox driver. Please see below
System.setProperty("webdriver.gecko.driver","C:/Selenium/***/gecko.bat");
WebDriver driver = new FirefoxDriver();
In the above code C:\Selenium\****\geckodriver.exe is the path of the geckodriver.exe in your PC and C:/Selenium/***/gecko.bat is the path of the batch you created and saved on your PC.
This will work for sure. All the best.

IBM RFT command line execution -datastore -playback parameter

I need to start my RFT scripts with a .bat script. I tried this with:
"%IBM_RATIONAL_RFT_INSTALL_DIR%\rational_ft.exe" -datastore "C:\project" -playback "test"
In the .bat file. With a test project in C:\project and a test script named test.java.
When I start the batch file, RFT opens a playback window and is looking for the script. But I always receive a error:
[Rational.Test.Ft.Application.ScriptPlaybackException: Could not get type for [test].
I found out that this must be a problem with the path of the test script.
But I still don't know what is going on, the path is correct and I tried everything without a positive result. RFT playback starts, but still cant find this script.
I hope anybody can help me. Thanks in advance.
Using the command you tried to start RFT I get the same error. I don't know what the rational_ft.exe is for, but it works when you don't call this but the java.exe with the class com.rational.test.ft.rational_ft:
"%IBM_RATIONAL_RFT_ECLIPSE_DIR%\jdk\jre\bin\java" -classpath "%IBM_RATIONAL_RFT_INSTALL_DIR%\rational_ft.jar" com.rational.test.ft.rational_ft -datastore C:\project -playback Test
See this IBM developerWorks article for more information.

how to run a cmd file from matlab

I am trying to run a cmd file from MATLAB but unable to execute it. Can anybody see nay problem in the below code?
this is what I have inside my cmd file:
echo on
>test.log 2>&1 (
C:/testProj/Make/makeit.cmd param1
)
And this is the MATLAB code:
Out = 'C:/testProj/test.cmd';
system(Out);
But this actually does not run the cmd file.
Well for somereason it would not run if i would give the complete path of the cmd in bat file. so I had a cd command to change the directory and then run. now it runs fine, Thanks all appreciate your help!
What about using eval, like this:
eval(['!test.cmd']);
I have succesfully used this to run .bat files (and this output of the .bat script showed in my matlab command line). I also found this dos command, but I am not sure if it works allright:
You can just type the following strings to get things down:
!(c:/testProj/test.cmd)
This is actually no different from
system('c:/testProj/test.cmd')
I think you should check if the path is wrong. As to your code in the cmd file, that's beyond my ability to help.

Calling a command line program

I have a executable that when double clicked opens in a command line window.
Now there is a input file (i.e named "sphere_15000.inp") in the same directory where the executable apame_win64.exe is located. So we can inter the file name in the command line.
The question is how this can be done from mathematica front end? With the RunThrough command I tried to do it with no avail.
RunThrough["Executable Location", "sphere_15000"]
Do I need to put this file location in my Windows 7 environment path variable? Hope for some suggestion in this regard.
UPDATE
Found a solution to my problem.
First set the Mathematica directory to the folder where the executable is located.
path="C:\Users\FlowCrusher\Desktop\CUSP solver\Apame_build_2011_01_09\solver";
SetDirectory[path];
Then use the following style of input.
Run["\"\"apame_win64.exe\" \"input\"\""]
Here "apame_win64.exe" is the executable one want to run and "input" is the input file for the executable. This solves the problem. But a new item in the wishlist.
Is there a way to hide the console window in the background?
Here is how it looks on my screen.
As Chris suggested if we use minimized console in the Run command we get a minimized window but the program does not execute.
I hope that a solution exists.
BR
Yes, you might put the folder of you executable into the Path variable, or provide the full path name.
However, RunThrough seems to have been superseeded (on Windows) by
Import["!command ","Text"], which will execute command and read the comaand line output into Matheamtica as a string.
E.g.:
Export["testit.txt", "bla", "Text"];
Import["!dir" <> " testit* > dir.log", "Text"];
FilePrint["dir.log"]
--
Otherwise, I also had good results in the past using NETLink (not sure if WScript.shell
still works on Windows7/8 or if one should use something else).
Emulating Run (RunThrough is not really needed I think):
Run2[cmd_String] := Module[{shell},
Switch[$OperatingSystem,
"Windows",
Needs["NETLink`"];
shell = NETLink`CreateCOMObject["WScript.shell"];
shell # run[cmd,0,True],
"Unix",
Run # cmd,
"MacOSX",
Run # cmd ] ];
Can you run your application with input from a basic command window instead of the application console? This might be the form of command you would need:
apame_win64 -input sphere_15000.inp
or simply
apame_win64 sphere_15000.inp
You can probably check the available switches by running apame_win64 -help
A multi-part command can be run from Mathematica, e.g.
Run["type c:\\temp\\test.txt"]
Alternatively, also returning output to the Mathematica session:
ReadList["!type c:\\temp\\test.txt", String]
I landed here wanting to run abaqus command line on windows.
The solutions provided here worked out for me (Windows 7, Mathematica 9):
SetDirectory#path;
Run["start /min abaqus job=" <> fileName <> " interactive ask_delete=OFF >> log.txt"]
(Here the abaqus option ask_delete=OFF overwrites an existing simulation results and the >> redirects all the output to a file)
I think, minimizing the window did not run in your case since the executable throws open that window. In that case, this might be of some help