How to use J2ME sdk 3.0 with command line - java-me

i'm trying to create J2ME app with J2ME sdk 3.0 with command line and i'm confused on how to compile and preverify my source code.can anyone show me how to please ?

Pretty much all IDE's allow you to run and compile the code inside them, rather than having a separate pipeline to edit the text files, compile them and run them.
For example, in IDEA you have a "Run" menu that you can use to access all those functionalities.
I suggest that, especially if you are inexperienced, you switch from a "manual" process using separate tools (text editor, compiler, runner) to a more unified one, that will sort out most of the details for you letting you focus on the writing of the code / logic.

Related

Compiling pascal program in Visual Studio Code for Linux

Recently, I switched my OS to Ubuntu. I just started with collage and I have to learn pascal for my finals. But a problem occurred.
I installed Visual Studio Code and Pascal extension for it, but I am unable to run even a simple Hello World code. I wrote code, it saved automatically as .pas, but when I enter debug & run option in VSC it displays a message that says 'Open a file which can be debugged or run.', followed by 'debug' and 'run' buttons that I am unable to click and another message that says 'To further configure Debug and Run create a launch.json file.'
I am not even sure am I supposed to post questions such as this one on stackoverflow, but I sincerelly hope that someone could give me a hint on what to do. Solve this within Visual Studio Code or switch to another IDE (and which one would you recommend for Linux user) and pretend that nothing happened?
Thanks in advance.
I know this isn't an answer to "how to debug with pascal with vscode" but, perhaps you would find it easier to just use FPC / Lazarus (IDE) to do your work. While it doesn't have a dark theme, contrary to popular belief, that's not necessary to program.
The IDE is feature packed and allows for full code completion, debugging, etc... (everything you really need to do the work for school).
Additionally, you can use this open source tool to install everything you need for your platform in just a few button clicks (also allows for installing common library packages)
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
download release for your OS
under "FPC Version" & "Lazarus Version" select trunkgit (or stable for an older version)
click the "Install/Update FPC + Lazarus" button
Have you Installed Pascal extension which is available for code to smoothly run pascal code.
If you haven't then try installing this extension using,
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
ext install alefragnani.pascal
You can always check,
https://marketplace.visualstudio.com/items?itemName=alefragnani.pascal
to install and configure pascal in vscode.
I will direct you to the debugging page from the Visual Studio Code documentation that details how to use the debugger and configure a launch.json file. VSCode is a generic IDE so you need to give it some information about your project before it knows how to run the debugger. This is what launch.json is for.
If I could make a suggestion. When you're learning how to program, it's best to start with the basics. Write a small program in a text editor (VSCode is fine, or Vim, or Nano, or Notepad, or whatever). Save the file. Compile and run the program on the command line.
Once you put an IDE in the mix, you have to learn how to use that as well. If you're stuck on both parts, it can be hard to make progress. That said, it's good to learn how to use the IDE, and you should spend some time reading the documentation and working through some of the examples. It takes some time, but it will pay you back a thousand times when you can work more quickly.

"Run|Debug" Buttons Not Appearing on Visual Studio Code Java Programs

A couple days ago I tried to initialize Visual Studio Code to be able to code in C++ using online instructions. They ended up not working at all, but I had edited some settings files (such as a .json file) in Visual Studio Code that I thought were all C++ specific. Afterwards, however, I no longer have the convenient "run | debug" buttons appearing above any "main" functions that I make in java files. In the past I used to be able to just click run and my program would run in the terminal at the bottom of the screen, as opposed to manually compiling and running the program using a terminal. I am running Windows 10. Does anyone know of any way to get these buttons back?
This is an example of what the two buttons look like, appearing above any main functions in a java program.
I also found on the Visual Studio Code website a description of how to begin debugging, attached here, that describes that you need Language Support for Java(TM) by Redhat in order to get these two buttons. I have this extension downloaded, but it is still not working. Please help if you recognize this issue!
What worked for me:
Make sure you have Java extensions, Java Debugger and other basic Java packages installed.
Then making sure the main function is formatted properly like below allowed the Run|Debug buttons to be seen.
public static void main(String[] args) {}
First of all, for troubleshooting, actually we need to have a reproduce steps which can understand what happened in your environment. So can you tell us what you have done to your settings first?
Second, there is a setting under common setting tab, that is Java>Debug>Settings>Enable Run Debug Code Lens. Please check whether this option has been unchecked. Although I think it should not be changed by you.

Is there a way to keep Coded UI Test Builder tool from hiding Visual Studio?

One of the many "features" that annoy me about using CodedUI for test automation is that the Test Builder tool hides Visual Studio when you open it to try to spy an element. This is extraordinarily annoying when you're trying to maintain legacy scripts that aren't working correctly. How do I compare the existing location properties of an element to see if they are compatible with the current state of the application? Currently, I have take a snapshot of the CUITB window, close the tool and then paste the result into something else to compare.
This is especially infuriating because the properties found by the CUITB have little correlation with other spy tools like Inspect, Snoop, etc. rendering those tools unusable for hand coding Coded UI scripts.
Is there a way to configure VS or the test builder tool to NOT hide VS while spying on screen elements? If this is possible, I haven't been able to figure out how to do it.

Build OS-independent notepad with some code completion - appropriate platform?

I want to build as simple notepad application with some code-completion.
It should be easy to compile to Linux, OS X and Windows.
I'm looking at wx-widgets or GTK. Others?? (as web-service as worst case.),
and without library dependencies.
Or does there exist any OS-independent FOSS editor with plug-in functionality.
(Eclipse way to heavy).
To be specific, what I want is a "helper" when coding XML towards an application-framework that use XML extensively. As libraries are loaded (through XML) new tags should be allowed and their existence should be prompted to user, both in toolbar (tags) and auto-complete (attributes).
Recommendations?
regards,
//t
XML Copy Editor: I've used it and it's not the best editor, but it does do the autocompletion.
Conglomerate: Looks quite promising but I never got it to work when I tried it out a year ago. Perhaps it's improved since then.
As for an OS-independent FOSS editor with plugin functionality that is more lightweight than Eclipse, try Gedit. It's not too difficult to write plugins for whatever functionality you may need. It's based on GTK.

Eclipse haml/sass editing + html /css generation

I've been playing with haml and sass and generating a flat site with staticmatic from the command line.
Has anyone been using an ide for this?
I have the Apatana studio (RadRails) plugin installed and it has haml & sass highlighting out of the box. For this site I just want a lightweight script project (no rails).
What type of project would I use, and how would i add something so i could for example, right click the project folder in order to run
staticmatic build [my-project]
(or other) to generate the site from the haml + sass?
I like staticmatic as I can use ruby libraries as helpers.
Happy to take suggestions about any editor. But i am also keen to stick with one editor for everything. (also WTB auto complete).
Cheers
You can run rake tasks from the RadRails IDE, though I didn't manage to get it work. Ruby is probably right choice for the project type. I don't like IDEs because they complicate and slow things down. So my choice is normally Textmate + terminal.
Take a look at Rakefile in this project: https://github.com/adamstac/staticmatic-bootstrap
This isn't exactly what you're asking for...but take a look at a tiny script that I wrote. It will watch directories of your choosing for changes in SCSS and HAML and compile them to html and css. You could make some minor edits to watch.rb if desired, run this in a terminal, and have the site generated without even having to run a command.
PS - if you decide to try this out, you'll need the fssm gem from github or rubygems.org.
A Ruby or Web project type would be most fitting, though I don't think it would matter which in this case.
You can achieve custom commands a number of ways...
You can write up a Rake task in the project Rakefile as Heikki suggested, and then right click and use the Rake menu (as of Studio 3.0.2) to launch that task, or run it inside the embedded Terminal view.
You can write/edit a custom ruble and add a command for launching staticmatic. See http://wiki.appcelerator.org/display/tis/Executing+an+External+Command
You can go the Eclipse route and create an "External Tool Launch configuration" under Run > External Tools. External Tools configuration... > Program. There you can set up a launch to execute some program (say the ruby interpreter or staticmatic script itself) and pass in the argument. Then you can use the run drop-down menu.

Resources