Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Visual J++ Wont Work!

Posted on 2000-04-25
7
Medium Priority
?
296 Views
Last Modified: 2008-03-17
I have installed Visual J++ on my machine which is running Windows NT.

Whenever I try to run or compile a project I get the following error:

"Solution Package

Solution update failed, some files may not be updated - detailed information is listed in the task window. To continue & launch debug process, click ok. To stop the process click cancel. "

If I click cancel nothing happens.

Now if I choose OK I get:

"ERROR: Could not execute class 1 the system cannot find the file specified"

Then im forced to click OK and nothing happens.

I have a feeling it has something to do with the classpath, I set up Visual J++ on a Win98 machine with no problems.

Any help would be greatly appreciated,

thanks




0
Comment
Question by:colin_cool
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 

Expert Comment

by:Le_Ron
ID: 2750524
Hi Colin,
first of all, you should take a look to the task window as said in the message. Maybe you'll find a more complete description of the problem(s).
I also used MSJ++ under WinNT and i also had some troubles with the classpath. Unfortunately, this is still not clear for me but what i know may help you:
You have some directories in the winnt\java directory: 'classes', 'packages' and 'trustlib' where - i guess - all your packages have to be. This is the default location checked by the JVC (the compiler). An interresting command is the clspack. e.g. 'clspack -auto' creates a 'classes.zip' file in the winnt\java\classes directory that contains all Java packages currently installed by the packages manager.
You also have the 'classpath' environment variable and the the registry values for the classpath and the packages.
I hope this helps you understanding a bit more how it works. Everything goes well on my computer now, but i changed so many things that i am not able to say exactly what has to be where.

Maybe you'll find answers at : http://msdn.microsoft.com/library/periodic/period98/vji0798c.htm
0
 

Expert Comment

by:Tarif
ID: 2752164
Make sure that the name of the class containing your "main method" matches the <classename.java> in the project explorer.  Also check if you have no syntax errors in task list.
0
 

Author Comment

by:colin_cool
ID: 2757448
Thanks for the help guys.

Le Ron: Thanks for all that info, it gave me a better understanding of how things work ;-)

Tarif: Thanks for the tip, the class containing the main method does match the classname in the project explorer. The class name is Class1 and in the explorer window it is the same.

This is the most basic project you can create, it just has one java file, i have tried various java files all which compile under JDK.

I think I have isolated this problem a bit more.

What I did was to compile the class1.java file using the JDK to get the Class1.class file in the Visual J++ project directory.

Then, when I ran the project in Visual J++ it worked - I think this rules out the classpath being the problem, as once the .CLASS file is there it can find it.

Therefore, It looks like there is a problem actually generating the .CLASS file (that is what the 'solution update' message is saying)

The problem is that I can see absolutely no way of troubleshooting this, all the debug windows are empty, there is nothing in the task list window, the first error message occurs immediately. The way I see it the error: 'solution update failed' is simply saying 'i cannot create the .CLASS file for some reason' then the 2nd error:  "ERROR: Could not execute class 1 the system cannot find the file specified" is saying 'the class file has not been created so i can't find it'

If I just try to build, rather than execute the project I only get the first error.
 
I notice when I go to project properties, there are various flags etc...you can set at the execute stage and you can pick the executable to use (WJView), and the location of the CLASS file, this can be run from the command prompt for instance with various flags -this is no help since the .CLASS file can't be created.

In the compile stage It doesn't appear to be using an executable???? I would like to compile from the dos prompt with some flags set for debugging.etc.. but I can't see how to do this.

Any further suggestions on troubleshooting this would be much appreciated, its driving me crazy! ;-P

Thanks.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:colin_cool
ID: 2757459
Adjusted points from 50 to 85
0
 

Accepted Solution

by:
Le_Ron earned 400 total points
ID: 2759142
Hi Colin,

of course, your project has to be configured with the good parameters (which file should be run, ...) and maybe you should take a look at the classpath tab, it may be useful to check whether all directories are OK.

I also found an answered question in the MSDN, maybe it could help :

Whenever I attempt to compile a program, a "Solution Update Failed" message appears in Visual J++ 6.0. However, there are no tasks in the Task List. Why can't I compile anything?

Answer:

You might have an incorrect version of the file Comcat.dll installed on your computer.

There are two versions of this DLL:

Version 4.71: 22 KB (CORRECT version)
Version 5.00: 6 KB (INCORRECT version)
If you are running Windows NT and you find Comcat.dll version 5.0 on your system, do the following:


Unregister Comcat.dll version 5.0. To do this, on the Start menu, click Run, and type regsvr32 /u Comcat.dll.


Delete or rename the incorrect Comcat.dll file.


Copy Comcat.dll 4.71 version from the Visual J++ 6.0 CD to your [windir]/system[32] directory.

NOTE: You will find the correct version on the CD in the \Common\Ide\Ide98\Redist directory.


Register version 4.71.To do this, on the Start menu, click Run, and type regsvr32 Comcat.dll.


In the Control Panel, click Add/Remove Programs, select Microsoft Visual J++ 6.0, and click Reinstall to "repeat the last installation to restore missing files and settings".


0
 

Author Comment

by:colin_cool
ID: 2768056
Adjusted points from 85 to 100
0
 

Author Comment

by:colin_cool
ID: 2768057
Le Ron: you are a LEGEND!

Thanks matey, that worked! ;-))

Who would have thought a file so small could cause such a headache?? hehe

Thanks again for the help..much appreciated! your the best.



0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question