LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-06-2017, 03:35 AM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 523

Rep: Reputation: 37
using netbeans to compile jar file


I'm trying to install webcamstudio on fedora 23 and I've been told I need to use netbeans ide to complie the jar file needed to run the program.
I installed netbeans by running jdk-8u131-nb-8_2-linux-x64.sh from oracle but I don't know how one uses netbeans to do this, I'm stuck. I downloaded the latest webcamstudio source files from here: http://bazaar.launchpad.net/~webcams...io/trunk/files
and I've gone through the webcamstudio install steps in the README up to <Step 11> where is says: "Finally navigate where WebcamStudio.jar is". Problem is I have no WebcamStudio.jar file on my machine and I've been told this is where netbeans comes in, netbeans can create this jar file. I've created a project in netbeans called webcamstudio.install but not sure where to go from here and attached is a screenshot of what I'm looking at. The source files for webcamstudio have been downloaded onto my machine to /home/tony/packages/webcamstudio. I saw on google you right-click on the project, select properties and then Packaging but when I open Properties there's no 'packaging' there. I've posted on the netbeans forum days ago for help but it's a ghost town. Thanks for any advice.
Attached Thumbnails
Click image for larger version

Name:	netbeans.jpg
Views:	18
Size:	178.4 KB
ID:	25189  
 
Old 06-06-2017, 06:34 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,428

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Get jdk-8u131-linux-x64.rpm from http://www.oracle.com/technetwork/ja...s-2133151.html
cd Downloads/
# dnf install jdk-8u131-linux-x64.rpm

Setting up the new java : a)
# /sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_131/jre/bin/java 2000
b) # /sbin/alternatives --config java
... and select the new java.

webcamstudio, example :
https://freefr.dl.sourceforge.net/pr...73-r604.tar.xz

cd /home/[name]/tmp/
tar xvf webcamstudio_0.73-r604.tar.xz
cd webcamstudio-0.73/
ant

cd dist/
java -jar WebcamStudio.jar

-
 
Old 06-06-2017, 08:00 AM   #3
tonj
Member
 
Registered: Sep 2008
Posts: 523

Original Poster
Rep: Reputation: 37
thankyou for your response knudfl, I followed the steps you gave but when I got to the command ant I got:
Quote:
-bash: ant: command not found
I did a search on google about this but couldn't find anything that worked for me.
 
Old 06-06-2017, 08:12 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,604

Rep: Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604
you need to install ant I think. But I do not really understand what did you try and how "couldn't you find anything that worked"
 
Old 06-06-2017, 08:52 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,428

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Simple :

# dnf install ant

Fedora 23 package list http://dl.fedoraproject.org/pub/fedo...4/os/Packages/

You can also use # dnf search ant
... but there are 63 packages ant* !
http://dl.fedoraproject.org/pub/fedo...os/Packages/a/


-

Last edited by knudfl; 06-06-2017 at 08:56 AM.
 
Old 06-06-2017, 10:39 AM   #6
tonj
Member
 
Registered: Sep 2008
Posts: 523

Original Poster
Rep: Reputation: 37
yeah thanks, installing ant did that step but running ant gives this error:
Quote:
BUILD FAILED
/home/packages/webcamstudio-0.73/nbproject/build-impl.xml:1206: Javadoc returned 1
I first tried using jdk-8u131-linux-x64.rpm like you said and when that failed I tried jdk-8u131-nb-8_2-linux-x64.sh (the one with netbeans bundled in) but that fails too with the same error. I'm searching on google now trying to get past this. Attached is the console readout from running ant

edit: there is a folder called /dist and there is a jar file in it called WebcamStudio.jar but running the command gives:
Quote:
# java -jar WebcamStudio.jar
-bash: java: command not found
ps: your input is appreciated on this thread.
Attached Files
File Type: txt ant.txt (82.3 KB, 8 views)

Last edited by tonj; 06-06-2017 at 10:45 AM.
 
Old 06-06-2017, 01:29 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,428

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
'webcamstudio' actually builds OK with java-1.8.0-openjdk, and jdk-8u131.
Unless it's Fedora 23 : javadoc fails. `The WebcamStudio.jarī is built.

But no OS I have tested will run version 0.73 or the "bzr branch".
( $ bzr branch lp:webcamstudio ).

The 0.73 jar was tested with PCLinuxOS 2017, Fedora23, The Fedora 18-19 based CentOS 7:
The splash window opens for a second, and disappears again.


The good news : Version 0.61 opens the GUI OK.
I plugged out the webcamstudio folder from "webcamstudio_0.61_all.deb"
→ → webcamstudio-0.61.tar.gz , with WebcamStudio.jar and the libraries.jar
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Get java: # dnf install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64


P.S. : Don't know how you can fail with the Oracle jdk-8u131-linux-x64.rpm ...
All the suggested commands are working OK here, Fedora 23.

-

Last edited by knudfl; 06-06-2017 at 01:35 PM.
 
Old 06-10-2017, 05:01 AM   #8
tonj
Member
 
Registered: Sep 2008
Posts: 523

Original Poster
Rep: Reputation: 37
thankyou knudfl I got webcamstudio_0.61 working - once - from a fresh install and then I closed ws down to try again but ever since then it crashes all the time:
Quote:
$ java -jar WebcamStudio.jar
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sun/jna/Library
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at webcamstudio.exporter.vloopback.VideoDevice.openDevice(VideoDevice.java:44)
at webcamstudio.exporter.vloopback.VideoDevice.loadInfo(VideoDevice.java:38)
at webcamstudio.exporter.vloopback.VideoDevice.<init>(VideoDevice.java:34)
at webcamstudio.exporter.vloopback.VideoDevice.getDevices(VideoDevice.java:145)
at webcamstudio.exporter.vloopback.VideoDevice.getInputDevices(VideoDevice.java:104)
at webcamstudio.components.OutputPanel.<init>(OutputPanel.java:59)
at webcamstudio.WebcamStudio.<init>(WebcamStudio.java:56)
at webcamstudio.WebcamStudio$11.run(WebcamStudio.java:606)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java: 80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.Library
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 34 more
I tried deleting and untaring webcamstudio_0.61 but no difference, I also tried dnf reinstall jdk-8u131-linux-x64.rpm but that made no difference. Why would it crash like this after only one try?
 
Old 06-10-2017, 06:37 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,428

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Ref. #8.

See post #7 : # dnf install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64

? May work ? (I had no issues opening the 0.61 GUI multiple times.)
 
  


Reply

Tags
jdk8, webcamstudio


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message "Jar file 'mail.jar' was not found in the extended library directory" AussieAndrew Linux - Newbie 1 07-17-2013 01:40 PM
[SOLVED] Gotta weird file showing up on a .jar file while loading.... EODSteven Linux - Newbie 6 10-03-2012 10:49 AM
Start jar file from java without being in class path at compile time nazzouri Linux - Newbie 0 02-04-2010 10:47 AM
Netbeans compile and run, but I can't do it from the console... chief_officer Programming 2 05-22-2006 01:41 AM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration