How to create a jar file as a library in java?

Let me put it simple: rb.java is already put under /home/jiane/rb/rb.java;
the tar file rb.tar being located under /mylib/rbcore/, the test client is put under /home/jiane/test.java. now rb.java looks like
//// rb.java
import java.until.*;
public class rb {
%>jar cvf /mylib/rbcore/rb.jar /home/jiane/rb.class
test.java as below
//// test.java
import mylib.rbcore.*;
import java.until.*;
class test {
%>export CLASSPATH="/mylib/rbcore/rb.jar;."
%>javac test.java
%>test.java:1 package mylib.rbcore does not exist
so, how to make adjustment to rb.java & test.java so that I can make use of jar file rb.jar. please shows the steps to do. thanks a lot.

import mylib.rbcore.*;This assumes the package mylib.rbcore and imports all its classes.
But the source of the class does contain package statement, so the class is in the default package.

Similar Messages

  • How to create a .jar file in wlcs3.1

    hello friends,
    hi friends, im working on weblogic commerce server3.1 . i dont know how to create a .jar file in weblogic commerce server3.1. can any one knows send email to me.
    thanks.
    hari

    $JDK_HOME/bin/jar (%JDK_HOME%\bin\jar) shows you the syntax
    where JDK_HOME is your jdk installation directory.
    Kumar
    hari wrote:
    hello friends,
    hi friends, im working on weblogic commerce server3.1 . i dont know how to create a .jar file in weblogic commerce server3.1. can any one knows send email to me.
    thanks.
    hari

  • How to create executable jar files??

    how to create executable jar files??
    thx :)

    Using JAR Files to Deploy
    http://developer.java.sun.com/developer/onlineTraining/Programming/BasicJava2/jar.html#jar

  • How to create a .jar file for the BPEL project

    hi all,
    how can i create a .jar file for my BPEL project, i am trying to deploy the project but getting an error :
    "Error: [Error ORABPEL-10902]: compilation failed [Description]: in "C:\OraBPELPM\integration\jdev\jdev\mywork\Workspace_BPELDemo\BPEL_Report\BPEL_Report.bpel", XML parsing failed because "". [Potential fix]: n/a. "
    and when doubel cliking on this error Jdev take me to the beginning of the ".bpel" file.
    I 'm really stuck in here i am not able to deploy the process!
    Thanks,
    Rana

    Rana:
    If you haven't already, I would post this question in the BPEL forum. I would expect a much better turnaround there.
    Johnny Lee

  • How to create a jar file which is in the remote system?

    Hi,
    I have a set of files that resides in a remote system,which have to be "jar"red. I have a firewall in between. I want to create a jar file out of the files situated in the remote system.How do i go about this process.?

    Hi,
    You can't do that in a simple way. You need to have a port open in the firewall, and you need to have a server process on the remote machine.
    Kaj

  • How to create a Jar files

    I m New in java i want to create a jar files but i dont know how please anyone help me and answer my question thanks.

    Hi muhammadawood,
    Creating a jar file is easy. First of all, a jar file is not much more than a zip file. You can use your favorite zip program (ie. zip, WinZip, pkzip, etc) to create the jar. To do this, zip all your classes together into a zip file. Then, rename the file w/ a .jar extension. This method doesn't support a small set of features defined by jar, but it will work nonetheless.
    If you are using the Forte IDE, it has the ability to create a jar from a menu.
    Regards,
    Nick G.

  • How to Transfer a JAR file from PC to a Java enabbled mobile?

    The project (creation of the JAR file) is developed in our local PC and transfer the JAR file to a mobile using Bluetooth. How to transfer the JAR file to a remote mobile?

    The situation is like this.
    We are transfering the JAR file from the PC to the Mobile using Bluetooth.
    Our J2ME project is already install on Nokia's 6600 and given to the salesman's on the field. Now i have updated my software and i want to upgrade the same on their mobiles. For this i can't call all the 2000 salesman's who are all over the country (India) to my place to get the latest software installed and configure.
    If i have a GPRS like solution for transfering my file from my PC to the remote mobile. I would be better. If you know any this related to this kindly reply me.

  • How to create Comile jar file

    hi

    Eclipse: file -> export -> jar file ...
    command prompt jar
    Usage: jar {ctxu}[vfm0Mi] [jar-file] [manifest-file] [-C dir] files ...
    Options:
        -c  create new archive
        -t  list table of contents for archive
        -x  extract named (or all) files from archive
        -u  update existing archive
        -v  generate verbose output on standard output
        -f  specify archive file name
        -m  include manifest information from specified manifest file
        -0  store only; use no ZIP compression
        -M  do not create a manifest file for the entries
        -i  generate index information for the specified jar files
        -C  change to the specified directory and include the following file
    If any file is a directory then it is processed recursively.
    The manifest file name and the archive file name needs to be specified
    in the same order the 'm' and 'f' flags are specified.
    Example 1: to archive two class files into an archive called classes.jar:
           jar cvf classes.jar Foo.class Bar.class
    Example 2: use an existing manifest file 'mymanifest' and archive all the
               files in the foo/ directory into 'classes.jar':
           jar cvfm classes.jar mymanifest -C foo/ .http://java.sun.com/docs/books/tutorial/jar/TOC.html

  • Portal Service - Creating the JAR Files

    Hello All,
    I need some help with Portal Services, I have created a Service and Deployed it to the Portal Server, but can someone tell me how to create the JAR Files for PortalService to add them to other projects. I just want to confirm if we just:
    1. Export the IService files in a Jar file and add to the project.
    Please do let me know.
    Thanks,
    John.

    Hi John,
    You have to jar the class files of the Portal Service using the java jar command and add the jar in your other applications.
    You can go to the directory location of the class files of your Portal service in command prompt and type in this command..
    "jar -cvf <i>jarFileName</i>.jar ."
    the jar file will be created in the current directory.
    cheers
    Kiran

  • Problems creating a Jar-file

    Hello together!
    I have an application working perfectly, but now I want to create a jar-file.
    I created it in eclipse using Export and got the followint error message:
    Failde to load Main-Class manifest attribute from PATH.
    The I changed the manifest.mf and added the following line:
    Main-Class: MyMainClass
    and then I got the following error:
    Invalid or coorupt jarfile.
    If anybody knows what is the problem pls let me know.
    Thanks a lot.

    I am trying to use ant, and I have the built.xml file.
    But when I create the jar file I still have the same problem.
    So my question is how can I make the jar-file inlcuding the ant.
    I mean I did I think the pc created a export.jar, but the same problem.
    Does anybody know how to create a jar file (in eclipse)
    I would really appreciate any kind of help.
    Thanks

  • Help To Create a Jar File

    hi there
    i wanna create a exe file so i am trying to use jar file.
    I am new at creating jar files, my application has a main file and other java files, i am using other java files in my main file my concern is can i create a jar file including all the files and when i run jar file i want to complie java files, i really appreciate if anyone can help me out creating a jar file to compile and execute java files

    http://java.sun.com/j2se/1.4.2/docs/guide/jar/index.html

  • How to get the .class file for the extended Controller .java file

    Hi,
    I did the below steps.
    1. Created New OAWorkspace
    2. Created New project
    3. Imported the page .xml file
    4. Added new .java file by extending the controller class
    5. Added code in the .java file.
    6. Ran the .xml file
    As I copied all the folders from Unix box, the page was opened.
    But My question was where can I see the .class file the extended controller. It's a .java file. How to compile and get the .class file for this .java file. If I get this .class file, I can go to the page and click the personlize page. and change the Controller name to the new path by ftp ing the new class to the cust.oracle.apps.pos.changeorder.webiui.
    Please let me know how to create the .class file.
    Thanks,
    HP

    All are Java files are stored in JDEV_INSTALL_DIR:\jdevhome\jdev\myprojects\
    In your case the path java would be
    JDEV_INSTALL_DIR:\jdevhome\jdev\ myprojects \cust\oracle\apps\pos\changeorder\webui\
    AND
    Once you compile the java file in Jdeveloper, Class files get generated @ below path
    In your case the path of class would be
    JDEV_INSTALL_DIR:\jdevhome\jdev\ myclasses \cust\oracle\apps\pos\changeorder\webui\
    Duplicate Thread-
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • How can I create a jar file at a Unix systems?

    Hi there,
    how what's the command to create a jar file in Unix? I'm creating a zip file and then renaming it to jar, but it's size is smaller than the one when I use the WinZip tool at a Windows system.
    Thanks,
    Andre

    Oops,
    it very easy to do. Just use the jar -cvf command
    Andre

  • How do you create a jar file in JDeveloper 11.1.2.0.0

    How do you create a jar file in JDeveloper 11.1.2.0.0

    1) Select the project for which you would like to generate the jar.
    2) Right Click the selected right and select 'Project Properties'
    3) Select the 'Deployment' in the left tab.
    4) Click on 'New' to create a new deployment profile and in the popup dialog, select 'Jar File' profile type and provide the name.
    5) Press 'ok' to save the changes.
    6) Select the project and right click and select 'Deploy to' and select the jar profile name you have specified.
    The Jar library is generated and the full path to the library jar is shown in the log window.
    Thanks,
    Navaneeth

  • How to create a Jar with only class files?

    Dear all,
    I want to create a jar file with only classes.My class files and java files are in different folders under com .
    say
    com
    in com there are two folders
    folder 1 -- subfolder 1
    folder 2 -- subfolder 2
    like this.
    If i want to create a jar file from com directory how should i give the jar command.Again my jar should contain only .class files.
    Any help will be appreciated
    Thanks
    lekshmi

    It doesn't work.Says "No such class or directory"
    Any other way Or is it possible to do so?Read the link I posted and create the statement to make your structure. I was thinking you were inside the com directory but if you are above it you will need something like this instead:
    jar -cf test.jar com\*.class com\subfolder1\*.class com\subfoler2\*.class
    But either way don't just copy and past this. Think about what is does so that you can make it work for you.
    Also, you might want to look into using Ant if you are going to be building this a lot.

Maybe you are looking for

  • Apple took away my printer's drivers (HP Laserjet P1005) in Mavericks. What should I do?

    I own a HP Laserjet P1005 that's shared in a wireless network, used by 2 pcs, a Macbook and several iPhones. All of them can print normally, only my Macbook doesn't. It lists the network and recognize the printer, but Mavericks took away the drivers

  • Block PO creation for engineered items

    Hi, We want to block creation of PO for engineered items till engineering is complete. A PR can be created but it should not be possible to convert the PR to PO. I know that we can use "plant specific material status" field in the material master to

  • Project system tables for getting baseline and forecast values

    Hi all, I am new to Project systems and currently i am having the PS report. I need to pick the following values based on project definition (proj-pspid): --> historical baseline values like: 1) versions 2) created by 3) created on --> historical for

  • Why are the icons no longer on tabs?

    In previous versions of Firefox the icon from the website, e.g. eBay, Craigslist, Amazon, Gmail, and others, would show up on the left side of the tabs. Now it will show the icons for one or two of these websites but the rest will be like blank docum

  • #ixGetData Error: Invalid use of Null

    Hi, I am running a basic XL Reporter report and I am getting Other Data for the Territory.  It pulls through data for a records that have a territory but when it reaches one that is Null it creates the error above. I presume I need to use the conditi