I can't seem to find a idiomatic way to access FTP files from a Scala library.
Are there any mature libraries for this in Scala, or whould the prefered way be, to use the Java libraries for instance the Apache FTP client?
Thanks in advance.
There doesn't seem to be a dedicated Scala library.
The only scala project managing FTP access is Scalanet, but:
it hasn't been updated since 2009
it simply encapsulates the org.apache.commons.net.ftp classes from the Apache Commons Netâ„¢ library (as seen in the FTP.scala class)
Related
I have to manipulate my OWL file with Scala language. therefore, I found that scowl: https://github.com/phenoscape/scowl facilitates this task. I'm working with Lunix and Virtual Machine.
my questions are:
how to download scowl in Lunix with command line?
how to upload my owl file from github in Lunix?
Thanks in advance
I am the author of Scowl. It is meant to be used as a library in your Scala application. So you would add it as a dependency in your build file, whether you are using SBT or Maven or something else. It's available from Maven Central, and instructions are in the Scowl readme. I'm not sure what you mean by uploading your OWL file. Scowl provides a domain-specific language in Scala to allow you to manipulate OWL axioms in a readable way.
when using Finagle you can place the thrift file in the directory src/main/thrift/, and when compiling it can generate thrift file automatically in the directory target/scala-2.10/src_managed/main/.
How can the Play framework do the same thing automatically?
You just need to configure the SBT plugin or the Maven plugin. Though note that this will still produce Finagle-oriented implementations - Scrooge only really supports those. (I have a pull request outstanding to add support for other kind of server implementations).
I am using GWT 2.5.0. I want to use some methods in org.apache.commons. GWT want source code also for adding external jar. So I downloaded source and class files and merge both in jar. It is not giving any error for some methods but some classes of org.apache refering other class outside this package. So it gives the following error
[ERROR] [rmchecking] - Errors in 'org/apache/commons/lang/StringUtils.java'
[ERROR] [rmchecking] - Line 237: The method isWhitespace(char) is undefined for the type Character
Is there any package in gwt that giving same facility of this org.apache.commons? or how to use this same package in gwt?
You cannot use any third party jar that is not GWT compatible. Example apache-commons.
HINT - They do not have .gwt.xml file telling GWT compiler that they have GWT compatible code.
You can however fork it and make it your own gwt compatible lib from the apache common. Example - http://code.google.com/p/gwt-commons-lang/
It is not really possible since StringUtils is based on java regular expression and the GWT regular
expression emulator is based on a javascript. You will need to write it by your own
I agree with SSR although I wouldn't be surprised if there's some messy debugging involved. It's worth mentioning that there's gwt-commons
which is still in alpha unfortunately and google guava. I use google Guava, which has a similar purpose to apache commons. It even has some features which apache commons doesn't like Optionals. Guava has a fully functional gwt version created by google that I'm using in my own project.
I've managed to convert most of Apache Commons Math 3.6.1 to compile with GWT 2.8.0, see:
https://github.com/murkle/commons-math/issues/1
We are using a 3rd-party jar that contains a dependency to the log4j.varia.NullAppender class. We are transitioning to logback, but unable to change the 3rd-party jar, so we plan to use the log4j-over-sl4j bridge for now with the rest of our code still using the existing log4j calls.
Since the log4j-over-slf4j jar does not contain the NullAppender class, what is the best way to spoof it? Should we write our own and put it on the class path? Should we augment the log4j-over-slf4j bridge jar with this class?
What have others done who have run into this and does the logback project plan to support backwards compatibility? This is a real hassle for those of us who want to migrate when existing jar files use log4j classes that are not in the bridge.
Any suggestions or best practices?
I have to upload about 30M for my app since it uses a lot of libraries, log, web engine and so on.
I think there should be a way to share these libs on glassfish, but I failed to figure it out. I tried to put them in domain/lib/ext but does not work.
So where should I store these libs and how should I refer to them? thank you.
Why domaindir/lib/ext does not work?
from glassfish manual:
Optional packages are packages of Java classes and associated native code that application
developers can use to extend the functionality of the core platform.
To use the Java optional package mechanism, copy the JAR files into the domain-dir/lib/ext
directory, then restart the server.
Why domaindir/lib work?
To use the Common class loader, copy the JAR files into the domain-dir/lib or as-install/lib
directory or copy the .class files (and other needed files, such as .properties files) into the
domain-dir/lib/classes directory, then restart the server.
Using the Common class loader makes an application or module accessible to all applications
or modules deployed on servers that share the same configuration.However, this accessibility
does not extend to application clients.
If I remember well, you can also specify additional libraries in the classpath via the admin console (in Application Server > JVM settings or something like this). Then you can put them wherever you want.
(I had a quick look at Pascal's link, but I don't know if that's what they describe, if yes, my apologies for the duplicate answer.)
One option would be to put them in domains/domain1/lib. But actually, I suggest to read GlassFish equivalent to WebSphere's "shared libraries", including the comments.