Create a complete jar file with jscreator

Please provide all details for creating a jar file with jscreator for this 77 year old puzzle creator

Hi,
I would suggest switching to NetBeans IDE. It allows for the following:
- Ability to run with latest JDK release
- Enabled with the latest Java technologies
- Support for a greater number of application servers
The following will help with migration (if you already have a project setup in Creator)
http://www.netbeans.org/kb/60/web/creator-migration.html
Also, the following article describes how to create and Distribute Executable JAR Files in NetBeans
http://www.netbeans.org/kb/articles/javase-deploy.html
NetBeans website for downloads and other information;
http://www.netbeans.org/index.html

Similar Messages

  • How do you create a jar file with txt and classes?

    Hey, I'm trying to create code to create a jar file with a text file, but I can't figure out how to add the text file. Here is what I have so far:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
            }It creates the .jar file with the correct manifest but I can't get it to write the test.txt or anything else into the jar file.
    -Gandolf
    Edited by: GanMatt on Jun 18, 2009 8:18 AM
    Edited by: GanMatt on Jun 18, 2009 8:19 AM

    Alright, my question has changed. Here's the code:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.write("Hi".getBytes());
                out.flush();
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this,ex.toString(),"BUG!",JOptionPane.INFORMATION_MESSAGE);
            }It creates the jar file with the txt file inside it, but I can't write "Hi" inside of the text file. Any ideas?
    -Gandolf

  • How can I get a single jar file with NetBeans?

    How can I get a single jar file with NetBeans?
    When I create the project I get these files:
    dist/lib/libreria1.jar
    dist/lib/libreria2.jar
    dist/software.jar
    The libraries that have been imported to create the project are in separate folders:
    libreria1/libreria1.jar
    libreria2/libreria2.jar
    libreria1, libreria2, dist folders are all located inside the project folder.
    I added the following code to the build.xml:
    <target name="-post-jar">
    <jar jarfile="dist/software.jar">
    <zipfileset src="${dist.jar}" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria1.jar" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria2.jar" excludes="META-INF/*" />
    <manifest>
    <attribute name="Main-Class" value="pacco.classeprincipale"/>
    </manifest>
    </jar>
    </target>
    Of course there is also the project folder:
    src/pacco/classeprincipale.form
    src/pacco/classeprincipale.java
    Can you tell me what is wrong? The error message I get is as follows:
    C:...\build.xml:75: Problem creating jar: archive is not a ZIP archive BUILD FAILED (total time: 2 seconds)

    This is not a NetBeans forum, it is a JDeveloper forum. You might want to try http://forums.netbeans.org/. I also saw your other question - try looking in the New to Java forum: New To Java

  • How to handle 2 or more .jar files with an applet

    Hey out there
    I have created an ftpClient application that uses "jakarta ftpClient". It works fine as an JFrame application � But when I converted the Application into an JApplet I get the following Exception:
    java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
    I have bundled the main application into a .jar file (Application,jar). But I don't know how to handle the 2 jakarta .jar files with my JApplet??
    I Tried to append the 2 jakarta .jar files to the Application,jar with the following code:
    jar cvf Application.jar 1.class 2.class�. commons-net-1.4.1.jar jakarta-oro-2.0.8.jar
    But with the same result / Exception (I have signed the Jar file!)
    Can anyone help me

    Hi i have a question with your application can you down- or upload more files at the same time? Because i'm having problems with my ftp application.
    Here is the link with my problem maybe you can help me. I will be very pleased when you can help me.
    http://forum.java.sun.com/thread.jspa?threadID=5162042&tstart=0
    Thx
    Satanduvel

  • How do I create an executable JAR File ?

    Hi,
    Let's say I have several Class Files that perform a special task.
    How do I bundle them in a JAR file and make it executable, so that the user simply types "prog.jar" and is happy.
    I wonder how that works, as I have to tell the starting point for execution.
    Does anybody now ?
    cu
    Oliver

    Three importants things to do :
    - don't forget to indicate in your manifest.mf the main class and the pacckage
    ex:
    Manifest-Version: 1.0
    Main-Class: mypackage.MyMainClass
    Created-By: 1.3.0 (Sun Microsystems Inc.)
    - don't forget to associate the .jar file with the application java.exe -jar -classpath %CLASSPATH%
    - don't forget to set the environment CLASSPATH correctly
    Hope this help
    Jean

  • How to create a client jar file???

    How do I create a client jar file for the client program? Please see my attached
    ejb-jar.xml. I compiled the my EJB and deployed it successfully. However, I couldn't
    find the client jar anywhere. I use the weblogic admin console DD editor, I can
    see that the edit field has been populated with my client jar file name defined
    in the ejb-jar.xml. However, I searched entire system, I could not locate this
    jar anywhere.
    How do I do that? If someone knows how to do it, please let me know. Thank you
    very much.
    [ejb-jar.xml]

    How do I create a client jar file for the client program? Please see my attached
    ejb-jar.xml. I compiled the my EJB and deployed it successfully. However, I couldn't
    find the client jar anywhere. I use the weblogic admin console DD editor, I can
    see that the edit field has been populated with my client jar file name defined
    in the ejb-jar.xml. However, I searched entire system, I could not locate this
    jar anywhere.
    How do I do that? If someone knows how to do it, please let me know. Thank you
    very much.
    [ejb-jar.xml]

  • ServiceBus java callout - how to pack the JAR file with libraries?

    Hello
    I want to use a Java Callout from a Service Bus flow.
    What is the correct way to pack the JAR file with its nessecary libraries?
    I tried different methods to pack my JAR, but yet, as though the Java runs perfectly from the Workshop (Eclipse) , when I am trying to use the exported Jar on the ServiceBus flow, it fails with an ClassNotFoundException.
    I would really appreciate your advice here.
    Thanks
    Koby

    Well.. Looking inside my exported JAR file, I got all of the files there inside, including the jar file containing the library.
    What I'm trying to do is run a simple java program that connect through SSH and therefore use an SSH library.
    On the workshop I got it as an imported library JAR. And it works perfectly there.
    Any idea?
    Here's the complete error I get:
    <BEA-382515> <Callout to java method "public static java.lang.String sshpackage.SshProg.remoteScriptInvoke(java.lang.String,java.lang.String,java.lang.String,java.lang.String)" resulted in exception: null
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at stages.transform.runtime.JavaCalloutRuntimeStep$1.run(JavaCalloutRuntimeStep.java:158)
    Truncated. see log file for complete stacktrace
    java.lang.NoClassDefFoundError: ch/ethz/ssh2/Connection
    at sshpackage.SshProg.remoteScriptInvoke(SshProg.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: ch.ethz.ssh2.Connection
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at com.bea.wli.sb.resources.archive.HookedJarClassLoader.loadClass(HookedJarClassLoader.java:251)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    Truncated. see log file for complete stacktrace
    Edited by: kobyssh on 04:12 01/02/2010

  • Packaging  jar  file with classes

    Hi experts,
    I want to clarify a problem in relation with packaging .class files in jar file making
    it jar executable.I was able to achieve this when number of classes are limited and confined to only a single program.However recently i developed a software
    which is very much like SQL*Plus and retriee my company database using screen buffer management and i have handled almost all the issues.
    But so long to execute this program i am typing
    java <Program name>.It is using Oracle as backend.
    I tried to package Oracle driver files in jar using
    jar -cmf manifest.mf sqlpad.jar *.class Oracle\
    where Oracle directory contains all the class files in separate folders like
    Oracle\javax etc
    I get a jar file with hefty MBs size.It is executable too.But when i try to connect to
    database, i get message Oracle driver class is not found.
    In what way should i package it as jar file ?

    I wouldn't add the drivers to the JAR itself. Instead, I'd suggest one of the following:
    1.) Add classpath entries into your manifest file pointing to the drivers' JARs
    2.) Create a batch file for starting that contains a call to "java -classpath ..."
    3.) Add some way to your app to configure additional classpaths at runtime and use a URLClasssLoader (and a wrapper class for the driver for registering with the DriverManager) that loads the driver's class

  • How to run jar files with arguments?

    Hi everybody,
    Is it possible to run a jar file with arguments passed to its MAIN class?
    If yes can you help me on how to do it?
    Thanx

    I am in complete agreement with FahleE. I'll refine it a bit.
    On my machine (running RedHatLinux8.0) you can run the demos like this.
    1. open a console window
    2. go to the directory where the demo you wish to run, say, demo.jar, is located
    for instance for the SwingSet2-demo
    cd /usr/lib/java/demo/jfc/SwingSet2
    3. run the jar file
    java -jar demo.jar
    In order to run it windows style, ie, launching by double clicking, save these lines in a file called
    LaunchJar.sh
    cd /usr/lib/java/demo/jfc/SwingSet2
    java -jar demo.jar
    where demo.jar is the jar file you want to run.
    Right click on the LaunchJar.sh and go to the 'Properties' tab. Check the 'Execute' permissions for Owner/groups/others. You can also do the same thing by chmod command.
    Now double-click on the LaunchJar.sh file: your application should be launched.
    Palash.
    Please Note: It is important to set the path variable to your JAVA_HOME directory....
    Otherwise, instead of
    java -jar demo.jar, you will need to use the full path to your JAVA_HOME/bin directory like:
    JAVA_HOME/bin /java -jar demo.jar.
    Where JAVA_HOME is the directory where you have installed java. Typically it is usr/java or usr/local/java

  • Unable to create an executable jar file

    Hi,
    I am unable to create an executable jar file,
    I am using the command as follows:
    C\> jar cvfm MyJarName.jar manifest.txt Demo.class
    where as Demo.class has appropriate main method; manifest.txt contains [ Main-Class: Demo ] and a new line
    Please help.
    thanks & regards
    M K Rayapudi
    Edited by: R6i on Apr 30, 2009 5:15 AM

    Your jar is perfectly generated, but your machine has a problem with .jar file associations.
    You have two options:
    1. Play with the registry. Dangereous if you are not used to.
    2. Reinstall the jre.
    Just to verify my theory, open a command prompt and the command:
    reg query HKCR\jarfile\shell\open\command
    What does it say? I have executed your command , here is the output
    HKEY_CLASSES_ROOT\jarfile\shell\open\command
        (Default)    REG_SZ    "C:\Program Files\Java\jre6\bin\javaw.exe" -jar "%1" %*I am not getting anything from this command, can you please explain clearly.
    thanks & regards
    M K Rayapudi
    Edited by: R6i on May 3, 2009 10:18 PM

  • How to run jar file with classpath?

    Hi, all,
    I have some package in my project, with which I have a java help jar file as classpath, when I run my project, I need the jh.jar file in directory /jar/jh.jar.
    Now, I bundled all my class packages into a jar file, my.jar, together with the /jar directory. When i run my jar file with command:
    java -jar my.jar
    It tells me couldn't find javahelp class.
    What shall I do? How can I create my jar file with the jh.jar?
    Thanks in advance.

    Thanks, hjembaek,
    But it doesn't work for me. I am running in windows, it still generate the error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/help/HelpSet
    at own.gui.OwnMenuToolBar.getOwnHelpBroker(OwnMenuToolBar.java:560)
    at own.gui.OwnMenuToolBar.addHelpMenu(OwnMenuToolBar.java:327)
    at own.gui.OwnMenuToolBar.getOwnMenuBar(OwnMenuToolBar.java:188)
    at own.gui.OWNDPTool.initGui(OWNDPTool.java:55)
    at own.gui.OWNDPTool.<init>(OWNDPTool.java:39)
    at own.gui.OWNDPTool.main(OWNDPTool.java:100)
    Here is my command to generate the jar file:
    jar cfm Own.jar temp.txt help own log others
    temp.txt is the file including the main class and class path information
    I have help folder, log folder and own package, others is directory that has the jar file(others/jh.jar)

  • Creating an executable jar-file including a custom package

    I am trying to learn how to create executable jar-files. I have managed this with a single class. However having a class which is an extention of another class which in turn belongs to custom package, I can't make it work.Running the program normally is not a problem. I don't think the problem is the actual code, but I will include it here anyway. I create the jar-file using:
    jar -cmf Direkt2b.txt Direkt2b.jar *.class
    where Direkt2b.txt is just:
    Main-Class: Diriekt2b
    Only the main class-file is included this way. Copying the other file to the same directory before creation doesn't help either. There is no error messages, the jar-file just refuses to run no matter what.
    The main-class:
    import java.awt.*;
    import extra.*;
    class Direkt2b extends ExtendedFrame {
         Font f;
         Direkt2b() {
              f = new Font("SansSerif", Font.BOLD, 24);
              setBackground(Color.yellow);
              setSize(400,150);
         public void paint(Graphics g) {
              g.setFont(f);
              g.setColor(Color.blue);
              g.drawString("V?lkommen till Java Direkt", 45, 100);
         public static void main (String[] arg) {
              Direkt2b d2 = new Direkt2b();
              d2.setVisible(true);
    The help-class:
    package extra;
    import java.awt.*;
    import java.awt.event.*;
    public class ExtendedFrame extends Frame {
         private static boolean first = true;
         private boolean isFirst = first;
         public ExtendedFrame() {
              addWindowListener(theListener);
              first=false;
         WindowAdapter theListener = new WindowAdapter () {
              public void windowClosing(WindowEvent e) {
              dispose();
              if (isFirst)
                   System.exit(0);
    }

    My problem wasn't really getting more than one class in a jar-file,
    but rather that my jar-file with multiple classes wouldn't execute.
    Reading the original post I realized that maybe I was unclear about that.
    However I have solved the problem now so for anybody reading this
    thread in the future I will tell you how.
    The general setting is this: You have a bunch of self-made help-classes
    organized in some classdirectory somewhere in the filesystem. You use these
    in your programming from time to time. You have set a classpath-varible
    in your OS such that Java could find your help-classes.
    Now you want to create executable jar-files so that you could publish your work.
    My problem was that while I added all needed classes in a jar-file, the main-class
    couldn't find the others because they were referenced incorrectly. The solution I
    came up with may not be elegant, but it works. I copied the main-class and all directories
    (only one in my case) just as they appear in the classpath-directory, to the same temporary
    directory. Then I created the jar-file from there, using: jar -cmfv Direkt2b.txt Direkt2b.jar Direkt2b.class extra/*.class
    I suspected that incorrect referencing was the problem and I tried several variations on the theme above
    before giving up and writing the first post. Part the problem was that I didn't get any error messages,
    just an annoying error-sound double-clicking the jar-file. I learned later that you could run jar-files from
    the command -prompt using: java -jar myjarfile.jar. This way you get a more useful response.
    I guess there is a way to include the classpath instead somehow, but I will use my method for now.
    I hope this was helpful to somebody.

  • Signing a jar file with a java program

    Hello folks,
    It's easy to create a jar file with a java programm, but can I sign it as well with pure java code or do you have to invoke jarsigner?
    Regards
    Der Hinterwaeldler

    Well J2SE 1.x supports ZipOutputStream (jar's are zips with a META-INF/MANIFEST.MF file) and www.bouncycastle.org has API's for signing etc.
    So in theory you could take a directory or an existing jar and make a jar and sign it.
    The only question is the format on how to sign them properly. I wouldn't be suprised if someone already wrote an API for this format. For example BouncyCastle supports S/MIME and PGP, but I don't know what is the format for jars.

  • How do I create an interactive PDF file with variable data

    We would like to basically do a 'mail merge' of our list of customers with an interactive PDF file (including videos, menus, etc - not just form fill out and web links) to create a single PDF file that contains multiple mail pieces ... one for each customer ... with each mail piece being customized for that customer.  Customizations would include different greetings (Dear Bob, Dear Dana, etc), as well as different charts based on data unique to the customer, different photographs, etc.
    I've seen that InDesign and Acrobat Professional can be used to create an interactive PDF (such as from http://tv.adobe.com/watch/ask-the-adobe-ones/14-calling-rufus-about-interactive-pdf-making).  However I don't understand how I can insert data from a database, csv file, excel file etc into the PDF file so that each page, or each set of pages, within the PDF can be customized.
    Can anyone point me to a tool to use for this?
    Thanks,
    Bob Kendall

    For that kind of volume and unattended operation, you want InDesign Server – which is the server/high volume edition of INDD.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 3 Nov 2011 06:58:07 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How do I create an interactive PDF file with variable data
    Re: How do I create an interactive PDF file with variable data
    created by Ti26E31DSxxx<http://forums.adobe.com/people/Ti26E31DSxxx> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4005459#4005459

  • How do I create an after effects file with an interchangeable image

    Hey,
    hope someone can help me, I'm using after effects to create a mp4 file, it contains a photo which has a animation super imposed ontop of it.
    When the projects finished the base photo that the animation is created around could change up three times a day.
    What I'm trying to work out is a way for a non technical user to just be able to upload the new photo to somewhere and for the animation to be created and returned somehow to him so that the animator doesn't have to re open and edit the affect effect project each time a new photo comes in.
    Is there a way to do this built into after effects does any one know?
    Thanks for any help

    For that kind of volume and unattended operation, you want InDesign Server – which is the server/high volume edition of INDD.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 3 Nov 2011 06:58:07 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How do I create an interactive PDF file with variable data
    Re: How do I create an interactive PDF file with variable data
    created by Ti26E31DSxxx<http://forums.adobe.com/people/Ti26E31DSxxx> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4005459#4005459

Maybe you are looking for

  • Attach a digital signature to SQL mail

    How do I use an email certificate to sign email sent using SQL Mail? I have a certificate installed so that I can sign email sent from Outlook. This is on SQL Server 2005 using either Database Mail or SQL Mail.

  • Upload a Fixed Length file in terms of Bytes..

    Hi, Here is my query. I have a fixed length file that I need to upload into my program from my presentation server. The file is in a Shift-JIS Format. The file is a fixed length format. But it is fixed interms of the number of bytes that each column

  • Dead screen for 3555b

    I have a dead display screen on my Nokia 3555b & need someone to walk me through the steps to connect either the USB port or bluetooth to transfer the data from the phone's memory to my PC.  Thanks... Dean.

  • Connection pooling oc4j

    hi guys, I have a deployed application in OC4J (oracle 10g). My JSP needs connection pooling to the DB connection . right now i am uisng normal DB connection, which is not feasible for long term process. I had seen some of the mails/step by step proc

  • Urgent ... help on selection screen

    hai all, my requirement is that in the selection screen. if i choses input data(f4 help for) one field. automatically i want on other input fields to be filled with data. how to do this. please help me. thanks in advance.