How to write a simple standalone Java program in JCS2?

I'm planning to use JSC2 for a course this fall for web app development. But before doing all the web stuff (JSF, web database, AJAX, etc.), I need to cover the basics of Java (and servlets, ...). How does one create a simple Java project that contains, say, a HelloWorld class? What about a simple servlet? I was trying to write one from scratch or import an existing one but simply doesn't know where to begin.

Does one need to use a different IDE for the above? Please advise.

Billy

[506 byte] By [JustMeLah] at [2007-11-26 9:27:00]
# 1

You don't need an IDE at all. It helps to handle a lot of the compilation, path details and provides some options when you are choosing APIs.

For a beginner there is a benefit to working outside the IDE. Kinda depends how far you intend to take your Java knowledge.

The IDE will help you get started faster.

asnotrocket at 2007-7-7 0:06:23 > top of Java-index,Development Tools,Java Tools...
# 2

You could also use Netbeans IDE (e.g. 5.0) for your purpose.

See the following guide:

http://www.netbeans.org/kb/50/using-netbeans/editing.html#pgfId-1005684

There are benefits of using an IDE (e.g. learn the build script, using a debugger, etc.)

As asnotrocket mentioned, it all depends on what you like to do.

Kenneth_H at 2007-7-7 0:06:23 > top of Java-index,Development Tools,Java Tools...
# 3
With JSC 2 you can develop a standalone java program. You just need to create a project as a lib and then implement a static void main() methode in a class.After compilation, your application will find the class where you main method has been defined...
iana2401 at 2007-7-7 0:06:23 > top of Java-index,Development Tools,Java Tools...
# 4

If you want to learn the basics of Java, here are my suggestions.

1. Start learning java with a simple editor like notepad.

- This will help you to understand how to set the path, classpath, compiling, running, archiving it into jar file etc. It will be a great learning experience.

2. Once you are comfortable, start using a IDE. I would recommend you to choose NetBeans 5.0 as your ide. It's one of the best Java IDE's as of now.

3. Then move to JSC.

Because if you start using an IDE like JSC straightaway, you may not understand what is going behind at the background, so you will not have total control in your projects.

JamesSelvakumar at 2007-7-7 0:06:23 > top of Java-index,Development Tools,Java Tools...
# 5

Thanks to all who replied. Really appreciate it.

I should clarify one thing here. That is, I am teaching a web development class and I am trying to use a single IDE tool to cover all the topics that I need to incorporate. They include JavaScript, a very quick intro to Java (for those students who have had C++ but no Java), servlets, JSP, JSF, Web services, and possibly AJAX. With so many topics to cover, using a unifying tool to teach the topics does save lots of time.

I used to use IBM Websphere/Rational but I'm moving away from it. This semester, I'm embarking on a new journey using JSC2. From what I have read so far, I guess one can do standalone Java and servlets, abeit unnaturally?

JustMeLah at 2007-7-7 0:06:23 > top of Java-index,Development Tools,Java Tools...
# 6

I would recommend you to go with NetBeans 5.5 (it's in Beta 2)

NetBeans 5.5 provides full support for Java, Servlets, EJB 3.0, JSF, Struts, Web Services, Developing persistance entity classes etc.

It also has a java script editor as a plugin.

JSC was intended to support only JSF and developing EJB/Web Services are not possible with it.

JamesSelvakumar at 2007-7-7 0:06:23 > top of Java-index,Development Tools,Java Tools...
# 7

Hello,

In reading these posts, i am wondering if i can use Studio Creator to create some administrative utilities that are currently being done using Excel?

I tried Studio Creator about 6 months ago and modified the Travel CRUD example and it seemed to work pretty well, the only concern i had at the time was the difficulty in debugging as too much information was core dumped and not enough about the specific problem!

But in trying the latest examples, none of them seem to have the "sophistication" of an Excel spreadsheet, so if i use Studio Creator, can i expect to be able to create a simulated spreadsheet and update a database from it without too many suprises or difficulties and of course add some custom functionality too?

Thanks very much for any insights, this will help me out very much in deciding which of the myriad of tool paths to choose and of course, our management is of the opinion that these types of things can be developed in 1 or 2 weeks, and that's my main motivation for trying to find a rapid development tool like Studio Creator!

BobK

bobk5444 at 2007-7-7 0:06:23 > top of Java-index,Development Tools,Java Tools...
# 8

> Hello,

>

> In reading these posts, i am wondering if i can use

> Studio Creator to create some administrative

> utilities that are currently being done using Excel?

>

> I tried Studio Creator about 6 months ago and

> modified the Travel CRUD example and it seemed to

> work pretty well, the only concern i had at the time

> was the difficulty in debugging as too much

> information was core dumped and not enough about the

> specific problem!

>

> But in trying the latest examples, none of them seem

> to have the "sophistication" of an Excel spreadsheet,

> so if i use Studio Creator, can i expect to be able

> to create a simulated spreadsheet and update a

> database from it without too many suprises or

> difficulties and of course add some custom

> functionality too?

>

> Thanks very much for any insights, this will help me

> out very much in deciding which of the myriad of tool

> paths to choose and of course, our management is of

> the opinion that these types of things can be

> developed in 1 or 2 weeks, and that's my main

> motivation for trying to find a rapid development

> tool like Studio Creator!

>

> BobK

Unless your post is a reply to a prior post in the thread, please create a new thread with a new subject.

I don't think that is a very good approach. You appear to want to create a "simulated" spreadsheet - with the sophistication of Excel - doesn't that mean recreating the Excel program?

What's wrong with using Excel (or OpenOffice's spreadsheet, which is free and equivalent to Excel) and update a database directly from the spreadsheet, which they both can do? And both support customization via an in-built programming language.

ChuckBing at 2007-7-7 0:06:23 > top of Java-index,Development Tools,Java Tools...