How do I install org.apache.commons.code.binary.Base64? - java

I am taking a class on Android and I am a newbie with JDeveloper. I am working on a Web Services application. I downloaded some code that has a "Import org.apache.commons.binary.Base64". JDeveloper is barking "not found" for this import. I found on the apache website the org.apache.commons.binary.Base64 module and downloaded it. What do I do now? I am not sure how or where to place this code. The downloaded folder has several folders and and way down at the bottom of one of them is my Base64 module. Sorry for such a basic question. I am using JDeveloper 11g 11.1.1.0.2 running on Windows 7.

If you downloaded the source, which is just Base64.java, just add it to your project as
org/apache/commons/binary/Base64.java
If you downloaded a jar, add that to your project classpath. In JDeveloper this should be available from the project properties dialog and select "Libraries\Classpath".
Of course, if you distribute this project it will need to adhere to the Apache license.

Related

how to untie Java EE tutorial examples from NetBeans and use them with Eclipse?

I am trying to go through the Java EE 6 Tutorial samples with Eclipse.
It seems it will be very hard.
I just started.
I found the Hello and Hello1 samples cannot be used in Eclipse directly.
Other than these NetBeans specific files/folders,
the java files are under "src/java/" folder but the "java" folder is NOT a package name. Eclipse doesn't like this structure.
Is there an easy way to convert these samples to be usable with Eclipse?
Are there any other Java EE sample sets can be used in Eclipse?
Install Maven plugin for eclipse (ME2Eclipse) or use an Eclipse version, which already contains the plugin like Eclipse for Java EE Developers.
Then import the hello1 example as existing maven project.
In Eclipse you can build and deploy the project with Run maven install.
If you don't use maven, you have to set the source folder in Java Build path as mentioned from DwB in the post before.
A detailed description for your first project you will have in the Firstcup example installed with the glassfish server.
Eclipse does not care which folder is used for the java source;
however, you will have to tell eclipse which folder to use by choosing the source folders in the project properties!Java Build Path!Source tab
(open project properties, select the Java Build path option on the left side, select the Source tab).

WebService Client in Java with jax-rpc

I need to use jax-rpc in a project using the Eclipse IDE. The problem is that I don't know what JDK to use because when I write:
import javax.xml.rpc;
or
import javax.xml.rpc.Stub;
I get an error error telling me Eclipse IDE can not find it in the library.
I downloaded the JDK 7 and JDK 6, but neither solves it.
There is a Jax-ws library but, I know I need to use jax-rpc.
It seems like you didnt add the library in the project. please add rpc jar in the project. RPC is older version of webservice for the tutorial you cans use http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXRPC3.html. You can also use apache axis which more better than the rpc style of webservice.
open www.google.com
write "download javax.xml.rpc library"
download jar file.
Place the jar file in plugin folder of eclipse.
Right click on your java project->Build path->Add library-> browse the jar from plugin folder.

How to Point Apache Towards a Vaadin (Java) Project?

Sorry if this is the wrong kind of question but currently I have an Apache server which is configured for Pyjamas. All I used to have to do was: pyjsbuild example.py and the GUI would appear in my browser.
I decided to switch to Java, so I picked Vaadin as my framework. How do I do the equivalent for Vaadin? All I want to do is compile the java and have Apache recognise it.
I'm using linux and I'm very new to building web applications, previously I only ever built the GUI side of things, I never had to touch the server.
You need Apache Tomcat to serve java pages. Install it separatly or see http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html for information on how to hook them together.
Vaadin projects work just as any web project. You have to crate a WAR file.
For example, if you are using Eclipse, right-click on the project, choose "Export..." and under "Web" choose "WAR file".
If you are using Netbeans or something else, google "create war in netbeans/intellij/..." to find out how to do this step.
This will generate a file with the extension .war, which you will have to copy in the "webbaps" folder of your Tomcat installation. Restart Tomcat and the application will be automatically deployed.
If you do not have access to the webapps folder, go to Tocatmcat's "Manager App" in the browser and
under the section "Fichier WAR à déployer"(WAR file to depploy) choose the generated file and click Deploy.
To start with, make sure that go through Getting Started chapter in Book of Vaadin. In this chapter you will find overview of the required toolchain and step-by-step installation instructions. Your Linux distribution might have more documentation about installing JDK (For example, see Ubuntu wiki for Oracle JDK installation).
It will be convenient for you to connect Tomcat to Eclipse IDE. This makes starting Tomcat and updating your application easy. For example, see this [blog] for some videos about connecting Eclipse to Tomcat.
Please note that using Eclipse is just one approach and later you might want to see if IntelliJ IDEA or command line works better for you.

Add servlet.jar in my classpath

I have imported a google web app project and added the servlet.jar file but I don not know how to set the servlet.jar file in my classpath. How do I go about doing that. Am new to eclipse and this is a project am collaborating with somebody. I am using a macbook.
If you had received an App Engine project, then an Eclipse Import should have done the trick and setup the paths correctly.
Since, it is not done, you will need to do the following for an App Engine project.
In your Eclipse project that you have imported, visit Project Properties and then Java Build Path.
In the Libraries Tab, check if an App Engine SDK library is present or not. If yes , expand it, you will see the servlet-api.jar file.
If not, Add Library from there and choose the current App Engine Library that you have set up on our system.

intellij module/project with android and java sources

I am having an annoying problem with organising my sources. We have a client server application with the server written in java and android as the client. The repository contains all the server files in one folder and all the android specific stuff in another at the top level.The Android folder however is not complete since it needs some files that exist in the server folder. I need a way to pull down the all the necessary files from 2 separate folders in my repo all in to one Intellij module/project.
My colleagues using eclipse were able to solve this by creating an android project, downloading the android source files from the repo and then using the add to build path > link source feature. This created symbolic links in the android project to the necessary files in the server folder so that android could compile.
How do i achieve this in Intellij? I hope this is clear but it is quite hard to explain. Thanks.
Also if this matters i am using SVN.

Categories