PKGBUILD Tips for Funky Java App

I'm trying to make a PKGBUILD for the GURPS character sheet program. It's a Java app, so I tried to follow the Java PKGBUILD guidelines from the wiki, but gcs has a weird build system that made things difficult. The main annoyances are that it tries to include its own JRE, and rather than running using a normal jar it includes a binary launcher for which I can't find the source.
Here's my PKGBUILD that just tries to whip the binary package into shape:
pkgname=gcs
pkgver=4.0.1
pkgrel=1
pkgdesc="An editor for building character sheets for GURPS 4th Edition."
arch=('i686' 'x86_64')
url="http://gurpscharactersheet.com"
license=('MPL')
depends=('java-runtime')
src="$pkgname-$pkgver-linux"
if test "$CARCH" == i686; then
src+='-32'
fi
source=("${src}.zip::http://sourceforge.net/projects/gcs-java/files/${src}.zip/download")
md5sums=('SKIP')
build() {
pushd $srcdir/$src
rm -r support/jre
ln -s /usr/lib/jvm/default/jre support/jre
popd
package() {
install -d $pkgdir/usr/{bin,share}
cp -dr --no-preserve=ownership ${src} $pkgdir/usr/share/gcs
ln -s $pkgdir/usr/share/gcs/gcs $pkgdir/usr/bin/gcs
Am I doing anything stupid?

How are you supposed to configure a package that requires Java 8? Should I not use $JAVA_HOME since that could be pointing to an older version?
Anyway, I've produced a better package, but the build process is still kinda ugly.
I couldn't figure out a way to use ant's bundle (which includes the JRE and the precompiled binaries), so I skipped that entirely and just copied everything myself - that let me use the recommended /usr/share/java organization. But since the app expects everything to be in one directory (with a fixed path), I had to patch it to let me configure the app directory using an environment variable.
Here's a git repo for the files: https://github.com/silverhammermba/gcs
And my new PKGBUILD:
pkgname=gcs
pkgver=4.0.1
pkgrel=1
pkgdesc="A WYSIWYG editor for building character sheets for GURPS 4th Edition."
arch=('any')
url="http://gurpscharactersheet.com"
license=('MPL')
makedepends=('git' 'apache-ant')
depends=('java-runtime')
source=(
'git://code.trollworks.com/apple_stubs.git'
"git://code.trollworks.com/gcs.git#tag=$pkgver"
"git://code.trollworks.com/toolkit.git#tag=$pkgver"
md5sums=('SKIP' 'SKIP' 'SKIP')
prepare() {
cd "$srcdir/toolkit"
git apply "$startdir/set_app_path_from_env.patch"
build() {
cd "$srcdir/apple_stubs"
ant
cd "$srcdir/toolkit"
ant
cd "$srcdir/gcs"
ant
package() {
install -d "$pkgdir/usr/share/java/gcs"
find "$srcdir" -name '*.jar' ! -name '*-src.*' -execdir install -m644 {} "$pkgdir/usr/share/java/gcs" \;
mv $pkgdir/usr/share/java/gcs/gcs-*.jar "$pkgdir/usr/share/java/gcs/gcs.jar"
install -d "$pkgdir/usr/share/gcs"
cp -dr --no-preserve=ownership "$srcdir/gcs/Library" "$pkgdir/usr/share/gcs"
install -Dm755 "$startdir/gcs.sh" "$pkgdir/usr/bin/gcs"
Last edited by silverhammermba (2014-10-01 15:23:13)

Similar Messages

  • Pre verify tool for wireless Java apps - HPUX

    Hi wireless gurus,
    1. Does Oracle ships a pre verify tool for wireless Java apps for HPUX platform with any of it's products.
    2. Please let me know any such tool for HPUX, preferably with a free demo version

    Hi wireless gurus,
    1. Does Oracle ships a pre verify tool for wireless Java apps for HPUX platform with any of it's products.What kind of pre-verify tools are you referring to?
    If you are looking something to verify Java code in general, then Jdeveloper has some features built-in for this purpose.
    The Oracle9IAS Wireless service designer allows you test, try, and debug wireless apps.
    2. Please let me know any such tool for HPUX, preferably with a free demo version

  • Simple Web Frontend for existing Java app

    Hi there!
    (sorry for my english at first ;)
    I have an existing java app which currently is used via command line. It's a server application which mostly does monitoring outputs and functions you can use in the shell are like starting/stopping the server. For these outputs and for starting/stopping and so on i want to create a simple web frontend which gives me the ability to do this.
    What do i need? It would be fine if i do not have to set up a large tomcat server because the program should run out of the box. Of course i want to access the website via the internet (simple login). The whole thing would be about 2-5 simple pages. Best thing would be if i could update the monitoring variables via java script.
    Can i use servlets (not much experience with it so far, that's why i ask :) )? What do i need for the webserver? Can i access my data variables from right from the servlet?
    Thanks in advance,
    kiwaque

    If you are familiar with Swing, I would suggest GWT for the Frontend... you can build and debug the Frontend similar to a Swing App, and then compile it to HTML/CSS/Javascript...

  • Book for selling Java app

    Hows it going?
    I have made a java program that I want to sell via a website which I need to set up and I would like to buy a book which can guide me through this (I have 7 years Java programming experience but no real experience of deployment or websites).
    I need to know:
    * How to allow a user to download a 30 trial version which will then expire unless they buy the app.
    * How to accept payment for the app
    * How to prevent others from just reselling my app themselves (copyright?)
    * How to put a forum on the site
    What I am after is a book that will cover as many of these requirements as possible.
    Can anyone recommend anything?
    Thanks a lot,
    Jim

    Its an application for people learning foreign languages. It doesnt use any database and is a stand alone pure java app. It does write to the users local File system to store the data for the app.

  • OT: Good version control/synchronization program for my Java apps

    Hi,
    I use one of my Java apps on a number of computers in my home, as well as on my work computer. The program is over a meg, but I make changes to it (almost daily) that affect only a few small files. I'd like to find a (preferably free) program that can do something like the following:
    I make a change, then click "update on server." The program sends any modified files (and only modified files) to my web server (whose ftp or ssh information i will have configured in the program).
    Now, when I am on any of computers (which would also have the program I'm looking for installed), I just click "sync to latest version" and it downloads the new files from my server.
    I know Tortoise SVN is supposed to be good for version control, but I can't tell if it can do something like I described above.
    Thanks in advance for any ideas,
    John

    Both Subversion and CVS provide this kind of support. They both have Windows clients that integrate with the Windows file system. For Subversion the commonly used Windows client is Tortoise, for CVS its WinCVS, there are others.
    Subversion is newer and easier to use, but is not supported by as many IDE's as CVS. Eg. JSE8 doesn't support SVN directly, although there is a profile you can install.

  • Configuration for a java app running on Harpertown.

    HI,
    I have a multi-threaded java app with 5-8 user threads. I'm running my application on intel Harpertown m/c with 8 cores.
    Is there a way I could configure my JVM such that I can I can allocate each core to each thread or atleast maximize such a possibility?
    Thanks,

    Please let me know in case my query is misdirected. I'm new to the forums and thought this would be the right place to post this.
    Thanks,

  • How do I set proxy settings for a Java app behind a corporate server?

    I have the source code of a Download Manager program written in Java. It has to be run within my college network in which we use the "Corporate Client" server to access the internet. The HTTP proxy is 172.16.68.6 and Port number is 3128. How do I define these parameters in my java program so that it can download files from the internet?
    The source code for the program is:
    There are four classes:
    1. DownloadManager.java
    2. Download.java
    3. DownloadTable.java
    4. ProgressRenderer.java
    /*__DownloadManager.java__*/
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    // The Download Manager.
    public class DownloadManager extends JFrame
            implements Observer {
        // Add download text field.
        private JTextField addTextField;
        // Download table's data model.
        private DownloadsTableModel tableModel;
        // Table listing downloads.
        private JTable table;
        // These are the buttons for managing the selected download.
        private JButton pauseButton, resumeButton;
        private JButton cancelButton, clearButton;
        // Currently selected download.
        private Download selectedDownload;
        // Flag for whether or not table selection is being cleared.
        private boolean clearing;
        // Constructor for Download Manager.
        public DownloadManager() {
            // Set application title.
            setTitle("Download Manager");
            // Set window size.
            setSize(640, 480);
            // Handle window closing events.
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    actionExit();
            // Set up file menu.
            JMenuBar menuBar = new JMenuBar();
            JMenu fileMenu = new JMenu("File");
            fileMenu.setMnemonic(KeyEvent.VK_F);
            JMenuItem fileExitMenuItem = new JMenuItem("Exit",
                    KeyEvent.VK_X);
            fileExitMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionExit();
            fileMenu.add(fileExitMenuItem);
            menuBar.add(fileMenu);
            setJMenuBar(menuBar);
            // Set up add panel.
            JPanel addPanel = new JPanel();
            addTextField = new JTextField(30);
            addPanel.add(addTextField);
            JButton addButton = new JButton("Add Download");
            addButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionAdd();
            addPanel.add(addButton);
            // Set up Downloads table.
            tableModel = new DownloadsTableModel();
            table = new JTable(tableModel);
            table.getSelectionModel().addListSelectionListener(new
                    ListSelectionListener() {
                public void valueChanged(ListSelectionEvent e) {
                    tableSelectionChanged();
            // Allow only one row at a time to be selected.
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            // Set up ProgressBar as renderer for progress column.
            ProgressRenderer renderer = new ProgressRenderer(0, 100);
            renderer.setStringPainted(true); // show progress text
            table.setDefaultRenderer(JProgressBar.class, renderer);
            // Set table's row height large enough to fit JProgressBar.
            table.setRowHeight(
                    (int) renderer.getPreferredSize().getHeight());
            // Set up downloads panel.
            JPanel downloadsPanel = new JPanel();
            downloadsPanel.setBorder(
                    BorderFactory.createTitledBorder("Downloads"));
            downloadsPanel.setLayout(new BorderLayout());
            downloadsPanel.add(new JScrollPane(table),
                    BorderLayout.CENTER);
            // Set up buttons panel.
            JPanel buttonsPanel = new JPanel();
            pauseButton = new JButton("Pause");
            pauseButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionPause();
            pauseButton.setEnabled(false);
            buttonsPanel.add(pauseButton);
            resumeButton = new JButton("Resume");
            resumeButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionResume();
            resumeButton.setEnabled(false);
            buttonsPanel.add(resumeButton);
            cancelButton = new JButton("Cancel");
            cancelButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionCancel();
            cancelButton.setEnabled(false);
            buttonsPanel.add(cancelButton);
            clearButton = new JButton("Clear");
            clearButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionClear();
            clearButton.setEnabled(false);
            buttonsPanel.add(clearButton);
            // Add panels to display.
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(addPanel, BorderLayout.NORTH);
            getContentPane().add(downloadsPanel, BorderLayout.CENTER);
            getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
        // Exit this program.
        private void actionExit() {
            System.exit(0);
        // Add a new download.
        private void actionAdd() {
            URL verifiedUrl = verifyUrl(addTextField.getText());
            if (verifiedUrl != null) {
                tableModel.addDownload(new Download(verifiedUrl));
                addTextField.setText(""); // reset add text field
            } else {
                JOptionPane.showMessageDialog(this,
                        "Invalid Download URL", "Error",
                        JOptionPane.ERROR_MESSAGE);
        // Verify download URL.
        private URL verifyUrl(String url) {
            // Only allow HTTP URLs.
            if (!url.toLowerCase().startsWith("http://"))
                return null;
            // Verify format of URL.
            URL verifiedUrl = null;
            try {
                verifiedUrl = new URL(url);
            } catch (Exception e) {
                return null;
            // Make sure URL specifies a file.
            if (verifiedUrl.getFile().length() < 2)
                return null;
            return verifiedUrl;
        // Called when table row selection changes.
        private void tableSelectionChanged() {
        /* Unregister from receiving notifications
           from the last selected download. */
            if (selectedDownload != null)
                selectedDownload.deleteObserver(DownloadManager.this);
        /* If not in the middle of clearing a download,
           set the selected download and register to
           receive notifications from it. */
            if (!clearing) {
                selectedDownload =
                        tableModel.getDownload(table.getSelectedRow());
                selectedDownload.addObserver(DownloadManager.this);
                updateButtons();
        // Pause the selected download.
        private void actionPause() {
            selectedDownload.pause();
            updateButtons();
        // Resume the selected download.
        private void actionResume() {
            selectedDownload.resume();
            updateButtons();
        // Cancel the selected download.
        private void actionCancel() {
            selectedDownload.cancel();
            updateButtons();
        // Clear the selected download.
        private void actionClear() {
            clearing = true;
            tableModel.clearDownload(table.getSelectedRow());
            clearing = false;
            selectedDownload = null;
            updateButtons();
      /* Update each button's state based off of the
         currently selected download's status. */
        private void updateButtons() {
            if (selectedDownload != null) {
                int status = selectedDownload.getStatus();
                switch (status) {
                    case Download.DOWNLOADING:
                        pauseButton.setEnabled(true);
                        resumeButton.setEnabled(false);
                        cancelButton.setEnabled(true);
                        clearButton.setEnabled(false);
                        break;
                    case Download.PAUSED:
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(true);
                        cancelButton.setEnabled(true);
                        clearButton.setEnabled(false);
                        break;
                    case Download.ERROR:
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(true);
                        cancelButton.setEnabled(false);
                        clearButton.setEnabled(true);
                        break;
                    default: // COMPLETE or CANCELLED
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(false);
                        cancelButton.setEnabled(false);
                        clearButton.setEnabled(true);
            } else {
                // No download is selected in table.
                pauseButton.setEnabled(false);
                resumeButton.setEnabled(false);
                cancelButton.setEnabled(false);
                clearButton.setEnabled(false);
      /* Update is called when a Download notifies its
         observers of any changes. */
        public void update(Observable o, Object arg) {
            // Update buttons if the selected download has changed.
            if (selectedDownload != null && selectedDownload.equals(o))
                updateButtons();
        // Run the Download Manager.
        public static void main(String[] args) {
            DownloadManager manager = new DownloadManager();
            manager.show();
    This example shows how to create a simple download manager in Java. It contains four classes in foru Java source files:
    Download.java: Contains Download class which downloads a file from a URL.
    DownloadManager.java: Contains the main class for download manager application.
    DownloadsTableModel.java: Contains the class which manages the download table's data.
    ProgressRenderer.java: Contains the class which is responsible to render a JProgressBar in a table cell.
    The contents of the listed files are written below.
    /*__Download.java__*/
    import java.io.*;
    import java.net.*;
    import java.util.*;
    // This class downloads a file from a URL.
    class Download extends Observable implements Runnable {
        // Max size of download buffer.
        private static final int MAX_BUFFER_SIZE = 1024;
        // These are the status names.
        public static final String STATUSES[] = {"Downloading",
        "Paused", "Complete", "Cancelled", "Error"};
        // These are the status codes.
        public static final int DOWNLOADING = 0;
        public static final int PAUSED = 1;
        public static final int COMPLETE = 2;
        public static final int CANCELLED = 3;
        public static final int ERROR = 4;
        private URL url; // download URL
        private int size; // size of download in bytes
        private int downloaded; // number of bytes downloaded
        private int status; // current status of download
        // Constructor for Download.
        public Download(URL url) {
            this.url = url;
            size = -1;
            downloaded = 0;
            status = DOWNLOADING;
            // Begin the download.
            download();
        // Get this download's URL.
        public String getUrl() {
            return url.toString();
        // Get this download's size.
        public int getSize() {
            return size;
        // Get this download's progress.
        public float getProgress() {
            return ((float) downloaded / size) * 100;
        // Get this download's status.
        public int getStatus() {
            return status;
        // Pause this download.
        public void pause() {
            status = PAUSED;
            stateChanged();
        // Resume this download.
        public void resume() {
            status = DOWNLOADING;
            stateChanged();
            download();
        // Cancel this download.
        public void cancel() {
            status = CANCELLED;
            stateChanged();
        // Mark this download as having an error.
        private void error() {
            status = ERROR;
            stateChanged();
        // Start or resume downloading.
        private void download() {
            Thread thread = new Thread(this);
            thread.start();
        // Get file name portion of URL.
        private String getFileName(URL url) {
            String fileName = url.getFile();
            return fileName.substring(fileName.lastIndexOf('/') + 1);
        // Download file.
        public void run() {
            RandomAccessFile file = null;
            InputStream stream = null;
            try {
                // Open connection to URL.
                HttpURLConnection connection =
                        (HttpURLConnection) url.openConnection();
                // Specify what portion of file to download.
                connection.setRequestProperty("Range",
                        "bytes=" + downloaded + "-");
                // Connect to server.
                connection.connect();
                // Make sure response code is in the 200 range.
                if (connection.getResponseCode() / 100 != 2) {
                    error();
                // Check for valid content length.
                int contentLength = connection.getContentLength();
                if (contentLength < 1) {
                    error();
          /* Set the size for this download if it
             hasn't been already set. */
                if (size == -1) {
                    size = contentLength;
                    stateChanged();
                // Open file and seek to the end of it.
                file = new RandomAccessFile(getFileName(url), "rw");
                file.seek(downloaded);
                stream = connection.getInputStream();
                while (status == DOWNLOADING) {
            /* Size buffer according to how much of the
               file is left to download. */
                    byte buffer[];
                    if (size - downloaded > MAX_BUFFER_SIZE) {
                        buffer = new byte[MAX_BUFFER_SIZE];
                    } else {
                        buffer = new byte[size - downloaded];
                    // Read from server into buffer.
                    int read = stream.read(buffer);
                    if (read == -1)
                        break;
                    // Write buffer to file.
                    file.write(buffer, 0, read);
                    downloaded += read;
                    stateChanged();
          /* Change status to complete if this point was
             reached because downloading has finished. */
                if (status == DOWNLOADING) {
                    status = COMPLETE;
                    stateChanged();
            } catch (Exception e) {
                error();
            } finally {
                // Close file.
                if (file != null) {
                    try {
                        file.close();
                    } catch (Exception e) {}
                // Close connection to server.
                if (stream != null) {
                    try {
                        stream.close();
                    } catch (Exception e) {}
        // Notify observers that this download's status has changed.
        private void stateChanged() {
            setChanged();
            notifyObservers();
    /*__DownloadTableModel.java__*/
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // This class manages the download table's data.
    class DownloadsTableModel extends AbstractTableModel
            implements Observer {
        // These are the names for the table's columns.
        private static final String[] columnNames = {"URL", "Size",
        "Progress", "Status"};
        // These are the classes for each column's values.
        private static final Class[] columnClasses = {String.class,
        String.class, JProgressBar.class, String.class};
        // The table's list of downloads.
        private ArrayList downloadList = new ArrayList();
        // Add a new download to the table.
        public void addDownload(Download download) {
            // Register to be notified when the download changes.
            download.addObserver(this);
            downloadList.add(download);
            // Fire table row insertion notification to table.
            fireTableRowsInserted(getRowCount() - 1, getRowCount() - 1);
        // Get a download for the specified row.
        public Download getDownload(int row) {
            return (Download) downloadList.get(row);
        // Remove a download from the list.
        public void clearDownload(int row) {
            downloadList.remove(row);
            // Fire table row deletion notification to table.
            fireTableRowsDeleted(row, row);
        // Get table's column count.
        public int getColumnCount() {
            return columnNames.length;
        // Get a column's name.
        public String getColumnName(int col) {
            return columnNames[col];
        // Get a column's class.
        public Class getColumnClass(int col) {
            return columnClasses[col];
        // Get table's row count.
        public int getRowCount() {
            return downloadList.size();
        // Get value for a specific row and column combination.
        public Object getValueAt(int row, int col) {
            Download download = (Download) downloadList.get(row);
            switch (col) {
                case 0: // URL
                    return download.getUrl();
                case 1: // Size
                    int size = download.getSize();
                    return (size == -1) ? "" : Integer.toString(size);
                case 2: // Progress
                    return new Float(download.getProgress());
                case 3: // Status
                    return Download.STATUSES[download.getStatus()];
            return "";
      /* Update is called when a Download notifies its
         observers of any changes */
        public void update(Observable o, Object arg) {
            int index = downloadList.indexOf(o);
            // Fire table row update notification to table.
            fireTableRowsUpdated(index, index);
    /*__ProgressRenderer.java__*/
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // This class renders a JProgressBar in a table cell.
    class ProgressRenderer extends JProgressBar
            implements TableCellRenderer {
        // Constructor for ProgressRenderer.
        public ProgressRenderer(int min, int max) {
            super(min, max);
      /* Returns this JProgressBar as the renderer
         for the given table cell. */
        public Component getTableCellRendererComponent(
                JTable table, Object value, boolean isSelected,
                boolean hasFocus, int row, int column) {
            // Set JProgressBar's percent complete value.
            setValue((int) ((Float) value).floatValue());
            return this;
    }

    Thank you for the quick reply! But the solution provided by you, it seems, has still not been able to address my issue. I ran the program at command prompt with your said parameters, but the download still gave an error in the App window.
    Also, is there some way of defining these parameters in the source code? I am keen in using NetBeans to run the program.
    Cheers!

  • How to start a shell script for a java app

    Hi all,
    I have a java application and have got a shell script to start it.
    How can I start this app just from the finder?
    Thanks
    Confidemus

    Fernardo,
    the following links should help you:
    - Technical Note TN2065
    - Applescript and Unix commands
    Mihalis.

  • Tips for porting J2SE app to J2ME?

    Hi all,
    I need to port a J2SE app to a java env even more restrictive than J2ME.
    The app relies on several java and javax packages that are not in the
    target environment.
    Are there any shortcuts quicker than re-implementing the missing classes
    and changing the app to reference the re-implementations?
    Is is possible/practical/legal to extract java and javax .class files from a
    J2SE jar file (like rt.jar) and use them in a non-J2SE environment?
    I'm guessing that a VM would block that as a security problem.
    Thanks,
    -troy

    Hi all,
    I need to port a J2SE app to a java env even more
    restrictive than J2ME.
    The app relies on several java and javax packages
    that are not in the
    target environment.
    Are there any shortcuts quicker than re-implementing
    the missing classes
    and changing the app to reference the
    re-implementations?
    Is is possible/practical/legal to extract java and
    javax .class files from a
    J2SE jar file (like rt.jar) and use them in a
    non-J2SE environment? you may have some depedencies problems
    I'm guessing that a VM would block that as a security
    problem.
    Thanks,
    -troybut way is to rewrite everything ! good luck
    fred

  • Deploying Java apps: Jars within a jar

    Dear Java gurus,
    Imagine I have a Java application. I wish to bundle it all within a jar file. The problem is, I also wish to add some dependencies, in the shape of a couple of other jars. This means that the user could run the app using the straight-forward "java -jar myapp.jar" command.
    So, I jar it all up. This Jar contains a MANIFEST.MF that specifies the main class, and also the classpath. ("Class-Path: lib/other.jar") as the extra jars were in a dir called lib within the jar.
    But, this doesn't work run as java complains about not being able to resolve classes that exist within other.jar.
    I have yet to find anything on the net beyond really basic examples of using jar. Anyone had more experience with it and can share some tips?

    Its a horrible thing. Basically, you can't include jars in jars.  I asked this question on the Java.sun.com forums a while ago if you want to search there. Its a common question and pisses people off.
    You have some other options:
    1: extract all dependency jars and include the classes in a single jar file.
    2: distribute multiple jars and set the Class-Path in the Manifest to point to them. Since you're pointing at lib/other.jar, you gotta use:
    myjar.jar
    lib/other.jar
    You won't find another way around this. I recall somebody suggesting that packaging jars with jars should be available in mustang, but as of yet, it is not so.
    Also, I would strongly recommend starting to use Java Webstart /JNLP for distributing java apps. I've never done it, but it takes all this hassle out for you by automatically maintaining dependencies. I'm intending to try to get Ensmer going using JNLP sometime.
    Dusty

  • Problem running my Java apps in my LG phone. Please help!

    Hi all!!
    I am quite new to the world of J2me, altough I've been coding Java for quite a few years now.
    Recently I bought a LG u 8120 phone with Java-support so I decided it was time to step into the mobile Java-world.
    Now I have written my first small app, a simple timer application which my phone (strangely enough) does not already have.
    So what happens is this : I create my app on my PC and package it with the WTK into a jar -file and a jad-file which i transfer to the phone.
    After this I can see the name of my app in the list of available programs in the phone. But when I try to run it: Nothing. The Java logo shows up for a few seconds and then I am tossed back to the menu.
    I have thought of the following as possible problems:
    1. the 8120 does not support MIDP2.0
    2. I am doing something wrong transfering the files
    3. I have missed out on one or several necessary steps in the process
    Anyone who have developed Java apps for LG phones who can give me some hints?
    I've used the Sun J2ME Wireless Toolkit 2.2 with MIDP2.0 and CLDC1.1 .
    The apps works fine in the emulator. The problem starts when I want to run it in the phone. The phone I've tried is an LG u8120. LG apparently does not want to make life easy for its customers, so there is no support for transfering Java apps in the vendor-supplied software. I suppose that's because they want you to only download stuff from their site. However, after surfing around on some discussion forums for a while I found a program called G-thing which can be used to upload Java apps to LG-phones via USB.
    Any help is very appreciated!
    Thanks,
    Sarah

    Thanks,
    I have tried this and ruled out some of the possible causes.
    When I added some more exception handling, I could see that a "java.lang.IllegalArguenException" is thrown.
    When I ran the AudioDemo package that came with WTK2.2 I noticed that the examples that uses WAV-files do not work while the rest works fine.
    My new theory is now that the u8120 does not support the WAV-format, so I will try with an mp3 instead and see what happens.
    Anyone who knows if LG-phones support WAV-format?
    /Sarah

  • How to run a makefile from java app?

    Hi,
    I want to run a make command the first time my java swing application is run. The makefile is in a directory that the application is using for input files. Do I need to write a script to house the make command or is there another way to run make?
    Thanks

    Thanks for that but I'm not actually trying to build a makefile for my java app - I just want to be able to run one that is going to generate a bunch of html files for my application to access. The make command works great from the command line but I can't just put a directory followed by "make html" in a string and run it using runtime.exec in my application.

  • Synchronisation and concurrent programming for embedded Java

    Hi,
    I am looking for Informations about Synchronisation of concurrent access to Objekts for embedded Java applications. Are there Design Patterns or for this topic or general for Sync. in embedded Systems? And are there Embedded JVMs, with special Synchronisation for Embedded Java Apps? I am also looking for an Overview of existing Embedded JVMs of the market. Who can help with e.g. Infos, Books, Links and so on?
    Thanks

    [takeshi_fl],
    It is better for you to post this question under the topic "Embedded Java" on this forum website.

  • Exposing Java app to external connection?

    Hi
    What is the best way to enable non-Java applications to connect to- and query a Java application? E.g. when compiling a report in Crystal Reports that requires data residing in an in-memory Java app, what's the best way to enable this integration? A Web Service endpoint is one option, but is there a simpler way?
    Thanks in advance,
    Lance

    LanceJ wrote:
    In theory many (JDBC, Web Service etc.) are supported but the only one that seems to be reliable with Crystal is ODBC. Is it possible to provide an ODBC interface for a Java app?Yes, but it wouldn't be easy to do that. It would probably not be worth the effort.

  • New tips for Java developers

    Hello to all Java developers!
    I’m new to the forum and I wanna say all of you hi. Wanna give you a link to one very interesting article on java development (Video Conversion System Implementation)
    http://techzone.enterra-inc.com/video/video-conversion-system-implementation/
    I want to discuss it with you here.

    In what way is that a tip for Java Developers? In what way is it related to Java Programming?

Maybe you are looking for