I created my first application in J#. In the Form1_load procedure
I put System.out.println("Hello World"); I build the application.
It compiles clean. How do I run it It's not too obvious. I did
install the J# Redistribution Package. HELP! This is so simple..
but I'm stumped!!!

Running a Simple Program in J#
bmacneal
Before print Expand the section that says "Windows Form Designer generated code". I need this so that I can see what the students created on their form.
It also helps me find the cheaters. (Those with th same EXACT form layout.)
I have another problem. My VB kids cannot run their applications!!! They
do Start without debugging and an error comes up "Error while trying to run project: Unable to start debugging. Access denied. Verify that you are an administrator or a member of the 'Debug Users' group..."
I cannot add each user to the debug users group of each machine...sometimes kids switch machines . How to I get around this What can I change in .NET's security ...HELP
Brian Evans
All that win form stuff is great but how do I view what's written to Standard Output.
PhilipD
EoRaptor013
I get the printouts (code, form as text, form image) like I got in Visual Basic 6.0.
This is how I grade assignments they print code and form as text!! Help or please
refer me to someone who can help.
Scott Glass
That's the problem ..there is no Play button.
So I did select Start(without debugging) from the debug menu and
another window pops up "Just in Time Debugging" and it wants me to select
a debugger and it asks whether I want to debug with the selected debugger
I do not know which debugger to select so I answer the question with a NO!
Nothing happens. BTW, where does the output for System.out. println go
Which window displays it Thanks so much!!!
Waldo A. Flores
I believe you have created a windows application project and you want to see output in console. That's is not supported by default as console window is not shown with Windows application projects. We suggest to create console Application project if one wants to see output in console window.
Anyways, that's the ideal way. If you really want to see the output of Windows application in console window then change the output type of the project to Console application. Please follow steps below to do so...
1. Right click on the project node in solution explorer.
2. Select Properties... from context menue.
3. A Designer is opened in the editor. Select Application Tab.
4. From the "Output Type" drop down, select "Console Aplication".
5. Save the project.
Now if you run your project from Visaul Studio, both console window and a form window will appear. You can see the output in the console window.
Regarding your second problem that a JIT debugging window pops up when you press F5, i think there is some exception being thrown in your code which is not handled. Please review your code and let us know if it still comes.
Please post back if you still face any issue.
Thanks.
SQL_DATA
Something like this
public
static void main(String[] args){
try
{
// your code
}
catch (System.Exception ex)
{
}
}
Visual Studio with .NET offers you many features which will help you to develop any application in effective and efficient manner. I’m sure you will appreciate once you get hands on experience with the language.
Please feel free to get back to us if you need any kind of help.
MjkSoft
Hi,
Can you please post your code here Just running a helloworld program should not throw any exception.
Also can you please tell us that which version of Visual Studio are you working on
And please don't give up Visual Studio just because of one odd issue. We are really sorry for the inconvenience but we have never faced any such issue for a simple print statement. We will surely find out the root cause and I am sure once you start using Visual Studio, you will just love it.
Thanks.
Chris123456
To see Object Browser, Click on View --> Object Browser or View --> Other Windows --> Object Browser.
ClassView (Invoke View --> ClassView) is another handy tool to explore your code projects and solution.
Allen_Simmons
Thanks so much...I made it a console application and output is written to it but
the output is some kind of error "unhandled exception System.Security.Security Exception: Security Error". Do I need to change something I have administrator privilege on the machine. Thanks so much for your help....I'm thinking about not using Visual NET and going to JCreator or JBuilder or NetBeans!!!!
ShaneBrown1979
Great to know that you could get it working.
Yeah, you can create JOptionPane in J# and J# supports Swing classes. You need to refer vjssupuilib.dll in your project and then import javax.swing.* in your code file. This will make all the J* classes visible in your code file.
To add a reference to vjssupuilib.dll...
1. Right click on project node in soln explorer.
2. Select Add References... from context menu.
3. In Add Reference Dialog box, select .Net pane.
4. Select vjssupuilib.dll.
5. Click ok.
Thanks.
MSTSE
I guess your expecting "Hello world" should appear in the Win Form right But nothing will appear in Form because you are writing to Standard output which is not WinForm in case of Windows Applications.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
If we want to print something in WinForm, you should add few WinForm controls like textbox and text field.
Steps to add WinForm controls to WinForm
- Open Form1.jsl[Design],
- Click View--> toolbax to get view all Win Controls
- Expand AllWindows Forms and drag and drop either TextBox
- In Form1_Load(Object sender, System.EventArgs e), add textBox1.set_Text("Hello World"); this line and execute it.
If you are new to WinForm then try playing with Calculator startup kit which you can find under "File --> New project" Project Types: Visual J# --> Starter Kit in Visual Studio 8 , 2005.
Peer Lessing
There is Print command in File menu. For code files like Program.jsl just issue that command.
This command is disabled for Designers like Forms when they are opened in Desing View. You have open the designers in Code View to enable the command.
Hope this meets your requirement.
Thanks.
Dotan
I went to Control Panel and Administator Tools and Selected
Microsoft NET Framework Wizard. I adjusted the NET security and
made my Local Intranet FULL and this solved it.
Now ....I'm trying to create a Dialog box using JOptionPane. Does J#
support the Swing Class