Java application with classes to Applet?

Hello,
First, I'm a Java junior, but I can make efforts to analyse and understand code.
I saw an interesting open-source multiplayer poker java application: [JiBi's Hold'Em|http://sourceforge.net/projects/jibisholdem/]
I would like to try to add it as an Applet on my server, but I have some questions.
1- Do you think it is possible to make it fully works as an Applet (eg: through a proxy), as it seems to use a specific protocol and many classes?
2- I tried the idea of GumB: http://forums.sun.com/thread.jspa?threadID=390846&start=13&tstart=0
with getContentPane().add( new javaApp().getContentPane()but I have the following error message:
I also tried with imports (import holdem.core.Card;etc) and with HoldEmClientGUI().getContentPane() or holdem.gui.HoldEmClientGUI().getContentPane()
D:\JiBisHoldem\src\holdem\gui\HoldEmApp.java:7: cannot find symbol
symbol  : class HoldEmClientGUI
location: class HoldEmApp
        getContentPane().add( new HoldEmClientGUI().getContentPane() );
                                  ^
1 errorAm I close or really far from a working result?
Thanks
John.

The above way seems to have the same result as getContentPane().add( new javaApp().getContentPane().
Here is my HoldEmClientGUI.java (I have commented unused lines like title):
package holdem.gui;
import holdem.core.Card;
import holdem.core.Choice;
import holdem.core.Player;
import holdem.gui.interfaces.ClientGUIInterface;
import holdem.gui.menu.MainMenuBar;
import holdem.gui.panel.PokerChoiceListPane;
import holdem.gui.panel.PokerMainPane;
import holdem.gui.panel.PokerPlayerPane;
import java.awt.BorderLayout;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JApplet;
import sun.audio.AudioPlayer;
import sun.audio.AudioStream;
import tools.AppProperties;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class HoldEmClientGUI extends JApplet {     
     public static void main(String[] args) {
          HoldEmClientGUI app = new HoldEmClientGUI();
          app.init();
          app.start();
     public void init()
          AppletContext ac = null;
          try
               ac = getAppletContext();
          catch(NullPointerException npe)
          //new HoldEmClientGUIFrame(ac);
          new HoldEmClientGUIFrame();
class HoldEmClientGUIFrame extends JFrame implements ClientGUIInterface {
     private static final long serialVersionUID = 1L;
     private String m_mainTitle = "";
     private String m_title1 = "";
     private String m_title2 = "";
     private HashMap<Integer, PokerPlayerPane> m_playerPaneList = null;
     private PokerMainPane m_pokerMainPane = null;
     private MainMenuBar m_pokerMainMenuBar = null;
     private PokerChoiceListPane m_pokerChoiceListPane = null;
     //AppletContext ac;
     //HoldEmClientGUI(AppletContext ac) {
     HoldEmClientGUIFrame() {
          //super();
          //this.ac = ac;
          //Set Icon
          //setIconImage(new ImageIcon(getClass().getResource(AppProperties.getInstance().getProperty("holdem.images.icon.logo"))).getImage());
          m_mainTitle = AppProperties.getInstance()
                    .getProperty("holdem.config.title")
                    + " - v"
                    + AppProperties.getInstance().getProperty(
                              "holdem.config.version");
          //refreshTitle();
          // adding PokerTable
          getContentPane().add(getPokerMainPane(), BorderLayout.CENTER);
          getContentPane().add(getPokerChoiceListPane(), BorderLayout.SOUTH);
          getContentPane().add(getPokerMainMenuBar(), BorderLayout.NORTH);
          // init playerPaneList
          m_playerPaneList = new HashMap<Integer, PokerPlayerPane>();
          //setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          // setSize(200, 100);
          /* Add the window listener */
          addWindowListener(new WindowAdapter()
               public void windowClosing(WindowEvent evt)
                    dispose();
                    if (AppletApplicationFrame.this.ac == null)
                         System.exit(0);
          setVisible(true);
          pack();
     private void refreshTitle(){
          //setTitle(m_mainTitle+m_title1+m_title2);
     private PokerMainPane getPokerMainPane() {
          if (m_pokerMainPane == null) {
               m_pokerMainPane = new PokerMainPane();
          return m_pokerMainPane;
     private PokerChoiceListPane getPokerChoiceListPane() {
          if (m_pokerChoiceListPane == null) {
               m_pokerChoiceListPane = new PokerChoiceListPane();
          return m_pokerChoiceListPane;
     private MainMenuBar getPokerMainMenuBar() {
          if (m_pokerMainMenuBar == null) {
               m_pokerMainMenuBar = new MainMenuBar();
          return m_pokerMainMenuBar;
     public void addPlayer(Player player) {
          PokerPlayerPane playerPane = new PokerPlayerPane();
          playerPane.initPlayer(player.getId(), player.getSeatNumber(), player
                    .getNickname(), player.getStack(), player.getPlayerType());
          getPokerMainPane().addOnSeat(playerPane, player.getSeatNumber());
          m_playerPaneList.put(player.getId(), playerPane);
     public void setPlayerCardHighlighted(boolean highlighted, int playerId,
               int cardNumber) {
          PokerPlayerPane playerPane = getPlayerPaneByPlayerID(playerId);
          if (playerPane != null) {
               playerPane.setCardHighlighted(highlighted, cardNumber);
     public void setTableCardHighlighted(boolean highlighted, int cardNumber) {
          m_pokerMainPane.setCardHighlighted(highlighted, cardNumber);
     public void setAllCardsHighlighted(boolean highlighted) {
          ArrayList<PokerPlayerPane> playerPaneList = new ArrayList<PokerPlayerPane>(
                    m_playerPaneList.values());
          for (int playerCounter = 0; playerCounter < playerPaneList.size(); playerCounter++) {
               playerPaneList.get(playerCounter)
                         .setCardHighlighted(highlighted, 0);
          m_pokerMainPane.setCardHighlighted(highlighted, 0);
     public Choice displayChoices(ArrayList<Choice> choiceList) {
          return getPokerChoiceListPane().displayChoices(choiceList);
     public void displayAsyncMsg(String msg) {
          getPokerMainPane().displayTempoMsg(msg);
     public int getBetValue() {
          return getPokerChoiceListPane().getBetValue();
     public void addCardToPlayer(int playerId, Card card) {
          PokerPlayerPane playerPane = getPlayerPaneByPlayerID(playerId);
          if (playerPane != null) {
               playerPane.addCard(card);
     public void addCardToTable(Card card) {
          getPokerMainPane().addCardToTable(card);
     public void removeCardsFromPlayer(int playerId) {
          PokerPlayerPane playerPane = getPlayerPaneByPlayerID(playerId);
          if (playerPane != null) {
               playerPane.removeCards();
     public void removeCardsFromPlayers() {
          ArrayList<PokerPlayerPane> playerPaneList = new ArrayList<PokerPlayerPane>(
                    m_playerPaneList.values());
          for (int playerCounter = 0; playerCounter < playerPaneList.size(); playerCounter++) {
               playerPaneList.get(playerCounter).removeCards();
     public void removeCardsFromTable() {
          getPokerMainPane().removeCards();
     private PokerPlayerPane getPlayerPaneByPlayerID(int playerID) {
          PokerPlayerPane foundPlayerPane = (PokerPlayerPane) m_playerPaneList
                    .get(playerID);
          return foundPlayerPane;
     public void setButton(int seatNumber, int buttonType) {
          m_pokerMainPane.setButton(seatNumber, buttonType);
     public void setConnectionStatus(boolean isConnected, String nickname) {
          m_pokerMainMenuBar.setConnectionStatus(isConnected);
          m_title1 = " - " + nickname;
          if (isConnected) {
               m_title1+=" is Connected";
          } else {
               m_title1+=" is not Connected";
          refreshTitle();
     public void setPot(int potValue) {
          getPokerMainPane().setPot(potValue);
     public void setPlayerStack(int playerID, int newStack) {
          PokerPlayerPane playerPane = getPlayerPaneByPlayerID(playerID);
          if (playerPane != null) {
               playerPane.setStack(newStack);
     public void setCurrentBetValue(int playerID, int betValue) {
          PokerPlayerPane playerPane = getPlayerPaneByPlayerID(playerID);
          if (playerPane != null) {
               playerPane.setCurrentBet(betValue);
     public void setPlayerAction(int playerID, int PLAYER_ACTION) {
          PokerPlayerPane playerPane = getPlayerPaneByPlayerID(playerID);
          if (playerPane != null) {
               playerPane.setAction(PLAYER_ACTION);
     public void playSound(int ACTION) {
          String soundPath = "";
          switch (ACTION) {
          case ClientGUIInterface.ACTION_ALLIN: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.chips.allin");
               break;
          case ClientGUIInterface.ACTION_BET: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.chips");
               break;
          case ClientGUIInterface.ACTION_CALL: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.chips");
               break;
          case ClientGUIInterface.ACTION_RAISE: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.chips");
               break;
          case ClientGUIInterface.ACTION_PAY_SMALL_BLIND: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.chips");
               break;
          case ClientGUIInterface.ACTION_PAY_BIG_BLIND: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.chips");
               break;
          case ClientGUIInterface.ACTION_CHECK: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.check");
               break;
          case ClientGUIInterface.ACTION_FOLD: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.fold");
               break;
          case ClientGUIInterface.ACTION_DEAL_CARDS: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.card");
               break;
          case ClientGUIInterface.ACTION_REMOVE_CARDS: {
               soundPath = AppProperties.getInstance().getProperty(
                         "holdem.sounds.remove_cards");
               break;
          default: {
          if (soundPath != null && !soundPath.trim().equals("")) {
               try {
                    AudioPlayer.player.start(new AudioStream(getClass()
                              .getResource(soundPath).openStream()));
               } catch (IOException ioe) {
                    System.err.println("Unable to play sound:\n" + soundPath
                              + "\n\n" + ioe);
     private void displayBlindValues(int curSB, int curBB, int nextSB, int nextBB){
          //m_title2=" - "+curSB+"/"+curBB+" (next values "+nextSB+"/"+nextBB+")";
          //refreshTitle();
     public void raiseBlinds(int curSB, int curBB, int nextSB, int nextBB){
          displayBlindValues(curSB,curBB,nextSB,nextBB);
}The error when calling HoldEmClientGUI.class (I have 2 files HoldEmClientGUI.class and HoldEmClientGUIFrame.class, is it normal?):
java.lang.VerifyError: (class: holdem/gui/menu/MainMenuBar, method: handleSettingsItem signature: ()V) Incompatible argument to function
     at holdem.gui.HoldEmClientGUIFrame.getPokerMainMenuBar(HoldEmClientGUI.java:145)
     at holdem.gui.HoldEmClientGUIFrame.<init>(HoldEmClientGUI.java:95)
     at holdem.gui.HoldEmClientGUI.init(HoldEmClientGUI.java:54)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)MainMenuBar.java:
import holdem.gui.dialog.ClientInputDialog;
import holdem.gui.dialog.ServerInputDialog;
import holdem.gui.dialog.SettingsDialog;
     private void handleSettingsItem() {
          new SettingsDialog(getHoldEmClientGUI());
     private HoldEmClientGUI getHoldEmClientGUI() {
          HoldEmClientGUI gui = null;
          Container curContainer = this;
          do {
               curContainer = curContainer.getParent();
          } while (curContainer instanceof Container
                    && !(curContainer instanceof HoldEmClientGUI));
          if (curContainer instanceof HoldEmClientGUI) {
               gui = (HoldEmClientGUI) curContainer;
          return gui;
     }I think the problem comes from private HoldEmClientGUI getHoldEmClientGUI() but I don't know what is wrong in it.
Edited by: Quezako on Oct 14, 2008 7:51 AM

Similar Messages

  • Getting notification back to java application with Goldengate

    Hello,
    I am new to using Golden Gate. I have a java application running in an application server environment using Oracle database. We plan to use Goldengate to receive data directly in the database from external database. I have few questions in using goldengate:
    1. Is there a way for my application to know that database change to a table has happened?
    2. I came across goldengate and jms notification. Is there a non-jms way using java API for my application to know real-time that change has happened to database table?
    3. Are there any samples for this type of feature?
    Thank you.

    There is a Java API that can be used directly, rather than just using the built-in JMS delivery.
    The way it works: "extract" reads a trail, as the data is read, events are generated, and your custom event handler can receive these events. Types of basic events are "transaction begin", "new operation (insert, update, delete)", "transaction commit". These events are basically replaying what has happened on the source database; so, for example, if on the source DB you have "begin tx" + "insert" + "update" + "commit", then your custom Java event handler will receive an event for "begin tx", "insert", "update" and "commit".
    One thing to consider early on: the event handlers can work in one of two "modes". Either an entire source database transaction can be cached in memory and processed at once, OR you can process one operation at a time. The latter is typically preferable, since any DBA or batch job can be executed on the source DB that updates a few million rows at once, which could cause your JVM to run out of memory in "transaction mode" as it tries to cache this in memory. On the other hand, in "operation mode" you only need enough memory to hold one operation at a time, but you don't know what operations have already happened or what will happen. In "operation mode" you are free to cache your own data in your custom event handler, though -- as much or as little as you need.
    Note: GoldenGate only captures committed transactions, so you won't ever receive rolled back database transactions; however , there may be "interruptions" in the GG trail if/when a GG process abends & restarts. This puts a virtual "rollback" into the trail (technically, it's a restart/abend marker) which a GG replicat fully understands. The GG user-exit API prior to v11.2 does not pass RestartAbend events to any user-exits -- including the Java adapter. Long story short, your source "extract" (the one capturing changes from the source DB) must create trails with the "Format Release 9.5" qualifier, or (equivalently) specify "RecoveryOptions OverwriteMode". If you do this, then there will be no "restart/abend" markers in the trail. However, under certain (odd) circumstances, it may not be entirely possible to create trails in this format. The format 10+ trails (aka "RecoveryOptions AppendMode") are slightly more resilient to system failures, and do have additional file header info that is not available in "format 9.5" trails. Although GG 11.2 is available, the user-exits (the Java adapter & flat-file writer) that use this new API are presently not yet generally available.
    Ok, with the caveats out of the way, here's a code sample:
    package tst;
    import com.goldengate.atg.datasource.*;
    import com.goldengate.atg.datasource.GGDataSource.Status;
    public class HelloWorldHandler extends AbstractHandler {
      private long numTxs = 0;
      private long numOps = 0;
      private long numCols = 0;
      @Override
      public Status operationAdded(DsEvent e, DsTransaction tx, DsOperation operation) {
        super.operationAdded(e, tx, operation);
        numOps++;
        numCols += operation.getNumColumns();
        return Status.OK;
      @Override
      public Status transactionCommit(DsEvent e, DsTransaction tx) {
        super.transactionCommit(e, tx);
        numTxs++;
        return Status.OK;
      @Override
      public String reportStatus() {
        String s = "Processed (mode='" + getMode() + "')" + " transactions=" + numTxs
                  + ", operations=" + numOps + ", columns=" + numCols;
        return s;
    }That's about as basic as it gets. It will print out number of operations processed to the report file (dirrpt/*.rpt). The Java user-exits typically are an "end point" for the data stream (that's what the "CuserExit... PassThru" option means), so this example isn't terribly useful by itself. Typically you would send the data somewhere else (like the JMS handler, or a file-writer) or update some other system with these events.
    Btw, there are also a few helper classes to merge metadata (column/table names) and data (column "before" and "after" data). The "DsTransaction" and "DsOperation" and "DsColumn" classes are just "data". The following wrapper classes also provide metadata (Tx, Op, Col):
      import com.goldengate.atg.datasource.adapt.*;
      Tx tx = new Tx(dsTransaction, getMetaData(), getConfig());
      //or:  Op op = new Op(dsOperation, tableMeta, getConfig());
         for(Op op: tx) {
              for(Col c: op) { ... }
      }See the javadoc that comes with the software download for details (javadoc.zip).
    To compile and use (preferably creating a jar; I'm assuming you put it in "dirprm" (see below)):
    $ javac -d classes -cp {gg_home}/ggjava/ggjava.jar HelloWorldHandler.java
    $ jar -cvf myCustom.jar ...etc...Your extract ("pump") parameter file that loads and runs your custom Java user-exit event handler:
    Extract javaue
    SourceDefs dirdef/tc.def
    SetEnv ( GGS_USEREXIT_CONF = "dirprm/javaue.properties" )
    GetEnv (JAVA_HOME)
    GetEnv (LD_LIBRARY_PATH)
    -- CUserExit ggjava_ue.dll CUSEREXIT PassThru IncludeUpdateBefores
    CUserExit libggjava_ue.so CUSEREXIT PassThru IncludeUpdateBefores
    GetUpdateBefores
    -- must pass all data to user-exit, or
    -- else tx indicators might be missed
    TABLE GGS.*;
    TABLE EXAMPLE.*;And the referenced properties file could look like the following. There are really two parts to this file; the first part is used to configure the Java application, the second is used to configure the JNI bridge between the JVM and "extract".
    # Java application properties
    gg.handlerlist=mytest
    # your custom event handler.
    # note: setting property foo=bar automatically calls your handler's method setFoo("bar")
    gg.handler.mytest.type=tst.HelloWorldHandler
    gg.handler.mytest.foo=bar
    gg.handler.mytest.mode=op
    # gg.handler.mytest.mode=tx
    # Properties for native library ("C" User Exit)
    # set to TRUE to *disable* the duplicates-checkpoint-file
    goldengate.userexit.nochkpt=TRUE
    # duplicates-checkpoint-file prefix
    goldengate.userexit.chkptprefix=JAVAUE_
    # tx timestamp datatbase local (default) or UTC timestamp
    goldengate.userexit.timestamp=utc
    # C-user-exit logging config for native library *only*.
    # Java app uses log4j config in javawriter.bootoptions.
    goldengate.log.modules=TXSTORE,JAVAWRITER,JAVAUSEREXIT
    goldengate.log.level=INFO
    goldengate.log.tostdout=false
    goldengate.log.tofile=true
    # prefix for native library logfile name
    goldengate.log.logname=cuserexit
    goldengate.userexit.writers=javawriter
    # native lib statistics, defaults: time=3600, numrecs=10000
    #   display=false (doesn't write to file)
    #   full=false (would not include java report)
    javawriter.stats.time=3600
    javawriter.stats.numrecs=100
    javawriter.stats.display=TRUE
    javawriter.stats.full=TRUE
    # Set classpath to required jars.
    #    Use ':' path separator for Unix, ';' for windows.
    # Set the log4j configuration -- note this found in the classpath.
    #    See the example preconfigured log4j files in ggjava/resources/classes,
    #    copy to dirprm and rename, then customize as desired. (Don't put or
    #    modify files in the ggjava/* directory.)
    javawriter.bootoptions=-Xmx64m -Xms32m -Djava.class.path=dirprm:ggjava/ggjava.jar:dirprm/myCustom.jar -Dlog4j.configuration=log4j.propertiesNote that the property "bootoptions" includes "myCustom.jar" to find your class. You can use your custom log4j config as well (e.g., my-log4j.properties); put it in "dirprm" as well and it will be found in the classpath.
    See also the GoldenGate Java docs for a little more on this topic:
    * http://www.oracle.com/technetwork/middleware/goldengate/documentation/index.html => http://docs.oracle.com/cd/E18101_01/index.htm
    Hope it helps,
    -Michael
    Edited by: MikeN on Jun 20, 2012 10:34 PM - notes on trail format compatibility

  • Issue with Java Application with ECC - Connection Issue

    Hi
    We have developed one java application to connect to SAP to extract some data. We are using java API (sapjco) to connect to the SAP. Now we are facing one issue u2013 for the ECC while connecting through the java application we are getting u201CUserid or Password incorrect erroru201D, but with the same userid and password we are able to log through the SAP GUI. If we changed the password with all CAPS (Capital Letters) and without numeric values, its working fine in java application (Means its connecting to ECC)
    We are facing this issue only in ECC; the same application is running successfully in SAP 4.7 etc. without changing password.
    Please Help!

    I would draw the conclusion that you have to provide the paaword in upper case. There is a standar java method there that does this for you. Just do it before sending the password.
    Regards,
    Benny

  • Create Java application with Essbase

    Dear Experts
    I have a demand for a potential client.
    Where I believe it is best to implement an application with Java or APEX another relational database and Essbase.
    How Hyperion Planning and others.
    But not using Hyperion Planning.
    How would integrate it with Essbase?
    How should I build a Java application without losing any of Essbase?
    Anyone ever done this?
    What documentation should I read about this?
    Many questions and design challenges.
    Thanks for all

    Dear J.M. and Evgeniy.Rasyuk
    Its many useful responstas way.
    J.M.
    I do not believe that Oracle would take steps for me create a Hyperion Planning. -ok.
    Then all the resources used by Planning and other apps should be available for APIs and MaxL or otherwise connect, execute and monitor Essbase Database.
    I believe there is a significant demand for this scenario using technology Essbase.
    It's a big four who has requested an opinion on this.
    Thank you,
    MMB

  • Profiling a java application with HPjmeter

    I have a java application and i want to identify the performance problems .
    I'm doing a static analyze and a dinamic analyze.
    For the dinamic analyze everything work ok.In the command line i have the options:
    java -agentlib:hjmeter name
    When i want to have a static analyze i have the option:
    java -agentlib:hprof name
    or
    java -Xrunhprof name
    But i get the following error message:
    hprof error:can't create temp heap file: java.hprof.txt.TMP[../../../src/share/demo/jvmti/hprof/hprof_init.c :775]
    My application is running on a HP-UX server:
    java version "1.5.0.03"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.03-_13_feb_2006_16_39)
    Java HotSpot(TM) Server VM (build 1.5.0.03 jinteg:02.13.06-15:51 PA2.0 (aCC_AP), mixed mode)
    Can anybody help me with some sugestions?
    Thank you!

    inside Java Studio Enterprise/Netbeans stack of tools this functionality is implemented as NetBeans Profiler
    http://profiler.netbeans.org/
    The Profiler hasn't been a part of default Netbeans distribution. The JSE8 is based on NB4.1. Profiler compatible with NB4.1 is an early-access Milestone release, and thus i'd recommend to consider more recent version of the Profiler, the one for NB5.x (though you'd need to install NB5 also).

  • How to ran a java application with out console?

    Hi
    I have developed several applications using java. I'm trying to run them on windows platform. The way I run them now is by openning a CMD window and by typing java -jar myjarfilename.jar
    This way cmd window remains on windows taskbar/desktop untill I close the java application.
    Is there any other way to run .jar files on windows?. Am I using a wrong compilation tool?
    Basicaly is there a way to run an application developed using java or .jar files like a normal win32 application (By dobble clicking on an icon)
    Please help.
    Thanks.

    If you install the JRE, it associates itself with jar files, thus allowing you to double click on them to run. Other than that, if you want to be able to double click on an app for it to run, you will have to write a native wrapper around the JVM.
    Now, to run your app. making the command window dissapear, all you need to do is invoke the command with javaw.exe, instead of java.exe (notice the W in the first .exe). This runs java without a command window. If you still have your command window appear, prepend "start" to the call to javaw.exe. E.g.:
      start javaw.exe -jar myjar.jar
    HTH,
    Manuel Amago.

  • Distributing a java application with fewer files

    I'd like to distribute an application with the JRE but would like to reduce the number of files in the distribution. The JRE alone requires several JARs and other license files. Can the JRE be repackaged into a consolidated JAR with my application without breaking the licensing rules?
    thanks,
    Paul

    This does not sound like a Java problem. Go into your W7 control panel and make sure the ODBC driver is correct. Make a new DSN for your system and see if you can connect. You may have to reinstall the ODBC, it souds like something there is having a problem.

  • Interfacing java application with digital camera

    Dear all,
    I've a question and I need your help.
    I've my swing/javafx application and I need to interface it with a digital camera.
    How should I proceed? How can I understand which digital camera offers support for java integration?
    Do you have some model for me?
    Thanks

    I don't know anything about using Java directly with digital cameras. However I have a few observations. When you say you want to interface Java with a digital camera, do you mean you just want to display the image in a Java application? If so, you can use the software that came with the digital camera to download the images as *.jpeg (or whatever) to the hard disk. Then you can use Java to easily read the files from the hard disk and display them or move them to some other location. For instance, when you display them in Java, then you can then ask the user to fill out various textfields to go along with the image such as giving a title to the image or a description.
    If instead you want to write Java to grab the images from the camera directly, I think that's a bad idea. I imagine different digital cameras have uniquely written custom software to communicate between the digital camera and say, Windows 7 (I'm guessing). I doubt all the manufacturers have agreed upon a common way to communicate. Therefore if you take this route, you will end up creating a large set of Java programs to communicate with each model of camera. A maintenance nightmare.
    However, I have seen applications such as taking passport photos that appear to communicate directly with a digital camera wired to the computer which I imagine the vendor supplied with the application.

  • Deploying application with class files compiled using ojspc

    Hi,
    I want to deploy the application having class files compiled using ojspc in Oracle9iAS Release 2 rather than having JSP pages.
    Thanks,
    Pritam

    Hi Manoj,
    I have tried doing something like this.
    If you want to try this out running on a NW2004s.You need to first download the entire project from perforce branch (
    tc\webdynpro\clientserver)for NWDS 7.0 and then build the project locally in your java perspective.
    During the local build of the project.It will also point out the dependent projects required by this project(clientserevr).
    Once the project is build.
    Create seperate external jars of the clientserver project and its dependent projects and save them locally.
    Open your SDM manager,pick up this jar file from there and deploy it.
    Once the deployment is over, the server is ready to run the application you created.
    But this make your NWDS2004s to behave jus like NWDS7.0 .
    Just a small suggestion ,instead of going through this tedious process you can shift to NWDS7.0 itself.
    regards
    aarthi mathivanan

  • How can I run a Java-Application with a Desktop-Icon ?

    Hello,
    I have got a problem: I want my Java-application directly by clicking on a desktop icon. Is there anybody who can tell me how to do so ? (I don't want to change my application into an exe File !!!).
    It would be nice if you could give me a detailed explanation (or a link to thus) because I'm not used to the Windows-Classpath System (...as far as I need this...I don't know).
    Thank you very much,
    Findus

    Ok...in the syntax just postet I forgot to set the absolute path of the file...but eveb if I do so it does not work...here the variations I tried...
    D:\j2sdk1.4.1_01\bin>java D:\Viever\Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:\Viever\Gui
    D:\j2sdk1.4.1_01\bin>java D:/Viewer/Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:/Viewer/Gui
    D:\j2sdk1.4.1_01\bin>java D:\Viewer\Gui.class
    Exception in thread "main" java.lang.NoClassDefFoundError: D:\Viewer\Gui/class
    D:\j2sdk1.4.1_01\bin>java D:Viewer/Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:Viewer/Gui

  • New JAVA application with data from SAP CRM and R/3

    Hi All,
    We have a requirement to create a new application which will have CRM BP Master data and D&B Data from R/3 and based on authorization different roles be able to edit some of the fields and workflows to confirm the new data .Once users edit the fields in the application the new data will be replicated back into BP Master Data in CRM.
    In our company we are using CRM 7.0 and R/3 4.7 system if we decided to create the application using JAVA can you please let me know the architecture(servers etc) we might need because of the JAVA application.
    How to connect Java application to SAP CRM 7.0. Can you please guide me the data flow structure
    I am not sure if this is the right forum if not please suggest appropriate forum.
    Thanks a lot ,
    Kitcha.

    Hi,
    You can connect to SAP Systems by consuming the RFCs.
    you can use the JCO API to connect to R/3. the [documentation |http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm]
    alternatively  you can use SAP Enterprise Connector to generate JCO Proxies : [The Documentation|http://help.sap.com/saphelp_nw04/helpdata/EN/ed/897483ea5011d6b2e800508b6b8a93/frameset.htm]
    and somr more helps:
    http://help.sap.com/saphelp_nw04/helpdata/en/89/8a185c148e4f6582560a8d809210b4/frameset.htm
    Regards,
    Naga

  • How to connect Java Application with database!

    Dear all, now I am create a dababase application. My database use JData Store. But I don't know how to connect application with it. Can you tell me this proplem?
    Thank!

    Do a google search for JDBC, or go buy a book.
    You will need a JDBC driver which supports your database. Or you might be able to use the JDBC-ODBC bridge if there's an ODBC driver for your database.

  • Looking for a Java USA Map class or applet

    Hi,
    I need to display a gif (or applet) of the USA and be able to color states different colors. Does anyone know of a simple class or applet that will do this?

    Email me
    [email protected]

  • Making jar file for java application with third party (Crystal Report)

    Hi all,
    I'm writing a java program that integrate with Crystal Report, I can run it in JBuilder fine, but when I try to make a jar file with JBuilder and run it, it either doesn't work or give me error.
    Case 1: If i only include the "dependencies", the program run but it woun't call the report when I open it. It give me the following error:
    com.businessobjects.reports.sdk.JRCCommunicationAdapter
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects.reports.sdk.JRCCommunicationAdapter---- Error code:-2147215357 Error code name:internal
         com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(ILjava.lang.String;)V(Unknown Source)
         com.crystaldecisions.proxy.remoteagent.z.a(Ljava.lang.String;)Lcom.crystaldecisions.proxy.remoteagent.ICommunicationAdapter;(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.ReportAppSession.int()V(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.ReportAppSession.initialize()V(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.ClientDocument.for()V(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.for()V(Unknown Source)
         com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(Ljava.lang.Object;I)V(Unknown Source)
         com.crystaldecisions.reports.sdk.ReportClientDocument.open(Ljava.lang.Object;I)V(Unknown Source)
         GOV.NE.REVENUE.LB775.CRYSTALREPORT.JRCViewReport.launchApplication(JRCViewReport.java:43)
         GOV.NE.REVENUE.LB775.LB775$5.actionPerformed(LB775.java:1114)</message>
    case 2: if I include the "dependence and resources" when create jar file, then the program won't run. It gives me a message:
    Cannot find main class. Program will exit.
    But I do have the manifest.mf file that contain the main class.
    Thank you very much for any help.

    Hello, I have the same problem, did you solved it?
    Thanks

  • Help with class in applet

    So im just starting java, about 12 weeks in.
    So in my class we are getting started with objects. What i want to do is create a class called car, and have it create a new car and draw images loaded, and then have the tires rotate, there are 2 images,
    the car base and the tires.
    I know how to display images in applets, but i dont know how to define the images in the objects class and then draw them from the class.

    I get errors with this code from my car class
    import java.applet.*;
    public class car extends Applet{
          * @param args
         private String model;
         private int passangers;
         private double gas,speed;
         private Image tire;
         private MediaTracker tr;
         tr = new MediaTracker(this);
         tire = getImage(getCodeBase(), "tire.png");
         tr.addImage(tire,0);
         public car(String id, int pass, double tank)
              model=id;
              passangers=pass;
              gas=tank;
         public car()
              model="";
              passangers=0;
              gas=0;
         }I get errors on these lines
         private Image tire;
         private MediaTracker tr;
         tr = new MediaTracker(this);
         tire = getImage(getCodeBase(), "tire.png");
         tr.addImage(tire,0);errors
    Severity and Description     Path     Resource     Location     Creation Time     Id
    Image cannot be resolved to a type     Car Game     car.java     line 13     1197077768237     1745
    MediaTracker cannot be resolved to a type     Car Game     car.java     line 14     1197077768238     1746
    Return type for the method is missing     Car Game     car.java     line 16     1197077768239     1750
    Syntax error on token ";", { expected after this token     Car Game     car.java     line 14     1197077768238     1747
    Syntax error on token "(", delete this token     Car Game     car.java     line 17     1197077768239     1752
    Syntax error on token "0", invalid FormalParameter     Car Game     car.java     line 17     1197077768239     1753
    Syntax error on token(s), misplaced construct(s)     Car Game     car.java     line 15     1197077768238     1748
    Syntax error on token(s), misplaced construct(s)     Car Game     car.java     line 16     1197077768239     1749
    Syntax error on tokens, delete these tokens     Car Game     car.java     line 16     1197077768239     1751
    The serializable class car does not declare a static final serialVersionUID field of type long     Car Game     car.java     line 4     1197077768237     1744
    The serializable class main does not declare a static final serialVersionUID field of type long     Applet     main.java     line 5     1196990860997     1682
    The serializable class main does not declare a static final serialVersionUID field of type long     Car Game     main.java     line 5     1197077768196     1743
    The serializable class ShowImage does not declare a static final serialVersionUID field of type long     Display JPEG/src     ShowImage.java     line 4     1196488911896     1393Edited by: jasonpeinko on Dec 7, 2007 5:42 PM

Maybe you are looking for

  • Submit button to local/network folder

    Goal: Place a Submit button on a PDF form that will save a copy of the entire form to a local/network folder. Software: Windows 7, Adobe Acrobat X Pro Per the Adobe Acrobat X Pro help files, it states that you can add a folder path in the URL field w

  • Blue ray component hook up to casio projector with RGB 15 pin input

    need help can not find this cord  VGA to RCA Component RGB Cable.  any ideas

  • Using X11 applications without having xorg-server installed.

    Hello, I have 2 computers in my network: one is a powerful 8 CPU SPARC, the second is quite old and has 4 slow CPUs. I'd like to run graphical applications on this slow server (logging into it via ssh, server doesn't have either vga nor monitor, it's

  • Mapping reuseability

    hi, We are having quite good number of XSLT transformations within our scope. How can we reuse the existing XSLT mappings defined under different software component versions? Lets say can we import XSLT transformation under SWCV1 and can we make use

  • AIA error emails not going out

    Hi All We have setup a QA box and deployed the code. Now while testing found that AIA Error notifications are not being sent incase of remote/binding faults. The same setup was done on Dev box and it works fine. 1. Set the email driver properties fro