Мои лекции по Java (1998-2003)

Использование и разработка софта (преимущественно на ПЦ)

Moderator: Shaos

User avatar
Shaos
Admin
Posts: 24008
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Post by Shaos »

ну выходит ты его не как аплет запускаешь :)
Я тут за главного - если что шлите мыло на me собака shaos точка net
User avatar
Lavr
Supreme God
Posts: 16680
Joined: 21 Oct 2009 08:08
Location: Россия

Post by Lavr »

Он сам местами не совсем уверен, что у него выходит, а что - входит... :wink:

С учетом, что как НЕ апплет, я его запустил с самого начала, и
это всё хламьё чудно работало (как программа), а не по потребительским
качествам, то я даже и не знаю что сказать... :oops:

Вобщем-то меня тут вот какой вопрос интересовал: даже полность работающий
пример из пакта установки Жабы может вполне великолепно запуститься
из .HTML-a, но при запуске как .JAR - вдруг заявляет:"Не найден класс main"... :(

Ну некоторые правильные выводы я для себя сделал, и я потрясён просто,
что .JAR - файлы работают прямо из архива!!! :o

Ну хотя... в 90-е годы у меня на работе стоял служебный пенёк-100 и жесткий
диск был сжат программно у него - выходит он постоянно работал с жестким
диском, как с архивом - и вполне успевал... 8)
iLavr
User avatar
Shaos
Admin
Posts: 24008
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Post by Shaos »

ненайденный класс лечится очень легко - надо просто добавить текущий каталог (точка) в переменную окружения CLASS_PATH
Я тут за главного - если что шлите мыло на me собака shaos точка net
User avatar
Lavr
Supreme God
Posts: 16680
Joined: 21 Oct 2009 08:08
Location: Россия

Post by Lavr »

Shaos wrote:ненайденный класс лечится очень легко - надо просто добавить текущий каталог (точка) в переменную окружения CLASS_PATH
В каком месте?
Таким образом, при правильной настройке переменных PATH и CLASSPATH
команду компиляции можно сократить до

javac myfile.java
У меня - так и есть... видимо переменая CLASSPATH настроена правильно... :wink:


А "Не найден класс main" - это странное исключение, а не правило...
Таких файла от силы два на все примеры...

А вобще Жаба любит поглючить с путями... особенно старая... особенно
с русскими....
iLavr
User avatar
Lavr
Supreme God
Posts: 16680
Joined: 21 Oct 2009 08:08
Location: Россия

Re: ЖАБА - потомок BASICA

Post by Lavr »

Lavr wrote:А если в принципе глянуть глубоко в корень, то современная JAVA - это по сути - BASICA...
Я это поначалу несколько с иронией писал... но совсем недавно я гуглил исходники
разнообразных ассемблеров и наткнулся на один очень древний, написанный аж
под TRSDOS 6 но под Васюком:

Code: Select all

410 DRIVE%=1
420 ON ERROR GOTO 480 '------------*
430 OPEN "O",2,OBJECT$
...
480 PRINT "[2] Can't Open Object File, Error Was: ";ERRS$ : RESUME 320
490 ON ERROR GOTO 520 '------------*
500 OPEN "I",1,SOURCE$
510 GOTO 580
520 PRINT "[1] Can't Open Source File, Error Was: ";ERRS$
530 LINE INPUT "Source Filename>";SOURCE$ : IF SOURCE$="" THEN 530 ELSE RESUME 500
...
580 ON ERROR GOTO 950 '------------*
Я пометил символамии '------------* что мне бросилось в глаза...

Это же натуральный throw Exception в терминах JAVA !!! :lol:
iLavr
User avatar
Lavr
Supreme God
Posts: 16680
Joined: 21 Oct 2009 08:08
Location: Россия

Re: VB Decompiler

Post by Lavr »

Lavr wrote:
Как известно, программы, разработанные на Visual Basic, могут быть скомпилированы либо в интерпретируемый p-code, либо в выполняемый native code. ...
http://www.boomsoft.ru/programs/117037- ... etail.html
Вроде как здесь я VB Decompiler упоминал... или ещё где-то... но не суть.
За истекший период софтина очень продвинулась и теперь умеет вот что:

 VB Decompiler
VB Decompiler Lite is a Visual Basic decompiler and .NET disassembler aimed at analyzing code at fast speed. It includes a powerful engine that decodes instructions to possible Visual Basic commands, allowing you to reconstruct your projects.

There are many situations that require the use of such a tool, ranging from misplaced source code to attempts of improving the performance of your code. No matter the circumstances, you can rest assured that you’ll find great assistance in VB Decompiler Lite, a tool especially built for developers in need of a strong disassembler.

VB Decompiler Lite is able to handle EXE, DLL and OCX files built with Visual Basic 5 and 6, as well as projects compiled in .NET technology. Please note that the decompilation process can be performed on x32 machines only, even though the application runs on x64 versions.

As soon as you add a file (using the dedicated menu or by drag and drop), VB Decompiler Lite instantly analyzes the code and displays it in a tree-view before you know it. You can view the code, but you cannot edit it on spot; an alternative is to export it and then modify it.

Export options include saving the procedure list, saving all the code in one module or the decompiled project only. Other highlights include an advanced search string feature, the possibility to patch data or to obfuscate the project.

The functionality of the application is extended by the built-in plugins that allow you to create a MAP file, to show references or to set the decompiler priority.

On an ending note, VB Decompiler Lite can make the day of any programmer, by offering advanced features to disassemble, analyze and export code in an attempt to recover old projects that you lost the source code to.

https://www.softpedia.com/get/Programmi ... iler.shtml
iLavr