Jak otworzyć program ?

0

Witam, otrzymałem program w java i chcę go sobie przestudiować, dokładnie jego działanie, struktura otrzymanego programu wygląda tak ,że w folderze nadrzędnym jest plik EXE.bat i MainEXE.java i MainEXE.class , natomiast w podfolderze znajduje się wiele plików z nazwami klas i rozszerzeniem .java i .class. I gdy chcę zobaczyć jak działa program klikam w EXE.bat i program tylko załącza się i wyłącza w ułamkach sekund. Mam pewność ,że program jest napisany dobrze, bo u źródłą działa. Próbowawłem go odpalać za pomocą cmd i jest komunikat że skompilowano poprawnie ,ale się nic nie dzieje. Mam JDK i JRE.

0

A w konsoli polecenie java MainEXE nie działa?

0
Error:
Connection to null using port 6423 refused.
Rhapsody may not be running on host or animation is disabled.

coś takiego się wyświetla

0

Ale to już nie odpalony program zwraca ten błąd? Masz odpalone to Rhapsody?

0

Wpisuję tylko te java MainEXE, nic innego nie włączam. Może wrzucić ten plik w załączniku to może ktoś go spróbuje u siebie odpalić, bo jestem pewien na 99.99% że działa ,tylko u mnie są braki w znajomości podstaw Javy :D

0

Wrzucę dziś po południu bo na razie mnie nie ma , ale spać mi to już nie daje , bo pewnie to coś banalnego, a tyle czasu już się męczę :(

0

No dobra ale ten .bat ma hardkodowane ścieżki w stylu

set RHAP_JARS_DIR=C:/Users/igorm/IBM/Rational/Rhapsody/8.2.1/Share\LangJava\lib

A skoro to od kogoś skopiowałeś to przypuszczam że u ciebie one nie są poprawne? ;) Poza tym masz tam parametry:

if "%1" == "" goto compile
if "%1" == "build" goto compile
if "%1" == "clean" goto clean
if "%1" == "rebuild" goto clean
if "%1" == "run" goto run

Wiec żeby odpalic to musiałbyś podać argument run do tego bata.

0

Ta ścieżką ktora podałeś to jest u mnie , ponieważ próbowałem także otworzyć ten plik przez rhapsody , czyli w miejscu gdzie powstawał.A co do drugiej części mógłbyś więcej napisać, czy wystarczy po prostu run i nazwa.bat w cmd ?

0
Usage: java [options] <mainclass> [args...]
           (to execute a class)
   or  java [options] -jar <jarfile> [args...]
           (to execute a jar file)
   or  java [options] -m <module>[/<mainclass>] [args...]
       java [options] --module <module>[/<mainclass>] [args...]
           (to execute the main class in a module)

 Arguments following the main class, -jar <jarfile>, -m or --module
 <module>/<mainclass> are passed as the arguments to main class.

 where options include:

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    --class-path <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -p <module path>
    --module-path <module path>...
                  A ; separated list of directories, each directory
                  is a directory of modules.
    --upgrade-module-path <module path>...
                  A ; separated list of directories, each directory
                  is a directory of modules that replace upgradeable
                  modules in the runtime image
    --add-modules <module name>[,<module name>...]
                  root modules to resolve in addition to the initial module.
                  <module name> can also be ALL-DEFAULT, ALL-SYSTEM,
                  ALL-MODULE-PATH.
    --list-modules
                  list observable modules and exit
    -d <module name>
    --describe-module <module name>
                  describe a module and exit
    --dry-run     create VM and load main class but do not execute main method.
                  The --dry-run option may be useful for validating the
                  command-line options such as the module system configuration.
    --validate-modules
                  validate all modules and exit
                  The --validate-modules option may be useful for finding
                  conflicts and other errors with modules on the module path.
    -D<name>=<value>
                  set a system property
    -verbose:[class|module|gc|jni]
                  enable verbose output
    -version      print product version to the error stream and exit
    --version     print product version to the output stream and exit
    -showversion  print product version to the error stream and continue
    --show-version
                  print product version to the output stream and continue
    --show-module-resolution
                  show module resolution output during startup
    -? -h -help
                  print this help message to the error stream
    --help        print this help message to the output stream
    -X            print help on extra options to the error stream
    --help-extra  print help on extra options to the output stream
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:jdwp
                  see also -agentlib:jdwp=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
                  HiDPI scaled images are automatically supported and used
                  if available. The unscaled image filename, e.g. image.ext,
                  should always be passed as the argument to the -splash option.
                  The most appropriate scaled image provided will be picked up
                  automatically.
                  See the SplashScreen API documentation for more information
    @argument files
                  one or more argument files containing options
    -disable-@files
                  prevent further argument file expansion
To specify an argument for a long option, you can use --<name>=<value> or
--<name> <value>.

Takie coś po tym runie jest, kurde taka prosta rzecz pewnie a tyle się już z tym męczę, daję piwo jak komuś się to uda uruchomic :D

0

Hasło "ibm rational rhapsody download" daje w pierwszym wyniku:
https://www.ibm.com/developerworks/downloads/r/rhapsodydeveloper/index.html

Na pewno chcesz z tym walczyć? Tzn z softem niewiadomego pochodzenia? Nie lepiej sobie zapuścić triala i zrobić co tam planowałeś?
Chyba że otwierasz startup...

0

Ja u siebie Rhapsody już mam właśnie tę wersję 60 dniową, ale w Rhapsody jak robię execute to też się tylko włączy i wyłączy nie wiem czemu. W każdym razie zależy mi na tym programie, bo chcę użyć podobnych algorytmów. Wiem ,że był tworzony w Rhapsody 8.0 ,ja mam 8.2.1 ,ale to aż tak duży problem nie powinien być.
Kurde już nie wiem co z tym jest :( Przecież to musi być jakieś niezbyt trudne rozwiązanie, normalnie mi się w Rhapsody kompiluje, błędów nie ma, ale jak włączam to tylko mignie i koniec :(

1 użytkowników online, w tym zalogowanych: 0, gości: 1