kXML is an alternative XML parser I chose to use for JavaME apps.
The XML file to be editted is inside the mobile app's own JAR.
I'm using CLDC profile.
Please help
Does Project Lombok offer any benefit compared to code templates / code generation in Eclipse? Are there any downsides (apart from including the .jar)?.
Hi
I'm looking for a dead simple Java Library to use for SFTP file transfers. I don't need any other features beyond that.
I've tried Zehon's, but it's incredible naggy, and I think 8 jar files is a bit crazy for so little functionality as I require.
And the library have to be free (as in free beer), and preferable Open Source (not a requirement).
Thanks.
I'm using a java process to spawn many other java processes using Runtime.exec(cmd) where cmd is like the following:
java -cp "MyJar.jar" pkg.MyClass some-more-arguments
running the same command from the command line works fine in windows and linux, however when my spawning java process calls the command via Runtime.exec it works in windows but not in linux.
in linux i get Exception in thread "main" java.lang.NoClassDefFoundError: pkg/MyClass
any ideas?
I have a Java program source files, complete with its subdirectories. My problem is, how can I put all of this inside an IDE (ie. Netbeans, Eclipse) , so that I can easily, modify, compile and package it to become a *.jar file.
How do i configure selenium WebDriver.I have automated test cases using Selenium.Now i need to automate upload and download of a file.So i have to automate using WebDriver.I had added webdriver-common-0.9.7376.jar.Now how do i instantiate for Internet Explorer?
Am just decalring variable and using driver
private static WebDriver driver;
driver.findElement(By.id(upload)).sendKeys("file to be upload");
Is this correct?
This is a novice question.
My project P depends on dependency A which depends on dependency B. My project's pom.xml file includes A as a dependency, and its jar is included in P's classpath. However, there is a NoClassDefFoundError thrown at runtime of P, which stems from missing B jars.
Shouldn't Maven have downloaded these dependencies automatically?
Hi,
in Java I think it is possible to cruise through jar files like they were not compressed. Is there some similar (and portable) thing in C/C++ ?
I would like to import binary data into memory from a large (zipped or similar) file without decompressing to disk first and afterwards writing to disk in a compressed way.
Maybe some trick with shell pipes and the zip utility?
Hi,
I would like to package multiple app in a single app. So donwloading one app and install that in an iPhone will install 3/4 apps. Something like java midlet suits having multiple Midlets in a single jar file.
Is it possible by using multiple target or bundle, aggregate target etc.?
HI,
I need to know how to set class path for the client tag
under web service of build.xml in java.
I have to add the log4j.properties file to the client jar.
Thanks
Abhi
I'm building some basic Twitter functionality into my app, and am using the JTwitter JAR to read and set status.
It looks like there is a User class that can be used to set the location, but I just can't figure out how to set it with my GPS coordinates once I've got my Twitter object.
Has anyone been able to set the user.location property using JTwitter?
Thanks,
-Gregg
Hi,
I have upgraded my application from grails 1.2.2 to 1.3.1-RC1. While things seem to work when executing grails from command prompt, I cannot make it run from my IDE IntelliJ (last development version).
The error I got is:
Error executing script RunApp: net/sf/json/JSONException
...
Caused by: java.lang.ClassNotFoundException: net.sf.json.JSONException
It seems that the library json-lib.jar is not in the IntelliJ classpath.
Do you know how can I solve this?
I'm using ant 1.6.2... I want to supply parameters to StripLineBreaks (essentially, I want to remove any \r in the text, but not \n.
So, I have tried
Using the above strips out all letter "r" (for example, "jar" becomes "ja")
I have tried "\r", "\\r", and "\\r"
I cannot upgrade ant to a later version.
Help is appreciated.
I'm using eclipse to build an ear file using ant. I'm using oc4j, and I want to make sure that orion-application.xml is included in the build. What I'm currently using but does not work is:
<target name="ear" depends=""
<echoBuilding the ear file</echo
<copy todir="${build.dir}/META-INF"
<fileset dir="${conf.dir}" includes="orion-application.xml"/
</copy
<ear destfile="${dist.dir}/${ant.project.name}.ear"
appxml="${conf.dir}/application.xml"
<fileset dir="${dist.dir}" includes="*.jar,*.war"/
</ear
</target
What is the right way to add this to the ear?
I am using Eclipse 3.4.1 Build M20080911-1700
I have tried to change the classpath directories for jar and the source directory using the Project Properties - Java Build Path - Libraries Tab or Source Tab. When I click OK button and then return to the properties page, my changes were not applied.
I have to resort in the work around by manually changing the eclipse ".classpath" project settings file.
Any ideas?
Hi,
I have some dependencies which I am providing myself. The jars are in the resources directory. In my pom they are scoped as system and I include the path to them. However, when I jar things up using the assembly plugin and use
<addClasspath>true</addClasspath>
It doesn't add the path of the system jars. How can I get them to be included automatically?
Thanks
I'm considering using JRuby on App Engine but have heard that Juby app on App Engine have a long startup lag. Why is this?
Is it because the JRuby jar files are so large that a cold startup requires them to be loaded into memory before the app can start serving?
That would be my guess but I'm not sure if that's a precise technical explanation.
while running jsp it shows the following error
error reading /opt/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.3.0_1.3.0.v200912141120/appengine-java-sdk-1.3.0/lib/shared/jsp/repackaged-appengine-ant-launcher-1.6.5.jar; error in opening zip file
How to solve this
When I compile a ruby file to a java class using jrubyc, I get different output when compiling with just jrubyc and with jrubyc --java (to generate the java file) and just javac. Why?
Example:
First Method:
$ jrubyc --java myscript.rb
$ javac -cp .:./jruby-complete.jar myscript.java
Second Method:
$ jrubyc myscript.rb
I'd expect the generated classes to be exactly the same, but they're not. What's jrubyc doing under the covers?
Thanks!
I know:
I have to sign the applet so it can read files
How to parse XML files
My Questions would be:
Should I keep the XML file in the .jar or separate?
Are there some best practices tutorials? if so please link me
I have noticed that in a Maven artifact's JAR, the project.version attribute is included in two files:
META-INF/maven/${groupId}/${artifactId}/pom.properties
META-INF/maven/${groupId}/${artifactId}/pom.xml
Is there a recommended way to read this version at runtime?
How would you go about establishing where a class ( or maybe resource ) has been loaded from?
I am trying to work out exactly where a class has been loaded from. Does anyone know if you can find out the following:
Which Jar file did the class come from ?
What classloader loaded the file?
Hi,
I am trying to use Seam to persist my jpa entities, when I reference an entity that is in a jar seam says unknown entity. I don't want to add all classes in persistence.xml I want seam to scan my jars and auto detect entities (as done by spring).
what I miss?
Hi,
i have two ears deployed on jboss with proper classloaders isolation settings. When seam bean call spring beans which make some queries on database everything works fine, but when spring quartz job bean is invoked and execute tries to execute database queries then there is a problem because spring tries too use hibernate jar from other ear and exception is thrown! It is clearily spring classloader isolation problem. Did anyone meet such a problem? How to ensure isolation?
I have read here that one disadvantage that some may find with using Spring MVC over Struts is that Struts has tags that output HTML code, while Spring has tags that don't generate HTML.
My question is can't you just use the Struts tag-lib in a Spring MVC project (or any other kind of framework project), by dropping the right jar into the WEB-INF/lib folder?
Any clarification is appreciated, thanks.