Properties File: javax.usb ?
Hi Guys,
I'm sure you've all heard this a million times, but I'm hung up on it. I'm trying to learn about javax.usb, and keep getting this exception:javax.usb.UsbException: Properties file javax.usb.properties not found.And I swear to God guys, it's there (i know i'm wrong though).
This is what I've added to my buildpath:
-javax-usb_1.0.1.zip
-javax-usb-ri_1.0.1.zip
-jsr80-1.0.1.jar
-jsr80_ri-1.0.1.jar
-javax-usb-tck_1.0.1.zip
Take a look for yourself: http://img.photobucket.com/albums/v335/shlumph/referencedLibraries.jpg
How come the compiler can't see that the javax.usb.properties file is there? What is the best way to fix this?
If it helps, here is my source code:
import java.io.UnsupportedEncodingException;
import java.util.*;
import javax.usb.*;
public class USBListener {
public static void main(String[] args) {
try{
UsbServices services = UsbHostManager.getUsbServices();
UsbHub root = services.getRootUsbHub();
listDevices(root);
} catch (Exception e) {
System.out.println(e);
public static void listDevices(UsbHub hub) throws UnsupportedEncodingException, UsbException {
List devices = hub.getAttachedUsbDevices();
Iterator iterator = devices.iterator();
while(iterator.hasNext()) {
UsbDevice device = (UsbDevice)iterator.next();
describe(device);
if(device.isUsbHub()) {
System.out.println("is hub");
public static void describe(UsbDevice device)
throws UnsupportedEncodingException, UsbException {
UsbDeviceDescriptor descriptor = device.getUsbDeviceDescriptor();
byte manufacturerCode = descriptor.iManufacturer();
System.out.println("Manufacturer index: " + manufacturerCode);
System.out.println("Manufacturer String: " + device.getString(manufacturerCode));
System.out.println("USB version: " + decodeBCD(descriptor.bcdUSB()));
System.out.println("Maximum control packet size: " + descriptor.bMaxPacketSize0());
public static String decodeBCD(short bcd) {
int upper = (0xFF00 & bcd) >> 8;
int middle = (0xF0 & bcd) >> 4;
int lower = 0x0F & bcd;
return upper + "." + middle + "." + lower;
}
Hi,
Probably you did not set properly your classpath. Read the following FAQ:
http://javax-usb.org/faq.html#get_properties_file
http://javax-usb.org/faq.html#what_is_properties_file
http://javax-usb.org/faq.html#linux_imp_jar_file
http://javax-usb.org/faq.html#still_doesnt_work
Note that for Windows: "This is a pre-alpha Windows implementation (it does not work, it needs a kernel driver)."
http://javax-usb.cvs.sourceforge.net/javax-usb/javax-usb-ri-windows/README?view=markup
Mimo
Similar Messages
-
Javax.usb.properties..where do I get it from?!
Hello,
I'm trying to make a lil application that would access a blood pressure monitor via usb..
I keep getting the javax.usb.properties file not found, like lots of people are, but..I can't even find that file so I can add it to the CLASSPATH!
I'm using linux..I downloaded the .jar file with the 'common implementation' and added it to the project..but it's not workign and I have no clue where to find that file..
I'm sorry, I'm sort of new to this whole thing..so the question is prolly stupid..
thanks,
LeenaTrial versions require no serial number. They run for 30 days without one.
Mylenium -
i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g
hi TimoHahn,
i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
Root cause of ServletException.
java.lang.NullPointerException
at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
at java.util.ResourceBundle.getString(ResourceBundle.java:334)
at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) -
How to configure Java Properties File location in WLW
How do we tell Workshop 7.0 where to look for Java properties files (loaded by
PropertyResouceBundle in code) ?
Thanks,
RayRay,
The build number indicates that you have not upgraded to Service Pack 2 of
version 7.0. I will strongly recommend you to do so. That will shield you
from the issues which were fixed in the 2 service packs.
Regards,
Anurag
"Ray Yan" <[email protected]> wrote in message
news:[email protected]...
>
Raj,
We are using WebLogic Workshop Build 7.0.1.0.0829.0 on Windows 2000.
We shut down the WebLogic Server on Solaris 2.6, log off, log back on,startWebLogic
in production nodebug mode, and re-run jwsCompile on the same source code.The
error does not occur anymore. Everything seems to be fine now.
Thanks,
Ray
"Raj Alagumalai" <[email protected]> wrote:
Hello Ray,
Can you let me know if you are using the GA version of WebLogic Workshop
or
if you have the latest Service Pack.
Thank You,
Raj Alagumalai
WebLogic Workshop Support
"Ray Yan" <[email protected]> wrote in message
news:[email protected]...
Anurag:
Thanks for your response!
By moving the property files to WEB-INF/classes from WEB-INF, we arealmost there.
But we have a follow up problem. We use a static initializer to loadthe
log4j
property file like this:
static {
try {
ClassLoader cl= (new Log()).getClass().getClassLoader();
InputStream is = cl.getResourceAsStream(logfile);
Properties props = new Properties();
props.load(is);
PropertyConfigurator.configure(props);
} catch (Exception e) {
e.printStackTrace();
When we run jwsCompile, we keep getting this:
Compiling: com/****/TestWS.jws
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[weblogic.management.Admin
may only be used on the Server ]
at weblogic.management.Admin.getInstance(Admin.java:104)
at
weblogic.security.internal.ServerPrincipalValidatorImpl.getSecret(ServerPrin
cipalValidatorImpl.java:79)
at
weblogic.security.internal.ServerPrincipalValidatorImpl.sign(ServerPrincipal
ValidatorImpl.java:59)
at
weblogic.security.service.PrivilegedActions$SignPrincipalAction.run(Privileg
edActions.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at
weblogic.security.service.SecurityServiceManager.createServerID(SecurityServ
iceManager.java:1826)
at
weblogic.security.service.SecurityServiceManager.getServerID(SecurityService
Manager.java:1839)
at
weblogic.security.service.SecurityServiceManager.sendASToWire(SecurityServic
eManager.java:538)
at
weblogic.security.service.SecurityServiceManager.getCurrentSubjectForWire(Se
curityServiceManager.java:1737)
at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:434)
at
weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:
88)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:255)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:230)
at
weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown
Source)
atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at weblogic.knex.bean.EJBGenerator$1.run(EJBGenerator.java:101)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)
atweblogic.knex.bean.EJBGenerator.lookupAdminHome(EJBGenerator.java:84)
atweblogic.knex.bean.EJBGenerator.ensureAdminHome(EJBGenerator.java:122)
at weblogic.knex.bean.EJBGenerator$6.run(EJBGenerator.java:660)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:821)
atweblogic.knex.bean.EJBGenerator.generateJar(EJBGenerator.java:482)
at
weblogic.knex.dispatcher.DispJar.generateJar(DispJar.java:401)
atweblogic.knex.dispatcher.DispCache.ensureDispUnit(DispCache.java:695)
atweblogic.knex.compiler.JwsCompile.compileJws(JwsCompile.java:872)
at
weblogic.knex.compiler.JwsCompile.compile(JwsCompile.java:619)
at weblogic.knex.compiler.JwsCompile.main(JwsCompile.java:109)
ejbc successful.
Generating EAR ...
The EAR was generated and we can even deploy it on Solaris. But whatdoes
the
AssertionError mean?
Thanks,
Ray
"Anurag Pareek" <[email protected]> wrote:
Ray,
ResourceBundle looks for the properties file in the current thread's
classpath.
Since a Workshop webservice's project is nothing but a webapp, the
properties files can be kept in the WEB-INF/classes directory, which
is part
of the webapp classpath.
You can also use
Thread.currentThread().getContextClassLoader().getResourceAsStream("MyProp
s
properties"); to get access to the properties file.
Thanks,
Anurag
"Ray Yan" <[email protected]> wrote in message
news:[email protected]...
How do we tell Workshop 7.0 where to look for Java properties files(loaded by
PropertyResouceBundle in code) ?
Thanks,
Ray -
Add few lines in jserv.properties file automatically
Hi All,
Generally we will be doing 11.5.10.2 "refresh" automatically.....
How can i automate the script to add this 3 lines in jserv,properties?
Basically add the following lines to the jserv.properties before any other classpath entry
wrapper.classpath=/u01/uat2/uat2comn/java/6003133.jar
wrapper.classpath=/u01/uat2/uat2comn/java/Bug6823675.jar
wrapper.classpath=/u01/uat2/uat2comn/java/bug5336153.25.42.jar
thanks a million....Hi Hussein,
Thanks for giving this information..
This is my jserv.properties file
ORIGINAL jserv.properties FILE
# PATH environment value passed to the JVM
# Syntax: wrapper.path=[path] (String)
# Default: "/bin:/usr/bin:/usr/local/bin" for Unix systems
# "c:\(windows-dir);c:\(windows-system-dir)" for Win32 systems
# Notes: if more than one line is supplied these will be concatenated using
# ":" or ";" (depending wether Unix or Win32) characters
# Under Win32 (windows-dir) and (windows-system-dir) will be
# automatically evaluated to match your system requirements
# CLASSPATH environment value passed to the JVM
# Syntax: wrapper.classpath=[path] (String)
# Default: NONE (Sun's JDK/JRE already have a default classpath)
# Note: if more than one line is supplied these will be concatenated using
# ":" or ";" (depending wether Unix or Win32) characters. JVM must be
# able to find JSDK and JServ classes and any utility classes used by
# your servlets.
# Note: the classes you want to be automatically reloaded upon modification
# MUST NOT be in this classpath or the classpath of the shell
# you start the Apache from.
# Custom classpath
# wrapper.classpath =
wrapper.classpath=/u01/clone/cloneora/web/Apache/Jserv/libexec/ApacheJServ.jar
wrapper.classpath=/u01/clone/cloneora/web/Apache/Jsdk/lib/jsdk.jar
# ----- iAS 1022 -----
wrapper.classpath=/u01/clone/cloneora/web/jsp/lib/ojsp.jar
wrapper.classpath=/u01/clone/cloneora/web/jsp/lib/ojsputil.jar
wrapper.classpath=/u01/clone/cloneora/web/lib/servlet.jar
wrapper.classpath=/u01/clone/clonecomn/java/ojdigsig.zip
wrapper.classpath=/u01/clone/clonecomn/java/sax2.zip
wrapper.classpath=/u01/clone/clonecomn/java/xmlparserv2-904.zip
wrapper.classpath=/u01/clone/clonecomn/java/xdoparser.zip
wrapper.classpath=/u01/clone/cloneora/web/sqlj/lib/translator.zip
wrapper.classpath=/u01/clone/clonecomn/java/jbojdbcpatch.zip
wrapper.classpath=/u01/clone/clonecomn/java/jdbc14.zip
wrapper.classpath=/u01/clone/clonecomn/java/nls_charset12.zip
wrapper.classpath=/u01/clone/clonecomn/java/apps.zip
wrapper.classpath=/u01/clone/clonecomn/java
wrapper.classpath=/u01/clone/clonecomn/java/cache.zip
wrapper.classpath=/u01/clone/clonecomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.jar
wrapper.classpath=/u01/clone/clonecomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar
wrapper.classpath=/u01/clone/clonecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar
wrapper.classpath=/u01/clone/clonecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar
wrapper.classpath=/u01/clone/cloneora/web/jlib/jssl-1_1.jar
wrapper.classpath=/u01/clone/cloneora/web/jlib/javax-ssl-1_1.jar
wrapper.classpath=/u01/clone/cloneora/web/rdbms/jlib/aqapi.jar
wrapper.classpath=/u01/clone/cloneora/8.0.6/forms60/java
wrapper.classpath=/u01/clone/cloneora/web/rdbms/jlib/jmscommon.jar
UPDATED FILE SHOULD BE LIKE THIS
# PATH environment value passed to the JVM
# Syntax: wrapper.path=[path] (String)
# Default: "/bin:/usr/bin:/usr/local/bin" for Unix systems
# "c:\(windows-dir);c:\(windows-system-dir)" for Win32 systems
# Notes: if more than one line is supplied these will be concatenated using
# ":" or ";" (depending wether Unix or Win32) characters
# Under Win32 (windows-dir) and (windows-system-dir) will be
# automatically evaluated to match your system requirements
# CLASSPATH environment value passed to the JVM
# Syntax: wrapper.classpath=[path] (String)
# Default: NONE (Sun's JDK/JRE already have a default classpath)
# Note: if more than one line is supplied these will be concatenated using
# ":" or ";" (depending wether Unix or Win32) characters. JVM must be
# able to find JSDK and JServ classes and any utility classes used by
# your servlets.
# Note: the classes you want to be automatically reloaded upon modification
# MUST NOT be in this classpath or the classpath of the shell
# you start the Apache from.
# Custom classpath
# wrapper.classpath =
wrapper.classpath=/u01/uat2/uat2comn/java/6003133.jar
wrapper.classpath=/u01/uat2/uat2comn/java/Bug6823675.jar
wrapper.classpath=/u01/uat2/uat2comn/java/bug5336153.25.42.jar
wrapper.classpath=/u01/clone/cloneora/web/Apache/Jserv/libexec/ApacheJServ.jar
wrapper.classpath=/u01/clone/cloneora/web/Apache/Jsdk/lib/jsdk.jar
# ----- iAS 1022 -----
wrapper.classpath=/u01/clone/cloneora/web/jsp/lib/ojsp.jar
wrapper.classpath=/u01/clone/cloneora/web/jsp/lib/ojsputil.jar
wrapper.classpath=/u01/clone/cloneora/web/lib/servlet.jar
wrapper.classpath=/u01/clone/clonecomn/java/ojdigsig.zip
wrapper.classpath=/u01/clone/clonecomn/java/sax2.zip
wrapper.classpath=/u01/clone/clonecomn/java/xmlparserv2-904.zip
wrapper.classpath=/u01/clone/clonecomn/java/xdoparser.zip
wrapper.classpath=/u01/clone/cloneora/web/sqlj/lib/translator.zip
wrapper.classpath=/u01/clone/clonecomn/java/jbojdbcpatch.zip
wrapper.classpath=/u01/clone/clonecomn/java/jdbc14.zip
wrapper.classpath=/u01/clone/clonecomn/java/nls_charset12.zip
wrapper.classpath=/u01/clone/clonecomn/java/apps.zip
wrapper.classpath=/u01/clone/clonecomn/java
wrapper.classpath=/u01/clone/clonecomn/java/cache.zip
wrapper.classpath=/u01/clone/clonecomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.jar
wrapper.classpath=/u01/clone/clonecomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar
wrapper.classpath=/u01/clone/clonecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar
wrapper.classpath=/u01/clone/clonecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar
wrapper.classpath=/u01/clone/cloneora/web/jlib/jssl-1_1.jar
wrapper.classpath=/u01/clone/cloneora/web/jlib/javax-ssl-1_1.jar
wrapper.classpath=/u01/clone/cloneora/web/rdbms/jlib/aqapi.jar
wrapper.classpath=/u01/clone/cloneora/8.0.6/forms60/java
wrapper.classpath=/u01/clone/cloneora/web/rdbms/jlib/jmscommon.jar
This bold line should be added to that place, how can i do automatically.please suggest me.
Thanks a million... -
Where is the swing.properties file?
In J2SDK 1.5 beta, where is the swing.properties file.
The file is supposed to be located in <Java Home>/lib/ but it is not there.
Thanks,I'm not sure about 1.5, but normally there isn't one. The defaults are just used unless there is one.
Look here
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/UIManager.html -
Hello
I'm planning to write an application to connect to a development board via USB connection.
After google-ing i ended up trying to install javax-usb.
Downloaded the 3 packages:
javax-usb_1.0.2
javax-usb-ri_1.0.2
javax-usb-ri-linux_1.0.2
javax-usb builds ok. I add the path to "/lib/jsr80.jar" to my CLASSPATH.
when I try to build the second one, javax-usb-ri_1.0.2, I get lots of errors:
clean:
[echo] Cleaning everything.
compile:
[echo] Compiling class files.
[javac] Compiling 50 source files to /home/iggy/Documents/javax-usb-ri/src
[javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/DefaultUsbInterfacePolicy.java:12: package javax.usb does not exist
[javac] import javax.usb.*;
[javac] ^
[javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/DefaultUsbInterfacePolicy.java:18: cannot find symbol
[javac] symbol: class UsbInterfacePolicy
[javac] public class DefaultUsbInterfacePolicy implements UsbInterfacePolicy
[javac] ^
[javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/DefaultUsbInterfacePolicy.java:37: cannot find symbol
[javac] symbol : class UsbInterface
[javac] location: class com.ibm.jusb.DefaultUsbInterfacePolicy
[javac] public boolean forceClaim(UsbInterface usbInterface) { return false; }
[javac] ^
[javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/UsbConfigurationDescriptorImp.java:12: package javax.usb does not exist
[javac] import javax.usb.UsbConfigurationDescriptor;
[javac] ^
[javac] /home/iggy/Documents/javax-usb-ri/src/com/ibm/jusb/UsbConfigurationDescriptorImp.java:13: package javax.usb.util does not exist
[javac] import javax.usb.util.UsbUtil;
[javac] ^
etc..
I guess it doesn't seem to find the javax.usb library.Or...???
the third does't build either...naturally.
So what am I doing wrong?I'm using Ubuntu 8.10.
Is there any other way to make buld I/O over USB (besides using JNI)?for jUSB on windows you should read the manual that came with it to enable the specific device as a JUSB device ( the appendixes i think ), it involves going into your device manager i think ( the instructions should say and be simple enough ), i don't like it because it defeats the purpose of being able to plug the device into any usb port and doing a search for it from there and then being able to communicate with it, it also prevents the original app. from communicating with it successfully through the port you configured the device for
by the way the device i used the java usb packages for is the vernier go temp. sensor =) (developing a program to display and record data from it while using it in my chemistry labs which would beat the hell out of standing, stirring, and measuring temp. with an alcohol thermometer to the second decimal place every 15 seconds for about 30 minutes for about 6 rounds with an avg. temp. rate change of about 1 deg. per 80 secs. =( )
Edited by: scphan on Mar 19, 2009 3:40 PM -
Error Installing javax.usb
Hello
I know that Javax.usb was not created by sun but I'm looking for a solution and it's my last chance.
I'm trying to install Javax.usb, the installation goes well for the API and the Common RI. Things are going wrong with the Linux RI.
I Have this message at compilation :
[moi@eeePC javax-usb-ri-linux]$ ant compile
Buildfile: build.xml
compile:
[echo] Compiling class files.
[echo] Compiling JNI library.
BUILD FAILED
/home/moi/Bureau/javax-usb/javax-usb-ri-linux/build.xml:114: Problem: failed to create taskor type javah
Cause: the class org.apache.tools.ant.taskdefs.optional.Javah was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/share/ant/lib
-/home/moi/.ant/lib
-a directory added on the command line with the -lib argument
Do not panic, this is a common problem.
The commonest cause is a missing JAR.
This is not a bug; it is a configuration problem
Total time: 1 secondI understand That this is an ANT configuration problem but after much googling I found the class that lacks with a complete Jar file.
I copied the Jar File and its uncompressed version every on the system
in /usr/share/ant/lib,/home/moi/.ant/lib and also in many directories. According to the error, it should have been enough but it is not.
Can someone help me please ?
System Information :
ANT : Apache Ant version 1.7.1 compiled on August 2 2008
Linux : Linux eeePC 2.6.27-desktop-0.rc8.2mnb #1 SMP Thu Oct 2 06:11:56 EDT 2008 i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GNU/LinuxDoes anyone have an Idea ?
-
Linux, Java and Javax.usb
Hello,
I've spent 3 days trying to install the javax.usb package on my linux with the classical package and I finally found the javax.usb RPMs. I installed them and every thing seemed fine until I tried to run a java program.
Now I'm unable to run any program.
Completion does not work anymore e.g. when I'm in a directory with a .class file, the completion is unable to find it.
That would not be a real problem but when I try to run a java program, I always end up with a ClassNotFoundException. Does anyone have a clue about what is happening to me.
System : Mandriva 2009.0
Linux Kernel 2.6Packages that begin with "java" are base packages.
Packages that begin with "javax" are extensions to
Java (hence the "x").
AWT was the first UI package in Java. Swing came
later and was added as an extension.
%aha, right. cheers -
Hi there, I am used to programming in java since some months but only with simple things. I need to communicate with a usb via my GUI. I found this websites for javax.usb, and also found the some tar files and zip files. http://sf.gds.tuwien.ac.at/j/ja/javax-usb/
Can somebody explain me how to implement this files and where will the files be stored in the system? I will greatlly appreciate if somebody can show me how the topology works and how many files i need to just get the data from usb into m system gui. I am looking for a common platform code if any out there.
thanks for the help...Hi there, I am used to programming in java since some
months but only with simple things. I need to
communicate with a usb via my GUI. I found this
websites for javax.usb, and also found the some tar
files and zip files.
http://sf.gds.tuwien.ac.at/j/ja/javax-usb/
Can somebody explain me how to implement this files
and where will the files be stored in the system? I
will greatlly appreciate if somebody can show me how
the topology works and how many files i need to just
get the data from usb into m system gui. I am looking
for a common platform code if any out there.
thanks for the help... -
No oidAdminClass property not found in servicename.properties file
Hi ,
I am new to forum. I got one exception in lione no 2 as follows, when i am trying to get the user information , as follows.
the code is like this.... Any help...
Tons of advance in advance...
1.ProviderContext pc = pReq.getProviderInstance().getProviderContext();
2.OidManager oidMgr = new OidManagr(pc);
The exception is as follows...
oracle.portal.provider.v2.ProviderException: No oidAdminClass property not found in servicename.properties file
08/04/17 18:43:03 at oracle.portal.utils.v2.ContainerException.fillInStackTrace(Unknown Source)
08/04/17 18:43:03 at java.lang.Throwable.<init>(Throwable.java:195)
08/04/17 18:43:03 at java.lang.Exception.<init>(Exception.java:41)
08/04/17 18:43:03 at oracle.portal.utils.v2.ContainerException.<init>(Unknown Source)
08/04/17 18:43:03 at oracle.portal.provider.v2.ProviderException.<init>(Unknown Source)
08/04/17 18:43:03 at oracle.portal.provider.v2.oid.OidManager.<init>(Unknown Source)
08/04/17 18:43:03 at htdocs.oratest._OraTestShowPage._jspService(_OraTestShowPage.java:90)
08/04/17 18:43:03 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
08/04/17 18:43:03 at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:569)
08/04/17 18:43:03 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:305)
08/04/17 18:43:03 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
08/04/17 18:43:03 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
08/04/17 18:43:03 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
08/04/17 18:43:03 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
08/04/17 18:43:03 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
08/04/17 18:43:03 at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:253)
08/04/17 18:43:03 at oracle.portal.provider.v2.render.http.AbstractResourceRenderer.renderBody(Unknown Source)
08/04/17 18:43:03 at oracle.portal.provider.v2.render.RenderManager.render(Unknown Source)
08/04/17 18:43:03 at oracle.portal.provider.v2.DefaultPortletInstance.render(Unknown Source)
08/04/17 18:43:03 at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.showPortlet(Unknown Source)
08/04/17 18:43:03 at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.handleHttp(Unknown Source)
08/04/17 18:43:03 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
08/04/17 18:43:03 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
08/04/17 18:43:03 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08/04/17 18:43:03 at java.lang.reflect.Method.invoke(Method.java:324)
08/04/17 18:43:03 at oracle.webdb.provider.v2.adapter.SOAPServlet.doHTTPCall(Unknown Source)
08/04/17 18:43:03 at oracle.webdb.provider.v2.adapter.SOAPServlet.service(Unknown Source)
08/04/17 18:43:03 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
08/04/17 18:43:03 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
08/04/17 18:43:03 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
08/04/17 18:43:03 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
08/04/17 18:43:03 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
08/04/17 18:43:03 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
08/04/17 18:43:03 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
08/04/17 18:43:03 at java.lang.Thread.run(Thread.java:534)the password value stored in OID is just a hashed value (by default) and it's virtually impossible to retrieve the original value of password, as entered by the user.
There are option in OID for storing the encrypted value (vs the hash value). Perhaps that in this case there are means to do the job.
In my opinion it's a bad choice (from governance perspective) to allow developers retrieving a user password value from a directory.
Patrick. -
Cannot seem to read properties file from JSP
Hi all,
In an ISA 4.0 application I want to read a properties file from a JSP to decide whether or not to execute some specific JavaScript code. I want the properties file because in it I can easily configure this externally. I put my properties file in /WEB-INF/classes.
I develop on an environment using Tomcat where this works fine. On an acceptance machine using the SAP J2EE engine however this won't work, to my surprise. Can anyone give me a suggestion on why my properties file is not read?
Here's the Java scriptlet code:
UserSessionData userSessionData = UserSessionData.getUserSessionData(session);
// theme will be something like "themes/zester":
String theme = (String) userSessionData.getAttribute(Constants.THEME_KEY);
boolean showScript = false;
int slashIndex = theme.indexOf('/');
String themeKey = null;
// get the "zester"-like part from the theme:
if(theme != null && slashIndex > -1) {
themeKey = theme.substring(slashIndex + 1);
Properties props = new Properties();
InputStream is = application.getResourceAsStream("/WEB-INF/classes/script.properties");
if(is != null) {
props.load(is);
is.close();
Enumeration keysEnum = scriptProps.propertyNames();
while (themeKey != null && keysEnum.hasMoreElements()) {
if(theme.toUpperCase().endsWith((String) keysEnum.nextElement())) {
showScript = true;
break;
showScript = false;Hi Kishor,
Thank you for taking the time!
I agree, this issue may have to do with the deployment. There is however a remark in the <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html">ServletContext</a> interface documentation on methods <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getResource(java.lang.String)">getResource()</a> and <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getResourceAsStream(java.lang.String)">getResourceAsStream()</a> that may also be of interest here:
"The servlet container must implement the URL handlers and URLConnection objects that are necessary to access the resource."
Is this remark of relevance to the subject, or is this thought too far fetched? Mind you, the documentation also states that "This method allows the servlet container to make a resource available to servlets from any source. Resources can be located on a local or remote file system, in a database, or in a .war file". It should, therefore, be possible to read a file from disk???
Cheers,
Peter-Jan Bosch -
Hoe do I access a properties file ??
I am developing an application using JSPs on WLS6.1. My JSPs want to
access a properties file that will have declarative information. Where
do I keep the properties file, and how do I access it ??
Reply,
Hemant.
Herr Bedekar,
The servlet spec helps you out here. Check out:
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletContext.html#getResource
ga
[email protected] (Hemant Bedekar) wrote:
>I am developing an application using JSPs on WLS6.1. My JSPs want to
>access a properties file that will have declarative information. Where
>do I keep the properties file, and how do I access it ??
>
>Reply,
>Hemant.
-
Error reading properties file upon deployment
hi. i'm still relatively new with regards to the Java programming language. in any case... i am developing a simple project wherein the application has to make a database connection to a server. the application is finished already however.. i am having problems deploying it.
my project has a "resources" package containing the file "config.properties" which contains various information (connection details among others). correct me if im doing something wrong, but in deploying in, i copied the "dist" folder of my compiled code and then tried to run the java exe independently which resulted in an error. i already tried copying the "config.properties" file to the dist folder and even creating a "resources\config.properties" file but it still results in an error. could you please help me figure out how to deploy the application with the properties file. the code i used in referencing my .properties file is as follows:
Properties configFile = new Properties();
configFile.load(this.getClass().getClassLoader().getResourceAsStream("Resources\\config.properties"));
String username = configFile.getProperty("username");
String password = configFile.getProperty("password");
String url = configFile.getProperty("url");
String dbtype = configFile.getProperty("dbtype");
Class.forName(dbtype);
conn = DriverManager.getConnection(url, username, password); thanks in advance. ^^thank for the help mangst. i guess the IO approach is also applicable ^^; i changed my code to:
configFile.load( new FileInputStream( ".\\resources\\config.properties" ) );but i had a little trouble in debugging it since it starts the file search from the main project directory. however it works fine upon deployment. ^^; thanks again.
Edited by: xnofate on Sep 23, 2008 6:21 PM -
I have a main method which i am using to call a servlet located in the same Development Component. Until recently i had the servlet location hard coded and it was working without issues. Now i decided to make the location configurable. For this i created an sap.application.global.properties file in the EAR DC which contains the WAR of this DC.
The contents of the above file are as follows:
SAP application properties
SERVLET.LOCATION=http://<server-name>/ControllerServlet/servlet/com.nike.xapps.eqptsp.swem.controller.ControllerServlet
The code i am using in the main method to call this properties file and access the property is as follows:
Context ctx = new InitialContext();
ApplicationConfigHandlerFactory cfgHdlr = (ApplicationConfigHandlerFactory)ctx.lookup("ApplicationConfiguration");
Properties props = cfgHdlr.getApplicationProperties();
String servlet = props.getProperty("SERVLET.LOCATION");
contained in a try...catch block.
On dubugging i get a NoInitialContextException repeatedly in the statement where the lookup is performed.
These are all the additions i have made for reading this properties file. Does anyone know if there is anything more that needs to be done for this to work.
Thanks,
Murtaza.thank for the help mangst. i guess the IO approach is also applicable ^^; i changed my code to:
configFile.load( new FileInputStream( ".\\resources\\config.properties" ) );but i had a little trouble in debugging it since it starts the file search from the main project directory. however it works fine upon deployment. ^^; thanks again.
Edited by: xnofate on Sep 23, 2008 6:21 PM
Maybe you are looking for
-
HT4314 How do I get my old username in gamecenter back now that it seems to have been eaten?
For christmas I got an upgrade from 3g to 5 on my phone. I also got put on the cloud, though that doesn't seem to be working just like a LOT of things don't seem to be working, (like my password mysteriously not working and spending an hour at the s
-
Remote Desktop Connection with single Ethernet cable
Hi, I'd like to be able to use Microsoft's Remote Desktop Connection app to connect to one of my XP machines with my PowerBook. I can do this when everything is running on my home LAN, but I'd like to be able to connect with just a single Ethernet ca
-
After download a new update I cannot FaceTime
I cannot communicate with Face time with my friend who has iPAd 2 after downloading a new update from 18/07.
-
i have an iphone 3g 8gig its ment to be on orange so its had my sim in it for over 3mounths now been on itunes loads of times haveing the softwear up graded but it turned its self off over an hour ago now and it wont go back on its in recovery mode b
-
I have both Windows Vista and Mac OS X 10.5.6 on my macbook pro 15 inch Recently, I tried to reboot my computer to Mac. But i was still at the start up screen after 15 mins with the Apple logo and the wheel rotating. Mac simply doesn't start up. I ha