Command line package problem

Am using this exercise to create packages:
http://java.sun.com/docs/books/tutorial/java/interpack/QandE/packages-answers.html
I'm on Unix Solaris and have created /home/me/mygame directory as instructed. Then three subdirectories with their files:
mygame/client/Client.java
mygame/server/Server.java
mygame/shared/Utilities.java
Using their source code for each .java file, I sit in mygame directory and compile with
javac shared/Utilities.java
which works to produce Utilities.class
But after that my compiles don't work. Two examples:
javac -classpath . server/Server.java
javac -classpath . client/Client.java
returns in second case:
client/Client.java:5: Class mygame.shared.Utilities not found in import.
import mygame.shared.Utilities;
1 error
prompt% head client/Client.java
package mygame.client;
import java.io.*;
import java.net.*;
import java.util.*;
import mygame.shared.Utilities;
public class Client extends Thread {
Socket clientSocket = null;
public Client(Socket s) {
Can you help? I'd really like to work in packages from the command line.
By the way, the IDE JDeveloper 9i doesn't have any problem with packages, as you'd expect.
More info:
The error meaning it looked but it couldn't find Class mygame.shared.Utilities, I'm sure.
java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)
path (. /home/me/mygame /home/me blah/blah/blah)
Thanks,
Chuck Williams

Why don't you try everything from the directory above mygame?
You'll have to adjust your commands accordingly, but I think your problems may go away.

Similar Messages

  • ADT command line packaging - how to add an ANE?

    Hi,
    I need to compile an iOS app from the command line.
    How to add an ANE to a command line packaging?
    This is what I have so far:
    ./adt -package -target ipa-app-store -storetype pkcs12 -keystore iOS7.p12 -provisioning-profile Foo_DragDrop_iPad.mobileprovision Foo_iPad.ipa Foo_iPad-app.xml Foo_iPad.swf FooIcon29.png FooIcon40.png FooIcon48.png FooIcon50.png FooIcon57.png FooIcon58.png FooIcon72.png FooIcon76.png FooIcon80.png FooIcon100.png FooIcon114.png FooIcon120.png FooIcon128.png FooIcon144.png FooIcon152.png FooIcon512.png FooIcon1024.png Default-Landscape.png
    I hope somebody can help me!

    Thanks mate!

  • Command line build problem

    We have a large help project I'm migrating to RoboHelp 6
    (nearly 3000 topics, 12 chms plus a master file). We generate using
    a script that calls the command-line option. One of the projects
    fails during command line processing, even though I can build it
    from within the GUI without fail. When I run the command line
    command, this is the message that is returned:
    "D:\quartus\robohelp\subs\reference>"d:\Adobe\RoboHelp
    6.0\RoboHTML\RHCL.exe" reference.xpj
    Adobe (R) RoboHelp Project Command Line Compiler version
    6.00.099
    Copyright (C) 2006 Adobe Macromedia Software LLC. All rights
    reserved.
    Project: D:\quartus\robohelp\subs\reference\reference.xpj
    Layout: Microsoft HTML Help.
    Output: D:\quartus\robohelp\reference.chm.
    Scanning project for compilation....
    Error: Failed to scan all the project files. Please use
    RoboHelp to recover the project.
    Unexpected Error: Failed to prepare single source data for
    RHCL. Please try to compile it in RoboHTML."
    If I open the project in the GUI and compile it, then compile
    from the command line, it works fine. But if I clear the directory,
    run the NGCMD.exe command and get the files out and run the
    RHCL.exe, I get the same error message.
    Thanks

    Finally I figured out this problem.
    It is because one .fpj file missing in the image folder.
    When I was using X5, there is no image.fpj in the image
    folder, but after upgrading to RH6, using the command line compiler
    will fail if there is no the .fpj file under the image folder.
    Checking in the image.fpj to the server, then check it out to
    your build machine, everything is OK now.
    AG2MM

  • Command-line paste problem

    Hi!
    I have a following problem: When I try to paste long input to my command-line app, only few first lines are pasted.
    I see, that I Can copy that to apps like TextWrangler, TextEdit.
    What Can I do?
    Regards.

    How long is "long"? Could there have been hard returns in your copied text?
    If you find you cannot paste it in the Terminal, can you still paste the same text into your text editor?

  • Command line Argument Problem - '*'

    Hi, Is there any problem in giving * as Command line argument.
    My student was trying to write a calculator program but stuck :
    Code Sample
    public class test
    public static void main(String[] args)
    System.out.println(args[1]);
    java test 2 + 2
    No Problem
    java test 2 * 2
    gives Problem

    It's not relevant to the programming language. The shell is what expands the *.
    OTOH, I heard that MS-DOS filename expansion is spotty (that's been my experience actually) and that Java has a workaround built into it to make it make sense.
    I'd encourage you to change the assignment (or however this is working out) to allow your student to submit the entire expression as a single argument:
    java Calculator '2 * (3 + 2)'

  • Command line codegen problems

    hello,
    I try to build using commandline codegen tool. I am using the sample project from eGate Tutorial (Project 1: This Project addresses a very simple business challenge where an input TimeCard File is read and a workfile is output).
    I have had experience doing some build using Ant, but apparently it's not as straightforward as I would've expected with this one.
    I have updated the "build.properties" file to match the project as specified on the documentation. The build seems to go okay for a while until it spits the following errors (in logy.log):
    2006-08-07 20:19:23,328 ERROR [main] [com.stc.codegen.anttaskImpl.CodeGen] [] java.lang.reflect.InvocationTargetException
    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:585)
         at com.stc.codegen.anttaskImpl.CodeGen.execute(CodeGen.java:218)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:341)
         at org.apache.tools.ant.Target.performTasks(Target.java:369)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
         at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:341)
         at org.apache.tools.ant.Target.performTasks(Target.java:369)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
         at org.apache.tools.ant.Main.runBuild(Main.java:668)
         at org.apache.tools.ant.Main.startAnt(Main.java:187)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: com.stc.codegen.framework.model.CodeGenException: C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\Collaboration_1.java:15: package dtd.s1_input_420537843 does not exist
        public void receive( com.stc.connector.appconn.file.FileTextMessage input, com.stc.connector.appconn.file.FileApplication FileClient_1, dtd.s1_input_420537843.Employees s1_input_Employees_1, xsd.s1_output_133304065.Employees s1_output_Employees_1 )
                                                                                                                                                                      ^
    C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\Collaboration_1.java:15: package xsd.s1_output_133304065 does not exist
        public void receive( com.stc.connector.appconn.file.FileTextMessage input, com.stc.connector.appconn.file.FileApplication FileClient_1, dtd.s1_input_420537843.Employees s1_input_Employees_1, xsd.s1_output_133304065.Employees s1_output_Employees_1 )
                                                                                                                                                                                                                              ^
    C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\CMap1_Service1\Collaboration_1_Runtime_Handler.java:372: package dtd.s1_input_420537843 does not exist
                                                                           (dtd.s1_input_420537843.Employees) params.get("s1_input_Employees_1")
                                                                                                       ^
    C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\CMap1_Service1\Collaboration_1_Runtime_Handler.java:374: package xsd.s1_output_133304065 does not exist
                                                                           (xsd.s1_output_133304065.Employees) params.get("s1_output_Employees_1")
                                                                                                        ^
    Note: C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\CMap1_Service1\Collaboration_1_Runtime_Handler.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    4 errors
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.compileCodegen(CodeGenFrameworkImpl.java:802)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkAntImpl.doPostProcess(CodeGenFrameworkAntImpl.java:452)
         at com.stc.codegen.anttaskImpl.driver.BuildProject.doPostProcess(BuildProject.java:560)
         ... 25 more
    Caused by: Compile failed; see the compiler error output for details.
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
         at com.stc.codegen.frameworkImpl.model.util.AntTasksWrapperImpl.javac(AntTasksWrapperImpl.java:285)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.compileCodegen(CodeGenFrameworkImpl.java:795)
         ... 27 moreAs can be seen, it failed on the receive() method of the Collaboration, cannot find the package dtd.s1_input_420537843.Employees and xsd.s1_output_133304065.Employees.
    Also, there were some errors to do with velocity:
    2006-08-07 20:18:51,734 ERROR [main] [com.stc.codegen.frameworkImpl.model.util.AntVelocityHelperImpl] [] ResourceManager : unable to find resource 'velocity-templates/VM_global_library.vm' in any resource loader.Within eDesigner, it builds sucessfully indeed. No issues whatsoever.
    As, we have many deployment profiles, building it one by one in eDesigner is very tedious. So, I'd like to get the command line build tool to do the job so we can have unattended build process and possibly use the deploycli tool in combination.
    Any idea on the errors? Has anyone sucessfully used the command line codegen?
    Thanks in advance
    Ari

    Hello Ari,
    I am able to successfully build the project using codegen , command line tool. I tested the same timecard project from the sample projects
    It works fine for me.
    I think the error you are getting is related to OTDs.
    When u created the JCDs did u include all the 3 OTD , file , S1_input_employees , s1_output_employees.
    Right click the collab and in properties check if all the three OTDs are listed
    Let me know if they are listed and still u r getting the error

  • Command line package management

    Hi,
    I'm a 6 year die-hard Gentoo user setting up some big production Oracle boxes.
    The RHEL package management thing (system-config-packages) is both simply rubbish, and requires GTK.
    Is there something better than fighting directly with RPM?
    Previously we used SLES to run Oracle on, and that was bearable as the ncurses interface to their tools was mildly helpful/useful (you could search !).
    Right now, I want to install the multilib packages for the packages I have installed (*not* every-bloody-one), so that some 32bit code can be run (8i mostly).
    Thanks

    Is there something better than fighting directlywith RPM?
    What varsion of RHEL are you using? On latest
    versions there is "yum" which is 100% pure command
    line (no ncurses).Duh, sorry, Oracles own "Enterprise Linux".
    yum is there, but it's missing urlgrabber, something Oracle don't supply on their media apparently, clever.
    Don't suppose someone has an RPM for urlgrabber I can, uhh, grab?
    Oh how I pine for Gentoo, and I've only been using Enterprise for half a day :/ I'd have been done ages ago.
    Previously we used SLES to run Oracle on, and thatwas bearable as the ncurses interface to their tools
    was mildly helpful/useful (you could search !).
    You probably mean "yast".Yup, yast is/was a bit of an arse, but worked fairly well.
    Yum can search too...Now to get yum working :)
    Thanks

  • Desktop command line parameter problem

    We have just completed an upgrade from Discoverer 4i to 10g. We use the desktop version installed on a windows 2000 terminal server to run a batch file nightly (using the windows task scheduler to call the batch file). This runs the reports, then exports them in xls format to a public directory. During my testing I installed the 10g desktop version on my win xp machine to test the command line capabilities - we have about 50 reports that run nightly, and everything ran fine. Now I have installed the 10g Desktop and Admin versions on the terminal server, and need to use this new version to run the reports nightly. I did the install as an admin, and I am running the scheduled task as an admin. The reports are failing, complaining about the parameter values. With the exception of the path to the dis51usr.exe file, I'm using the exact same command line on my pc as I'm using on the terminal server.
    Here's the command line I'm using on my pc, which runs fine:
    c:\oracle\BIToolsHome_1\bin\DIS51USR.EXE /connect it_reports/password@prod /opendb "Order Shipments" /parameter "From Date" "01-APR-2006" /parameter "To Date" "30-APR-2006" /parameter "Sales Territory" "North America" /export xls "\\docserve\rhonda\Discoverer\DiscovererReporting\SalesReporting\North America\Order Shipments Apr 2006.xls" /batch
    Here's the command line I'm using on the terminal server:
    d:\oracle10g\BIToolsHome_1\bin\DIS51USR.EXE /connect it_reports/password@prod /opendb "Order Shipments" /parameter "From Date" "01-APR-2006" /parameter "To Date" "30-APR-2006" /parameter "Sales Territory" "North America" /export xls "\\docserve\rhonda\Discoverer\DiscovererReporting\SalesReporting\North America\Order Shipments Apr 2006.xls" /batch
    This fails, with the following noted in the log file:
    4/25/2006 1:54:09 PM
    d:\oracle10g\BIToolsHome_1\bin\DIS51USR.EXE /connect it_reports/password@prod /opendb Order Shipments /parameter From Date 01-APR-2006 /parameter To Date 30-APR-2006 /parameter Sales Territory North America /export xls \\docserve\rhonda\Discoverer\DiscovererReporting\SalesReporting\North America\Order Shipments Apr 2006.xls /batch
    Invalid value "From Date" for parameter "01-APR-2006"
    Invalid value "To Date" for parameter "30-APR-2006"
    Invalid value "Sales Territory" for parameter "North America"
    4/25/2006 1:54:10 PM
    I've been trying to figure this out for a couple of days now. Just got my copy of the new Discoverer 10g Handbook in the mail today (great book, by the way!) - I was hoping it would shed some light on this problem, but I'm still stuck. I'm hoping I'm missing something really simple here, and appreciate any help I can get.
    Thanks
    Rhonda

    Hello Ott,
    Yes, I tried that, because that is what the error message indicates. I also tried using single quotes instead of double around the parameter names and/or parameter values, and using no quotes at all. The confusing thing is that the same command works on my pc installation. I have also looked at all the option settings between the 2 installations, and made sure they are the same. The only difference is the operating system - for the life of me I can't figure out why 10g would act any different than 4i installed on the same OS, or for that matter why 10g would act any different installed on XP vs Terminal Server. I've got to be missing something simple here.
    thanks
    Rhonda

  • Command line path problem...?

    Ok, I am only after begining programing in java and hence im starting on HelloWorld. Its not the code that im stuck on though. Its the command line things afterwards. I know how to change the path and stuff and use DIR however this is what the tutorial says:
    "The Java tool set consists of a set of command line programs located in the bin directory of your Java installation. For instance, if your Java installation is in C:\j2sdk1.4.2 then the programs you need will be located in C:\j2sdk1.4.2\bin. Make sure you have modified your PATH environment variable to include this bin directory. You can modify your PATH through the control panel or temporarily on the DOS command line (see your operating system help)."
    When I try that but replace it with my current version its says this "System cannont find file path" Then if I put program files before that it still doesnt work and no matter what ive tried it doesnt seem to work. Another question also, does the HelloWorld.java file need to be saved in the \bin directory also?
    I hope you get back to me, because its kinda hard without someone here to explain it all.
    -ARA

    When I try that but replace it with my current version its says this "System cannont find file path" Then if I put program files before that it still doesnt work and no matter what ive tried it doesnt seem to work.I'm not a Windows guy, but it sounds like you put the wrong path in the PATH variable. Maybe you installed the JVM in a different location?
    Another question also, does the HelloWorld.java file need to be saved in the \bin directory also?NO! You shouldn't put anything in there, or anywhere the directory above it either (the JAVA_HOME directory). Create a separate directory for your own files. Maybe in your home directory, if Windows is supporting the "home directory" concept in any meaningful way.

  • Servertool command line usage problem

    I'm trying to use the servertool in 1.4 /solaris2.6 from the command line eg:
    servertool -ORBInitialPort <port> list
    which should(I would have thought) started servertool, listed the servers and returned.
    Instead if displays the servertool command line prompt.
    what is going on? thanks
    PS: i've previously started orbd on with -ORBInitialPort <port>

    Hi,
    actually it's not a real bug. I would say it's documentation inaccuracy. The right syntax is:
    servertool -ORBInitialPort <port> -cmd <command>
    Try
    servertool -ORBInitialPort <port> -cmd help <command>
    for detailed help.
    regards,
    Todor

  • Command Line echo problem

    Hi there,
    So i have a little problem. I have a short code that i want to log, but the logfile must have redirection characters
    like these : < and >
    wmic qfe list brief /format:texttablewsys > "c:\wmic.txt"
    So i added this:
    echo ^<log^> >>c:\wmic.txt ^</log^>
    But then the output doenst come with the redirection characters. Anyone out here who knows how to help me?
    Many thanks in advance!

    Sorry, but I don't understand what you really want.
    wmic qfe list brief /format:texttablewsys > c:\wmic.txt works fine.
    Give a better sample of that what you want to get.
    WMIC is also able to write the output in special formats, like html or xml - try wmic /?If you only want to begin the logfile with <log> and end with </log> do it with three lines of batch:
    echo ^<log^> > c:\wmic.txt
    wmic qfe list brief /format:texttablewsys >> c:\wmic.txt
    echo ^</log^> >> c:\wmic.txt

  • Command lines & cpu problem

    Hi
    i have a cpu problem , lightroom keep my cpu busy @ 100%
    and i have a dual core
    i have to use task manager to assign only 1 cpu , and so runs great
    is there a command list?

    What system? Haw much RAM, More info. And do the forum search suggested!
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Getting command line parameters

    Hi there,
    I developed an application that reads args from the command line.
    Problem is that when I read a windows path like this:
    <DIR>\<DIR>\
    the last backslash is skipped... (from args[0])
    why?
    Thanks in advance,
    Davide

    ok, I'll try it.
    At his moment, I solved using this:
    "C:\Program Files\\"
    so I guess is something about escape sequences.
    In fact, in the above path I'm using \\ to specify the "\" character.
    But is stil a strange behaviour.
    In "C:Program Files\" It seems JVM is using the last
    "\" as an escape sequence but in a path like this
    "C:\Develop\" (without spaces) it recognizes correctly
    the last backslash.
    Bye,
    Davide

  • Running java class in command line

    Hi.. i have a java class i want to run from the command line. the problem is that when i do, i get this exception:
    Exception in thread "main" java.lang.NoClassDefFoundError: (class name)
    The class uses some jars, so i used the -classpath option, and seperated the jars with ":".
    I read in a previous topic that the solution can be to add the JRE1.5.0 to the path.
    Can anyone tell me the syntax to do that? And if anyone has a different solution can they tell me? Im running it on linux debian.
    Thx.

    It sounds like you only have the jars in the -classpath option. If that's right, then java will only look in those jars for classes. You probably need for example .:jar1.jar:jar2.jar if you want java to look in the current directory as well as the jar files for classes.

  • Running a Command Line via a Package

    Hi,
    I am trying to deploy the following command line via a package to my servers but for some reason the results are as expected. The command I am trying to run is:
    reg add "hklm\software\microsoft\windows nt\currentversion\softwareprotectionplatform" /f /v "KeyManagementServiceName" /t reg_sz /d "dc4hmancmddc1.mydomain.local"
    When I look in the log files on the server the command is being executed as:
    <![LOG[Command line = "C:\Windows\system32\reg.exe" add "hklm\software\microsoft\windows nt\currentversion\softwareprotectionplatform" /f /v "KeyManagementServiceName" /t reg_sz /d "dc4hmancmddc1.mydomain.local",
    Working Directory = C:\Windows\system32\]LOG]!><time="12:44:32.391+00" date="02-24-2014" component="execmgr" context="" type="1" thread="3976" file="scriptexecution.cpp:346">
    Why is this is not working? If I run the command manually on the server, it works and reg key is updated correctly.
    PS: I am probably being really stupid here but any help is appreciated.
    Thank You
    Mayur

    Hi,
    Just looking at the logs file, I see this:
    <![LOG[Running "C:\Windows\system32\cmd.exe" /c "C:\windows\system32\reg.exe add "hklm\software\microsoft\windows nt\currentversion\softwareprotectionplatform" /f /v "KeyManagementServiceName" /t reg_sz /d "dc4hmancmddc1.osmanage.local" with 32bitLauncher]LOG]!><time="13:06:32.677+00"
    date="02-24-2014" component="execmgr" context="" type="1" thread="4024" file="scriptexecution.cpp:364">
    It is launching it with 32bit launcher. So is this still a problem with 64bit redirection?
    The thing is before trying this reg fix I tried several times to run command: slmgr.vbs /skms servername.local via  a packag which executed successfully but again the KMS server wasn't updated. So something tells me this is a different problem?

Maybe you are looking for

  • Putting dual 1.8 GHz G5 to sleep breaks Mac OS X's  Console.app

    My mother's G5 is having problems with Leopard it seems. I did a fresh install of Mac OS X 10.5.1 (that's what's on the DVD) and everything seemed fine. I'm quite sure it's after the upgrade to 10.5.6 that the problem happens (of course it can be any

  • Wish List Problems

    Does anyone have any problems with the Wish List feature? It works funny for me. I can't sort at all in any fashion. For example, when I sort it by the date added, then why is a song I added months ago is on the top and 3 songs I just added are 2nd a

  • How do I get rid of a bad email address that keeps popping up

    I have a bad email address that keeps popping up as I type in addresses . I've tried contacts, and I can't find it. How do I get rid of it?

  • In full xml i need to extract some portion of xml and i need to store

    Hi this is the xml i will get i need to store from olife tag please suggest some idea how to do <TXLife> <UserAuthRequest> <UserLoginName>UserId</UserLoginName> </UserAuthRequest> <TXLifeRequest> <TransRefGUID>0099962A-BFF3-4761-4058-F683398D79F7</Tr

  • Working with master pages and page layout, what I have been doing wrong

    I have worked on customizing the page layout and the master pages for a couple of site collections. But now I read two restrictions which I was not following 100%:- I should avoid directly modifying any default templates, and instead of that I should