Unable to compile swf for GrindPlayer videoplayer - java

I am stuck with code of GrindPlayer. I am tring to build it on my computer using the directions given on link:
https://github.com/kutu/GrindPlayer
But it is not forming swf file in build folder. I have fixed version in flex-config as well. But still swf is not generating.
Rightnow it shows a error screen for few seconds on running Btach file grind_player
: cannot find Java Runtime Environment.
Even though I already have jre in my system.
Kindly suggest!!

you need to implement the environment variable JAVA_HOME, with the value of the path of Java jdk, in my case C:\Java\jdk1.6.0_30.

Related

opencv3 videoCapture (windows) doesn't work

I've a problem with openCV 3 java wrapper.
When i use videocapture, camera.grab() always return false.
I see several subjects on internet about this problem. I succeeded to run opencv 2.4 but not with version 3.
My environnement :
windows 10 (64b)
java 8u51 (32b)
eclipse mars (32b)
So, I test these methods.
Env :
Set windows path : D:\Programs\opencv3x\build\x86\vc12\bin
Add opencv_ffmpeg to D:\Programs\opencv3x\build\x86\vc12\bin (in opencv 3, this lib is already in with the good name : opencv_ffmpeg300.dll).
Dev env :
In eclipse project :
add opencv-300.jar
set the native lib to D:/Programs/opencv3x/build/java/x86
With this configuration, I can use opencv 3 without problem...but i can't decode video file!
Does anyone have a solution on this? Thx.
https://books.google.co.uk/books?id=LFtICgAAQBAJ&pg=PA41
It might also be the case where the opencv_ffmpeg300 dynamic link
library goes missing from your path environmental variable. Try
copying it to your project home folder
Copy opencv_ffmpeg300.dll direct to your Eclipse project's home folder ("or add it to your path variable").

Compiling standalone selenium: Failed to load Main-Class manifest attribute from

I'm a total Java noob so please understand =) I need a quick advice on how to fix the issue.
I cloned the official selenium git repo, changed the code a bit (need to dump the page into some specified dirs), and tried to rebuilt it:
./go //java/server/src/org/openqa/selenium/remote/server:server:uber //java/client/src/org/openqa/selenium:client-combined:uber
It was successful but when I tried to execute it I got this:
$ java -jar build/java/server/src/org/openqa/selenium/remote/server/server-standalone.jar
Failed to load Main-Class manifest attribute from
build/java/server/src/org/openqa/selenium/remote/server/server-standalone.jar
Tried to check classpath, CLASS_PATH and CLASSPATH env variables (as a friend of mine suggested) - I simply don't have any.
At the same time, the pre-compiled standalone server from the official downloads works out of the box.
The official docs didn't help. There's nothing about it there.
So - I need a quick advice how to compile it? Thanks.
P.S. JDK 8 (latest), Mac OS 10.7
P.P.S. That friend of mine tried to build it by himself and he was lucky - he got a new build/dist folder where the target big file was. But in my case, the build folder is created, but there's not 'dist' folder in it.
Finally found the answer: I should have built it like that:
./go clean release
it's really strange that all the docs state I need to use these long /bla/bla/:uber things to get a whole single 'uber' server.

Using JavaTreeProfiler

I want to use javaTreeeProfiler to profile my simple java program. I want to use it with 32-bit linux. I downloaded it from http://sourceforge.net/projects/jcoverage/
The readme file says that "To run the profiler copy the libjprofiler.so to a location that can be found by the dynamic loader." Can anybody tell me what does it mean ? where should I copy that libjrofiler.so file ? I tried to build it. It showed build successfully message but i did not see any call tree. I tried to run it with my simple application but that also did not work. It says :
Error occurred during initialization of VM
[java] Could not find agent library jprofiler on the library path, with error: libjprofiler.so: cannot open shared object file: No such file or directory
[java] Java Result: 1
Could anybody pl guide me how do I run simple java program with this profiler ?
Thanks.
JTreeProfiler is quite old project. Now there is jvisualvm included in JDK and it has excellent profiler built in.

Sikuli UnsatisfiedLinkError when using sikuli-script.jar

I'm on Windows 7 32bit, Java JRE6 31 installed and using Sikuli X 1.0rc3. I want to launch a test with sikuli-script.jar like this:
java -jar c:\sikuli\sikuli-script.jar test.sikuli
All I get is this error message:
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError:C:\sikuli\libs\VisionProxy.dll: Can't find dependent libraries
I have set all the environment variables needed, so my PATH looks like this:
PATH=...;C:\sikuli\libs;C:\Program Files\Java\jre6\bin
SIKULI_HOME=C:\sikuli
I can use the IDE and launch the tests there etc. But only if I use the Sikuli-IDE.exe the sikuli-ide.bat and sikuli-ide.jar don't work either. Always with the same error from above. So I think in the build process of the .exe file they added some magic, but I can't figure out what it is.
Does somebody have a similar problem? Or even a solution?
Update
As I wrote below, it works out of the box with my new computer. :D But maybe my solution can help someone.
Sikuli Team uses Launch4J to build the Sikuli-IDE.exe out of the sikuli-ide.jar. They use this config file. I modified it slightly and created a Sikuli-script.exe. It was pretty simple but I lost the config file unfortunately.
Hope I could help!
You must use a 32bit JRE version (I use jre-7u4-windows-i586.exe)
Download Sikuli IDE for Windows (I use "Sikuli X r930", portable version)
Unpack it and copy files to your project folder (I renamed it to "sikuli-ide", check image htt+p://i.stack.imgur.com/LSiQV.png)
Add sikuli-script.jar to the Referenced Libraries (Project > Properties > Java Build Path > Libraries, check image http://i.stack.imgur.com/N2SJ8.png)
Set PATH and SIKULI_HOME environment vars (Run > Run Configurations > Environment, check image http://i.stack.imgur.com/HboXk.png)
You're ready to go ;)
According to the docs
Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
What you need to do is use this command:
-Djava.library.path=pathToDLL
Which will add your DLL that is missing.

Java Path Error in Titanium

I have been trying to set up Titanium and Android for 3 days. Still I am stuck with an issue. I am getting this Java related error. I have seen the discussions and forum for this error. I followed all their trials. Still I am unable to make it work. Through command prompt test I can say like path is proper for Java. Even JAVA_HOME variable shows proper path.
I have tried the environmental variables by setting JAVA_HOME value to:
C:\PROGRA~1\Java\jdk1.7.0
and set PATH value to
C:\PROGRA~1\Java\jdk1.7.0\bin
I can run and compile a sample file Hello.java using command prompt, but still I get this error in Titanium IDE :
[ERROR] Required jarsigner not found<br>
[ERROR] Required javac not found<br>
[ERROR] Required java not found<br>
[ERROR] One or more required files not found - please check your JAVA_HOME environment variable
please help me guys...
Thanks in Advance.
GANESH M
I was able to fix this issue on Window 7 with these steps:
Left click to our “Computer” Icon and click “Properties” .
The window should appear with the Left Hand Side menu saying “Control Panel Home” , we will click the “Advanced System Settings”.
A popup window appears after that, and then we click the button ” Environment Variables “.
Another window appears and it is for Environment Variables, on the appear part of it, there is a list for System Variables . Let’s add variables or update our “path” variable if it is already existing.
Click ”New” to create a variable JAVA_HOME with your java path ej. C:\Java\jdk1.6.0_20
Edit your PATH variable and add at the begining %JAVA_HOME%; without "bin" because in builder.py the word bin is added.
allright, for all those who never managed to make it work even after trying everything you've read.
I'm running Win7 x64.
Here are the exact steps I've followed (plus something else I've discovered - step B):
A)
First of all, after installing titanium, the Titanium Home SDK didn't work (error: Could not locate a Titanium Mobile SDK at the given path). The fix for this was to download The "Titanium Mobile SDK 1.7" from inline link text and overwrite everithing in [C:\Users\YourUserName\AppData\Roaming\Titanium] with the folders from that archive (you can backup first if you like - I did it anyway, just in case), but this worked for me... the error for Titanium Home SDK was gone.
Regarding the Java SDK: I've downloaded the 1.6.x_xx version (the 64bit one in my case) - don't know if it would also work with the latest, but after 2 days of trials I'm kind of not in the mood for another un/install of any kind :). And don't worry where you install it, just don't user spaces in the environment variable path/JAVA_HOME.
Grabbed the zip version of android sdk (maybe it would have also worked with the installer, I've just grabbed the zip because I've read there may be problems with the installer - but i think those problems were just because of the incorect environment variable Path to Java). Anyway, zip or installer, in order to make the next step work (in order for titanium to recocnize the android sdk) you need to download/install theese packages (in the SDK Manager.exe of the android sdk) : a) The "Tools" section; b) Android 2.1 and Android 2.2 (api 7 & 8) - maybe just one of them is mandatory, but I just didn't have the patience to check which one after so much time spent fot getting everything to work; c) from the "Extras" section I've installed everything, although I've read that "Google USB" and "Android support" are enough. d) install every other package you want (you don't have to develop for 2.1 or 2.2 only, it's just that they are mandatory to have installed in order for titanium to aknowledge the sdk - if you ask me, it's a bug).
P.S. I've installed the android sdk in C:\android-sdk - a path with no spaces (ie. Program Files (x86))
in Titanium studio preferences, I've set Android SDK Home to C:\andoird-sdk
Set the environment variable: Right click "My Computer" then "Properties". In the new window, click "Advanced system settings" from the left. In the new window make sure you're in the "Advanced" tab and you should see a button labeled "Environment variables" at the bottom. Click it and in the new window there are 2 lists (User variables and System variables). You need to work with the System variables because in builder.py it checks for system vars, not user. So, in the System variables click "New" and for "Variable name" put JAVA_HOME, as for the "Variable value" put the path to your Java SDK instalation folder (WITHOUT bin ata the end) and make sure it's with no spaces, make sure it's old DOS Mode. Mine is C:\Progra~1\Java\jdk1.6.0_31. Click OK and now in the same list (System variables) look for the variable "Path" and edit it by adding %JAVA_HOME%; at the beginning (make sure you don't miss the semicolon). You should have it at the begining, in case there is another/different path for java in that string there, otherwise it shouldn't matter.
B)
NOW...
After following all the steps above, after creating my first android app, when I've tried to run it I got the followind errors:
Required jarsigner/javac/java not found
One or more required files not found - please check your JAVA_HOME environment variable
So... From the Titanium SDK (mine is at C:\Users\ MyUserName \AppData\Roaming\Titanium) I've opened mobilesdk\win32\2.0.1.GA2\android\builder.py
And went to the def set_java_commands(self) block (mine started at line 268).
I've replaced the string value ("Required jarsigner not found") in one of the errors there with home_jarsigner so now in titanium console, when trying to run the app, I got : C:\Progra~1\Java\jdk1.6.0_31\bin\bin so i've noticed that the os.path.join function adds bin TWICE to the path... HECK IF I KNOW WHY !
In order to fix this, I've changed the following lines by removing "bin" from the path concatenation :
~~~
line 274: home_jarsigner = os.path.join(os.environ["JAVA_HOME"], "bin", "jarsigner.exe")
line 275: home_javac = os.path.join(os.environ["JAVA_HOME"], "bin", "javac.exe")
line 276: home_java = os.path.join(os.environ["JAVA_HOME"], "bin", "java.exe")
~~~
Just removed "bin", from those lines and then everything was fine, my android app launched and i was finally SO SO HAPPY after TWO days of knocking my head against the wall.
Titanium on 64-bit Windows requires the 32-bit version of the Java SDK. Make sure the 32-bit path is set in your JAVA_HOME environment variable.

Categories