I'm trying to local a properties file programmatically without having
to pass it's fullpathname on the commandline to my program. I figure if I can
locate the path of the main class, I can stick my properties file in the same
directory or a sub-directory.
If that won't work is there some other way I can locate the path of a properti...
I started to use Sun's ClassDep as a solution to fight the inclusion of unnecessary JARs in my resulting WAR application. It seems to rock. However, this beast is hard to tame!
I'm getting several errors of classes not found even if they are explicitly included in the classpath I pass to it. Example:
couldn't find: org.apache.log4j.Log...
I'm trying to build GNU Classpath 0.98 and JamVM 1.5.2.
Following the JamVM readme, I did 'configure; make; make install' on the jamVM, and it worked.
I then added jamvm and Sun javac to the path.
Then with GNU Classpath I did this:
./configure --enable-jni --disable-gtk-peer --disable-gconf-peer --disable-plugin
I got this error:
Th...
I know we can do something like this:
Class.class.getResourceAsStream("/com/youcompany/yourapp/module/someresource.conf")
to read the files that are packaged within our jar file.
I have googled it a lot and I am surely not using the proper terms; what I want to do is to list the available resources, something like this:
Class.class....
I have a <path id="..."> in my build.xml. Before invoking the compiler I want to verify that every jar/directory on the classpath exists and print a warning with the missing ones. Does anybody know an existing solution or do I need to write my own task for that?
OK, I decided to go for a custom task. Here it is, in case anybody eve...
I'm running JUnit nightly builds on my computer as a scheduled task in Windows XP. My application uses Jaxb, therefore some of the tests need to reference xsd schemas using the system classpath. When the nightly build runs while I'm not on the computer, I get an error like this:
java.lang.Exception: Unable to load schema mySchema.xsd ...
Eclipse has a Run Configurations screen with a Classpath tab.
I had some jars listed in the "user entries" section of this tab but my project did not run until I duplicated those jar files into the "bootstrap entries" section. After the jars were listed in both sections, the project ran successfully.
Why?
What's the difference betwe...
Hi,
I'd like to set a property in my pom to a classpath containing all the project's dependencies. The ant plugin does something like this, so I know it's definitely possible.
I basically want to use ${maven.compile.classpath} wherever I like in my pom and have it 'just work'. I don't mind using plugins or anything else to achieve this...
My application uses JDBC database drivers. I load these from a jar file, db2jcc.jar in the case of DB2 which I'm currently working with. With this jar in the classpath, everything is fine, but I have a requirement to find the jar from a property in the application's config file instead - for example,
database.driver=/opt/IBM/db2/V9.5/j...
Hello!
I am trying to implement some sort of MVC in Java. Actually it's more of a MVP but this doesn't really matter to my problem.
Following situation:
I've got a GUI, made with Netbeans (because of the better GUIeditor) which is updated and changed frequently.
As my main project is easier to maintain in Eclipse I chose to import the...
I have recently installed OS X on my MBP and am wanting to set up java3d on it. I have set this up on windows which proved a lot easier with the installer provided.
the mac install instructions can be found here: http://inverse.chi.googlepages.com/README-unzip.html
I have placed both the j3d and jogl libs in my home directory /Users/ma...
OK I have a few classes I have made or found on the web that I plan to use in multiple projects, I would rather store these classes in a central location instead of copy+pasting them into each project.
my Flex projects have their own workspaces inside the path Flex/WorkSpaces/< workSpaceName >
If I wanted to put another folder inside t...
Hi,
Does anyone know of a way to set a specific classpath order in Maven2, rather than the random ordering I appear to experience at the moment?
There are a number of legitimate reasons for wanting to do this:
A vendor has supplied a patch jar, which contains overriding classes for a previously released jar and therefore the patch ja...
Is the WEB-INF file in the CLASSPATH of a Java Web application?
...
I keep getting the following exception on one of our live servers (the others running the same code seem ok):
java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/domwith the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryCon...
I have a folder called Etc which has an image I want to use in another file in the same folder, Example.java. So I have Etc\image.png and Etc\Example.java. I've tried using "Etc/image.png" as the image path, but that didn't work. How should I go about this?
Also, suppose the files were in different packages, how would I do it?
My main ...
I swear I'm going insane.
JDeveloper runs my project with not a single complaint.
If I do "java -cp /usr/share/java/mysql.jar:. MAIN.java", it works like a charm.
But Eclipse says "[censored] you" and ignores my classpath settings.
I open the Run > Run... menu, and add the mysql jar in the classpath tab, but time and time again, I ke...
I have a groovy script that uses a third party library. Each time I open the application and attempt to run my script I have to import the proper library.
I would like to be able to open GroovyConsole and run my application without having to import the library.
...
Using Java (1.4) is there a way in which to use Windows UNC file locations (\\servername\filestore\etc) within the classpath?
...
Is there an Ant API for reading and ant build.xml and retrieving elements from it? Specifically I want to be able to retrieve the values in a path element and be able to walk all of the elements in the path.
My purpose is to retrieve a given path and ensure that it is referenced correctly in a manifest, so that the build and the manifes...