new using databases in Java

First of all Hello, this is my first post in the oracle Java forum

I also know some basic knowledge of java (school) and a database of mysql (freethinking).

I wanted to make a java app where I could use a database in the same pot, but I'm not sure how to do this, I saw in a Web page where it is said that if I used a database from a jar file, the database would not writable only readable is it true?

can anyone put me in how to use a database for an executable jar?

THX!

PS: using netbeans

Welcome to the forum!
>
Im sorry if I don't explain to me, basically I want to know if I can get an executable jar, a single file, which will open my application that connects to a database, the database is supposed to be locally, but saved in the same pot, so if I wanted to send this file jar to a peer, he would see that the database is filled with.
>
No - you cannot directly update a file jar with what either by using the standard feature of Java. I don't know why you would want to put the database inside your executable jar file in any case; You can easily distribute the data separately in another jar or zip file.

You have at least two possibilities:

1 use a database file as JavaDB - update the DB with the data and then send the DB files to your peers. You can run a small batch script that would zip/jar files DB.

2. use JDBC and create a cache result set on the client side. It is a result set that can be listened to in a file and you could then send the file to your counterpart and they could use Java code to read the data stream into their own cache result set and manipulate.

Tags: Oracle

Similar Questions

  • I use windows 7 64-bit edition Home premium and I cannot connect to access database in java program.it shows error database connection driver not installed.

    I am using windows 7 64 bit home premium I installed ms office 2007 and did all the settings.
    but I am unable to connect to the Access database in java program.it shows error database connection driver not installed.
    Please give me the solution...

    Hello

    I suggest you to ask your question about Java programming forums on the subject.

    https://forums.Oracle.com/Forums/Forum.jspa?forumid=922

    You can also ask your question on the forums to access.

    http://answers.Microsoft.com/en-us/Office/forum/access?page=1&tab=all&TM=1349633636662

  • How can I create a new database without table using database configuration

    How can I create a new database without table using database configuration

    You can search for your "DBA 2 days" version oracle documentation for your version.  You should also read the manual of the concepts.  Create your own schema is pretty basic, all you have to do is to create a user.  Don't use dba or system for your own objects.

  • error: "cannot find symbol" when you use String.getBytes (java.nio.charset.Charset)

    I have a very simple java class that uses String.getBytes (java.nio.charset.Charset). When I use loadjava, I get the error: "cannot find symbol" for this call. Any ideas on what could be the problem?

    Here is the full source:

    package mytest;

    java.lang.String import;
    java.nio.charset import. *;

    public class MyTest {
    public final static Charset utf8charset = Charset.forName("UTF-8");

    public int printString (String s)
    {
    Byte [] utf8 = s.getBytes (utf8charset);
    System.out.println (utf8);
    }

    public void printString)
    {
    printString ("hello");
    }

    };

    Thanks in advance,

    Keith

    Your code is correct for java 1.6 and higher...

    First of all, you should check that java version is on your database...

    FUNCTION to CREATE or REPLACE getJavaProperty (myprop IN VARCHAR2)

    RETURN VARCHAR2 IS THE JAVA LANGUAGE

    name "java.lang.String return java.lang.System.getProperty (java.lang.String);

    SELECT getJavaProperty ('java.version') of double;

    in my case, I have java 1.5...

    If you look at the Javadoc String (Java Platform SE 7) you will notice that your version is located for java greater or equal to version 1.6

    Try with:

    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED INSURANCE2."Test1" as
    public class MyTest
    {
    public static int printString(String s)
    {
            try
            {
            byte[] utf8 = s.getBytes("UTF-8");
            System.out.println (new String(utf8));
            }
            catch(Exception ex)
            {
              return -1;
            }
            return 1;
    }
    
    };
    
  • Connectivity to MS Access database with java in vista Home premium 64-bit

    I made a dsn in vista home premium(64-bit) using Windows\syswow64\odbcad32.exe, to connect MS Access database to java, but the performance of the prog in java, it gives an error (no such driver found)

    Means of access:

    http://answers.Microsoft.com/en-us/Office/default.aspx

    Office at the above link forums

    http://social.answers.Microsoft.com/forums/en-us/addbuz

    Access support at the link above.

    They will help you with your questions of access when repost you in the Office Forums above.

    At soon Mick Murphy - Microsoft partner

  • How to save the password encrypted in the database using database authentication (weblogic server)

    Hi Experts,

    JDEV version 11.1.1.7.0

    I have a usecase where I use database authentication in my Application.

    However if I save the module to record user password. Its economy without encryption. Can U suggest how can I do this

    Thank you

    Roy

    Please see

    https://docs.Oracle.com/CD/E16162_01/user.1112/e17455/dev_secure_apps.htm#OJDUG1168

  • I used to work with Interbase and Firebird and used databases the keyword "domain". I am now switchig to Oracle as a primary database and would like to find an alternative appropriate "domain" in Oracle, as it appears he does ' t taken in charge the stand

    I used to work with Interbase and Firebird and used databases the keyword "domain".

    I am now switchig to Oracle as a primary database and would like to find a suitable

    Variant of 'area' in Oracle such that it appears he does ' t support the standard SQL syntax.

    for example:

    Create the int2 smallint field;

    create domain id2 int2 default 0 not NULL; / * for the primary key * /.

    create domain rel2 int2 default 0 not NULL; / * foreign key * /.

    I tried a couple of approaches to achieve this "area" is:

    1. create synonym - cannot be used with the basic types;

    2. create the type - type of work, but the implementation is rather clumsy

    and can be costly in terms of performance.

    Is there something else to Oracle that can emulate the feature "domain"?

    Thanks in advence, I got really approciate any help on this.

    Alex.

    Your best approximation is CREATE TYPE, but their is nothing of what is a 100% adjustment.

    For example, if you create a domain with a check constraint you need to implement than separately on each table.

  • Caveat when using Mobile Server Java Api Java

    Hi, I have done some java applications to manage users, etc. for Mobile Server 11.3 pub point.  In the console I have use to run java code, I still got the message as:

    Butcher: WARNING: GENERAL: TID$ $ already exists for NomUtilisateur1, ignored

    Butcher: WARNING: GENERAL: TID$ $ already exists for the USER name, ignored

    These messages change depending on the task that I do.  I had the same programs with Olite 10 G java api and I did not have these messages.

    The messages I get are only WARNING and the operation I do work even if messages is displayed.  Does anyone know how to get rid of these messages?

    Thank you

    I found the problem.  I used the jar coming from the server instead of the jar from the MDK (Mobile Development Kit).  Using those to remove MDK all messages.

  • y at - it anyopen web source engine rendering that I can use in my java web browser project

    is there an engine open source web made (that supports html 5, css 3, javascript etc.) that I can use in my java web browser project

    WebKit is quite credible

    The WebKit Open Source project

  • why we use the symbol $ java variable?

    his_$ account_tota, $ b... can u give an explanation for this variable. What is the symbol of $ use? Why we use the symbol $ java variable...
    I need a clear and simple explanation for example...: P

    No real reason, you can do it if you want. But you don't have to - I certainly didn't, and I rarely see code it does.

    You should take the time to find a way to find information. For example, I just typed 'java variable dollar' in google and ended up with this as the first shot:

    http://docs.Oracle.com/javase/tutorial/Java/nutsandbolts/variables.html

    I quote:

    "In addition, the character dollar sign, by convention, is never used at all."

  • Using Webworks database in Java.

    Hi all.

    Just a quick question. Is it possible to use/access/write in a database created by an application of webworks (using javascript) in a java application built eclipse?

    I've already tried it and of course it is encrypted. I tried to copy the file, open a file connection and copy the data from the original file to the copy and then open the copy, as other people mentioned, but it is always encrypted. I believe that this method is only to overcome a java built the database previously saved on a SD card that uses only the card encryption.

    Of what my research has shown is that webwork applications automatically encrypt it to the databases. So I'm assuming that only a webworks application can decrypt this type of database and there is no way that a created Java application will be able to access. I hope that's not true!

    Thanks for your time guys!

    Rob

    According to http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Database-problem-in-the-webworks, the PB is encrypted and cannot be opened with the key stored in the webworks app.

  • Query of database MySQL JAVA

    I want to develop a simple application for blackberry that allows me to send and receive data from a MySQL server. I don't know if Java Mobile Programming, but know that I need some kind of web service/servlet. I tried to find out how I can do this in tutorials/forums blackberry but without success. Basically I want to query a MySQL database from a blackberry and want to the returned result. Someone can tell me how can I do that or provide examples of code? Or offer easier alternatives?

    I would recommend looking up in the forum, similar questions have been asked several times before.

    In particular, I think you might find this useful thread:

    Need help: database server

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=58622&query.ID=33...

  • How you specify eclipse to use 32-bit java

    Hi all

    I am fairly new to the development of java application development and I can't pretend to be an expert on java, but I'd really like to start on this. I searched the forums but I can't seem to find a definitive solution to my problem.

    I understand that blackberry currently supports only 32-bit java and eclipse 32 bits. I'm running a 64-bit Windows 7 machine and I am trying to get this set-up.

    I know that the easiest way is to install these two on my machine, but as much as I always would also have java 64 bit on my machine. I currently have the 32-bit JDK and 64-bit JDK in different directories in my machine.

    Is it possible for me to specify what java to use when I develop my apps in Eclipse?

    Or I'll just get out of the track and there is actually a much simpler solution for this?

    IV tried to use a real operating system 32-bit, but it really worked for me because the default virtual gfx drivers cannot support simulators.

    Please advise!

    See you soon,.

    Ian

    You must specify the virtual machine in the eclipse.ini.

    Take a look at my one. I have the joint as a .txt (forum dislike the .ini files)

  • Default value using ADFLogger.createADFLogger (java.lang.Class p1)

    Hello world

    I tried to understand how the new logger is created and initialized. When we use the "ADFLogger.createADFLogger (java.lang.Class c1)" method to create a log, the default logging level is initialized to null. But when I tried to investigate it, it is found that an instance of java.util.Logger is created with the default recording for the RECORD level.

    Question: How is the default logging level is changed to null? Should not the instance of ADFLogger has some default logging level...?

    Thank you

    I checked this and the answer lies in the javadoc

    getLevel

    java.util.logging.Level public getLevel()

    Download the log level that has been specified for this recorder. The result can be null, which means that they will leave to effective level of this recorder to its parent.

    Returns:

    level of this recorder

    So if you get null, it means that you inherit the MOM logging level. As the recorder build a tree you must back up the tree (using getParent()) until you get the recorder that returns a level not null.

    Timo

  • EN the error using the grid java.rmi.UnmarshalException

    Hello


    I started using Hyperion Financial Reporting on the remote machine and now I installed it on my machine.

    Everything was ok during the installation process. Then I tried to create a new report with a new grid. When I click on the button, EN gives me the following error:


    ********


    ; nested exception is:

    java.rmi.UnmarshalException: error demarshalling return; nested exception is:

    java.io.InvalidClassException: com.hyperion.reporting.graphics.GridObject; incompatible local class: stream classdesc serialVersionUID =-1288366423950156093, local class serialVersionUID =-5245705824007679661

    ********

    Can someone explain to me what I can do to fix this error?

    In my experiences, it gives me this error when a report have a grid or when I try to create a.

    It is perhaps at a level different patch, EN can be sometimes not work so well when the client and server versions do not match.

    See you soon

    John

    http://John-Goodwin.blogspot.com/

Maybe you are looking for