I can't get this command line code to work in JBuilder...

Dear Experts,
I built a simple JAVA program, in JBuilder, that displays a GUI with a label. It works when I am in JBuilder clicking on the Run button. But when I try to run
"-classpath /[home]/ jbProject/ProjectNameRob/RobClasses ProjectNameRob.RobClsJav" from the command line I get this message:
"Could not create Java Virtual Machine."
I am in the jdk/bin directory and I still can't figure out how this thing works. Could the experts come forth and help me with this problem?
Thank you,
Robert L. Perkins

Well, this won't be an exact answer for you because I'm not sure which run of "java -cp ...." did it for me, but I was able to get a run of a class in JBuilder 3.0 from the command line.
I created a project called test_1.jpr. It has the following 3 files:
Controller.java // contains a main( ) method
test_1.html
Test1.java // extends from JFrame
On my system, the directory structure is:
C:\JBuilder3\myclasses\test_1
Tried:
C:\JBuilder3\myclasses\test_1>java Controller // no good
C:\JBuilder3\myclasses>java test1.Controller // no good
C:\JBuilder3\myclasses>java -cp %CLASSPATH%;C:\JBuilder3\myclasses Controller // no good
C:\JBuilder3\myclasses>java -cp %CLASSPATH%;c:\JBuilder3\myclasses\test_1 Controller // no good
C:\JBuilder3\myclasses>java -cp %CLASSPATH%;C:\jbuild~1\myclas~1\test_1\Controller
That resulted in the "usage" output to appear for the "java" .exe. But right after that, I did:
C:\JBuilder3\myclasses>java test_1.Controller
and wham, the application ran fine. I'm running Windows 98 SE, if that helps. Probably won't help you much, but I just kept messing around with it and then it worked. Voodoo.
HTH
Jeff

Similar Messages

  • I can't get this piece of code to work.

    Hello everybody!
    I am using AS2 and I am trying to make a simple 'game' for an assignment for school.
    I am first trying to make a simplified version of the game, to get some experience before I make the final version.
    I will try to explain this simplified version:
    The player has to drag an object in a big square and then release it. The object resamples 20 liter water. In total the player has to drag 100 liter water to the square, so it has to drag and drop the 'water' object 5 times.
    I want some text in screen that says: You still need ... liters of water.
    The ... is a dynamic text field with the name 'liters'.
    To help myself I made a counter that counts how many times the water is dragged and dropped.
    This is the code I placed in the 'water' movieclip:
    <code>
    onClipEvent(load)
    var countWater = 0;
    _root.createTextField("watercount",1,500,100,100,40); //this is the counter I was talking about
    _root.watercount.text = countWater;
    var literWater;
    on(press)
    startDrag(this);
    on(release)
    stopDrag();
    if(this._droptarget == "/watertarget"){ //watertarget is the box the waterobject has to be placed in
    this._x = 150;
    this._y = 300;
    countWater++;
    _root.watercount.text = countWater;
    literWater = (100 - (20 * countWater)); //I thought this should work. For example if countWater is 1, literWater schould be 100 - 20*1 = 80.
    _root.liters.text = literWater;
    } else
    this._x = 150;
    this._y = 300;
    </code>
    But this for some reason doesn't work. Before I drop the waterobject in the box, the text displayed is 'lev' and after I drop the waterobject, '0' is displayed, instead of 80.
    The counter does actually works well. It counts 0, 1, 2, 3, 4, 5, etc.
    So I figured there is probably something wrong in one of these 2 lines:
    literWater = (100 - (20 * countWater));
    _root.liters.text = literWater;
    Could someone please help me out with this? I would really appreciate it!
    By the way, I'm quitte new to AS, so it could be some newby mistake.
    Message was edited by: rickbreda1

    I would be most suspscious of your liters textfield not being named properly.  If I recreate what would support your code it works fine for me.
    Why don't you try creating it the same way do the watercount textfield just to see if it is working correctly.  I've been assuming there is only one water movieclip that you use over and over again.  If not, then you should get take the on(clipEvent) code off of it and just put that code in the timeline, less the on(clipEvent) part of it.
    Actually, placing any code on objects is not a good practice.  You should assign instance names to all your objects and then place the code in the timeline, using the instance names to target them.  If you give your "water" movieclip that name, your code in the timeline would end up looking like...
    var countWater = 0;
    _root.createTextField("watercount",1,500,100,100,40);
    _root.watercount.text = countWater;
    var literWater;
    water.onPress = function(){
        startDrag(this);
    water.onRelease = function(){
       stopDrag();
       if(this._droptarget == "/watertarget"){
            countWater++;
            _root.watercount.text = countWater;
           literWater = (100 - (20 * countWater));_root.liters.text = literWater;
       this._x = 150; // no need to have an else if it only does part of what the if does
       this._y = 300;
    As far as placing code into posts goes,  I usually just paste it (Ctrl-v) and then do what I can to make it look properly indented.  Others will use the >> tool offered in the editing interface to enter an area for code.  As far as having tags for code, I don't think that is supported any longer.

  • Can't get to command line  - I'm about to scream.

    My ibook kicked over when I installed the latest software updates - it started normally after the updates, ran faster, it was great. Next morning when I started it up, nothing. Grey screen with grey apple. I've tried safe mode, it goes through the startup sequence but gets stuck at the blue screen with the rainbow spinny.
    I've tried single or verbose mode - but I only get as far as the following:
    standard timeslicing quantum is 10000 us
    vmpagebootstrap: 29635 free pages
    migtable_maxdispl = 68
    IOKit Component Version 7.9:
    Wed Mar 30 20:07:52 PST 2005; root(rcbuilder) "RELEASE_PPC/iokit/RELEASE
    69 prelinked modules
    AND, I can't get it to recognize the OS 9 install disk. Still looking for my X.3 CDs.
    Now what? Am I stuck with wiping my hard drive or is the hard drive hosed, or is it a logic board problem or what???!!!!! I'm using my B/W desktop at the moment, but had really begun to get into OS X - now I'm wishing I'd stuck with Classic.
    TIA!!!!!
    ibook G3 Mac OS X (10.3.9)
    ibook G3   Mac OS X (10.3.9)  

    Start with a couple of simple things. Before trying either, unplug any USB or Firewire devices. Leaving only the keyboard and mouse connected.
    1) Start, or restart the Mac and immediately hold down the CommandOption+PR keys to zap the PRAM. Keep holding the keys for four startup chimes. Release the keys and see if it will boot. If not, go on to step two.
    2) Resetting the Mac from Open Firmware.
    Restart the Mac and immediately hold down the CommandOption+OF keys. This will boot you into open firmware. When it stops, you will be looking at a ">" prompt. At the prompt, type each of the next three lines, followed by pressing the Return key. Type each line exactly as show (without the (press Return) part), no capital letters or spaces.
    reset-nvram (press Return)
    set-defaults (press Return)
    reset-all (press Return)
    The Mac should restart after pressing Return on the third command.
    Let us know what happened.

  • I can not get ℠ 'sm' service mark code to work in my title bar

    Hello everyone,
    I want to be able to place 'sm' superscripted next to a company name in a website's title bar. Apparently the &#8480; does not work in all cases...especially mine. Everyone else seems to have great luck.
    Graciously, Nadia offered this code for me to try:
    !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html  xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta  http-equiv="Content-Type" content="text/html; charset=utf-8"  />
    <title>Company Name  &#8480;</title>
    </head>
    but alas, it didn't work for me. My version of DW8 sets up the doctype with charset=iso-8859-1. I figured that was my proble, but changing this to utf-8 has made no difference. All I get is a small white box next to the company name. Firefox, IE6 both do the same thing.
    Any suggestions?
    Many thanks in advance.
    Cheers,
    wordman

    Have you looked at the Java Tutorial?
    JComboBox example:
    http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html
    There are a lot of other good examples and descriptions in the Java Tutorial.
    http://java.sun.com/docs/books/tutorial
    With your panel, just use add(aComponent) without the second parameter null.

  • How to get the command line interface for WRT160NL router

    hi,
    How can I get the command line interface for WRT160NL router. please suggest.

    If you’re trying to access the web-based interface of your router, just use its default IP address (192.168.1.1). The Username is left blank and the Password is "admin". Here’s a quick link on how to do that.

  • Can't run this bit of code

    i cn't get this bit of code to work, it was working fine at home and now when i want to run it on another computer i can't, can anyone help me????
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TestCheckBox extends JPanel
         private JCheckBox cb1,cb2;
         private JComboBox c1;
         private JTextField tf1;
         private ActionHandler h1;
         public void init()
              setLayout(new FLowLayout());
              h1 = new ActionHandler(this);
              String [] s = {"Serif", "SansSerif"};
              c1 = new JComboBox (s);
              c1.addActionListener(h1);
              add(c1);
              Font font = new Font ( c1.getItemAt (0).toString(), Font.Plain, 14);
              tf1 = new JTextField("Test String", 20);
              tf1.setEditable (false);
              tf1.setFont (font);
              add.(tf1);
              cb1 = new JCheckBox ("Bold");
              cb1.addActionListener (h1);
              cb1.setMnemonic('b');
              add(cb1);
              cb2 = new JCheckBox ("Italics");
              cb2.addActionListener(h1);
              cb2.setMnemonic('i');
              add(cb2);
         public void updateFont()
              int valBold, valItalic;
              int fontStyle = tf1.getFont().getStyle();
              int fontSize = tf1.getFont().getSize();
              String fontName = (String) c1.getSelectedItem();
              valBold = cb1.isSelected() ? Font.BOLD : Font.PLAIN;
              valItalic = cb2.isSelected() ? Font.ITALIC : Font.PLAIN;
              fontStyle = valBold + valItalic;
              tf1.setFont(new Font(fontName, fontStyle, fontSize));
              tf1.repaint();
         public static void main (String s[])
              JFrame fr = new JFrame("TestCheckBox");
         class ActionHandler implements ActionListener
              private TestCheckBox tcb;
              public ActionHandler(TestCheckBox T)
              tcb = t;
              public void actionPerformed(ActionEvent e )
              tcb.updateFont();
    }

    * @(#)TestCheckComboBox.java     Tiger 2005 May 12
    package com.yahoo.ron.examples;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * A Java program that run as an applet and application.
    * This test swing checkbox and combobox.
    // I hope this helps a little. If theres a problem just make some modification. -author
    public class TestCheckComboBox extends JApplet{
         private Font font;
         private class TestPanel extends JPanel{
              private String text = "Test Font";
              TestPanel(){
                   setPreferredSize(new Dimension(300, 300));
              public void paint(Graphics g){
                   super.paint(g);
                   if(font == null) return;
                   g.setFont(font);
                   FontMetrics fm = g.getFontMetrics(font);
                   int x = (getWidth() - fm.stringWidth(text)) / 2;
                   int y = (getHeight() - fm.getHeight()) / 2;
                   g.drawString(text, x, y);
              void setText(String text){
                   if(text != null && text.length() != 0) this.text = text;
         private class ControlPanel extends JPanel implements ItemListener{
              private JCheckBox italics, bold, plain;
              private JComboBox fontSelection;
              private JPanel panel;
              ControlPanel(JPanel panel){
                   if(panel != null)
                        this.panel = panel;
                   setLayout(new GridLayout(1, 4, 5, 5));
                   GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
                   add(fontSelection = new JComboBox(ge.getAvailableFontFamilyNames());
                   add(bold = new JCheckBox("Bold"));
                   add(italics = new JCheckBox("Italics"));
                   add(plain = new JCheckBox("Plain"));
                   fontSelection.setMaximumRowCount(4);
                   fontSelection.addItemListener(this);
                   bold.addItemListener(this);
                   italics.addItemListener(this);
                   plain.addItemListener(this);
                   plain.setSelected(true);
              public void itemStateChanged(ItemEvent ie){
                   if(panel == null) return;
                   String fontName = String.valueOf(fontSelection.getSelectedItem());
                   int style = Font.PLAIN;
                   if(plain.isSelected()){
                        // do nothing.
                   else if(bold.isSelected() && italics.isSelected())
                        style = Font.BOLD + Font.ITALIC;
                   else if(bold.isSelected())
                        style = Font.BOLD;
                   else if(italics.isSelected())
                        style = Font.ITALIC;
                   font = new Font(fontName, style, 14);
                   panel.repaint();
         public void init(){
              setPreferredSize(new Dimension(350, 350));
              setLayout(new BorderLayout());
              JPanel tPanel = new TestPanel();
              JPanel cPanel = new ControlPanel(tPanel);
              add(BorderLayout.CENTER, tPanel);
              add(BorderLayout.SOUTH, cPanel);
         static public void main(String[] args){
              JFrame frame = new JFrame("Testing Swing Check Box And Combo Box");
              frame.setPreferredSize(new Dimension(350, 350));
              frame.setLayout(new BorderLayout());
              JPanel tPanel = new TestPanel();
              JPanel cPanel = new ControlPanel(tPanel);
              frame.add(BorderLayout.CENTER, tPanel);
              frame.add(BorderLayout.SOUTH, cPanel);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setVisible(true);
    }

  • Can't get my nokia messaging email to work anymore

    It was working fine then yesterday all of a sudden it quit syncing to my email. I enter password and it  says verifying password please wait.....then it says login unsuccessful please try again.
    Well I have more than one email so I thought I just set up my other one. Then it says unable to connect to server please try again later. I even tried my daughters email like she suggested and it still doesn't work.
    I don't know what happen. It was working fine yesterday and then today it quit working.
    My phone is a nokia 6790

    Anyone have any answers? I just spent an hour or so on the phone with Nokia support with no luck. I don't even think the guy knows what to do. He kept asking me to hit forgot password at email.nokia.com and I kept telling the guy theres no such button. He acted like I didn't know what I was talking about. Then he had me to go into my access point and see if its set up correctly. Well obviously it is cause I can still surf the net on my phone just can't get this darn Nokia messaging to work anymore. Any help will be appreciated.

  • HT3625 Hello, If my mac pro only has a "Internal Microphone/Built-in Input" but no "Line In/Built-in Input." where can I get this option?

    Hello, If my mac pro only has a "Internal Microphone/Built-in Input" but no "Line In/Built-in Input." where can I get this option?

    Mosidun 3.5mm Male to Female Audio Cable for iPhone

  • I can't download Lightroom for some reason.  I keep getting this error:  Exit Code: 7 Please see specific errors below for troubleshooting. For example,  ERROR: DW006 ...  -------------------------------------- Summary ------------------------------------

    I can't download Lightroom for some reason.  I keep getting this error:
    Exit Code: 7
    Please see specific errors below for troubleshooting. For example, ERROR: DW006 ...
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 2 error(s)
    ----------- Payload: Adobe Photoshop Lightroom 5 5.4.0.0 Adobe Photoshop Lightroom 5.pkg_5.4 -----------
    ERROR: DW006: Apple Package failed to install successfully.
    ERROR: Third party payload installer Adobe Photoshop Lightroom 5.pkg failed with exit code: 1

    Link for Download & Install & Setup & Activation problems may help
    -Chat http://www.adobe.com/support/download-install/supportinfo/

  • I have 3 computers and one has the "clear search history" line greyed out. I can't get this to work.

    # Question
    I have 3 computers and one has the "clear search history" line greyed out. I can't get this to work.

    Is Tools > Options > Privacy > History: "Remember search and form history" enabled?
    If that is disabled then there is nothing saved and nothing to delete.<br />
    You still see suggestions in the drop down list if showing suggestions is enabled.
    *http://kb.mozillazine.org/Search_Bar

  • How can i know how to redeem the code? how can i get this code?

    how can i know how to redeem the code? how can i get this code? please i need you help
    <Email Edited by Host>

    You are trying to create a new Apple ID? You don't have one yet? Is that correct?
    If so, then see this article on how to creat your Apple ID - and make up a password for it. Remember to write it down immediately.
    http://support.apple.com/en-us/HT203993

  • I m login in th my iphone in the itune ti download something after entering cc details its asking about something itune gift card secure code...i am not getting this..where can i get this code in order to dowanload frm itune...

    i m login in th my iphone in the itune ti download something after entering cc details its asking about something itune gift card secure code...i am not getting this..where can i get this code in order to dowanload frm itune...

    Meen0902 wrote:
    ... after entering cc details its asking about something itune gift card secure code...i
    Try the 3 or 4 digit code on the back of your Credit Card....

  • I want to install WhatsApp on my iphone 16gb, but I need a code of 3 figures! Where can I get this code? i tried looking at my messages folder, but i havent got any 3 digit code. plz help

    I want to install WhatsApp on my iphone 16gb, but I need a code of 3 figures! Where can I get this code? i tried looking at my messages folder, but i havent got any 3 digit code. plz help

    post in the iPhone forum : https://discussions.apple.com/community/iphone/using_iphone

  • How to enable telemetry logs and where can i find the command line for sun

    Hi i tried creating the telemetry logs directory but the logs are not being populated. i created the following directory:-
    /opt/SUNWmsgsr/data/telemetry/imap/usersns1
    where usersns1 is the userid.
    Also pl. tell me where can i get the command list for sun one messaging server to use the command line utility to list, delete mailboxes. also can i search for all the mailboxes under one domain name. if yes then which command i have to use.
    thanks in advance.

    Hi,
    Hi i tried creating the telemetry logs directory but
    the logs are not being populated. i created the
    following directory:-
    /opt/SUNWmsgsr/data/telemetry/imap/usersns1
    where usersns1 is the userid.Make sure the permissions (ownership) on the user directory and the sub directory match those that messaging server uses - by default mailsrv:mail. This is the most common cause of the telemetry data not being created. The other thing to verify is that the user's account isn't stored as user@domain, otherwise you may need to create the directory as the entire user@domain (try both just to be sure).
    Also pl. tell me where can i get the command list
    for sun one messaging server to use the command line
    utility to list, delete mailboxes. also can i search
    for all the mailboxes under one domain name. if yes
    then which command i have to use.The Messaging Server reference guide is a good place to start (lists all the command-line utilities/flags and what-not):
    http://docs.sun.com/app/docs/doc/819-4429?l=en
    The mboxutil command is used to list/create/delete mailboxes and you can use a pattern to only list those mailboxes in a specific domain.
    Regards,
    Shane.
    thanks in advance.

  • Can I issue this command in PL/SQL: EXECUTE IMMEDIATE '@filename.sql';

    can I issue this command in PL/SQL: EXECUTE IMMEDIATE '@filename.sql';

    Hi,
    Rather the opening a new process (sqlplus), a new connection (need password) etc... I would rather read and execute the file in pl/sql.
    I do not know if someone wrote it already, but here is a quick and dirty code for doing that with UTL_FILE.GET_LINE
    Here, I am only processing some DML statements and no SELECT statements. Correct it as you like !
    CREATE OR REPLACE PROCEDURE run_script ( dir_name IN VARCHAR2,file_name IN VARCHAR2)
    IS
    vSFile UTL_FILE.FILE_TYPE;
    vCmd VARCHAR2(200);
    vNewLine VARCHAR2(200);
    BEGIN
        vSFile := UTL_FILE.FOPEN(dir_name, file_name,'r');
        vCmd := NULL;
        IF UTL_FILE.IS_OPEN(vSFile) THEN
        LOOP
            BEGIN
                UTL_FILE.GET_LINE(vSFile, vNewLine);
                if (vCmd is null) THEN
                    if (upper(vNewLine) like 'INSERT%' or upper(vNewLine) like 'UPDATE%' or upper(vNewLine) like 'DELETE%') THEN
                        if (vNewLine like '%;') THEN
                            /* we have a single line command, execute it now */
                            dbms_output.put_line(substr(vNewLine,1, length(vNewLine)-1));
                            execute immediate substr(vNewLine,1, length(vNewLine)-1);
                        else
                            /* we have a command over multiple line, set vCmd */
                            vCmd := vNewLine;
                        end if;
                    else
                        /* ignore the rest like spool, prompt, accept, errors, host, @, ... */
                        null;
                    end if;
                else
                    if (vNewLine like '%;') THEN
                        /* we have a the last line of the command, execute it now */
                        vCmd := vCmd || ' ' || substr(vNewLine,1, length(vNewLine)-1);
                        dbms_output.put_line(vCmd);
                        execute immediate vCmd;
                        vCmd := null;
                    else
                        /* keep concatenating to vCmd */
                        vCmd := vCmd ||' '|| vNewLine;
                    end if;
                end if;
            EXCEPTION
                WHEN NO_DATA_FOUND THEN
                    EXIT;
                END;
        END LOOP;
        COMMIT;
        END IF;
        UTL_FILE.FCLOSE(vSFile);
    EXCEPTION
        WHEN utl_file.invalid_path THEN
            RAISE_APPLICATION_ERROR (-20052, 'Invalid File Location');
        WHEN utl_file.read_error THEN
            RAISE_APPLICATION_ERROR (-20055, 'Read Error');
        WHEN others THEN
            RAISE_APPLICATION_ERROR (-20099, 'Unknown Error');
    END run_script;
    set serverout on
    create directory scriptdir as '/home/oracle';
    grant read,write on directory to scott;
    exec run_script('SCRIPTDIR', 'test.sql')

Maybe you are looking for

  • What is the rationale behind the "Adobe Standard" color calibration profile?

    Hi! I'm trying to figure out how to make the most of the various color calibration profiles Adobe offers for my cameras with Lightroom 5. I do understand the purpose of the camera-specific options--they're designed to help approach camera JPEG proces

  • My pinch to zoom is not working?

    Since I have updated operating system to Mavericks it will not let me use my trackpad to pinch and zoom. I need this feature especially to zoom in on pictures to edit them in iPhoto so if anyone could help please do! Also I have checked my trackpad s

  • What cameras are supported in 10.3.9?

    I just got iLife 6 and I want a new digital photographic camera but I would like to know the list of supported Cameras in OS X 10.3. Can anyone help me? I am currently looking at (and fancying) a Cannon 550 or 560. Any responses are appreciated. Your

  • How to include an HTML help in my program

    Hello, I would like to show an HTML document in a Labview vi but I'm not sure if I can do it with my 5.1 version and how to do it. Could any of you help me? Thanks

  • Need APEX document for learning practice

    Hi All, I am new user in Application Express and i want to create a web application for our day to day job. Data Should be in column: Serial Number, Analyst Name (Multiple), Date, Customer Name, Status (Pending or completed) Buttons - submit, cancel