Solved

Visual J++ Wont Work!

Posted on 2000-04-25
7
283 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
  • 4
  • 2
7 Comments
 

Expert Comment

by:Le_Ron
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:colin_cool
Comment Utility
Adjusted points from 50 to 85
0
 

Accepted Solution

by:
Le_Ron earned 100 total points
Comment Utility
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
Comment Utility
Adjusted points from 85 to 100
0
 

Author Comment

by:colin_cool
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
powerN  challenge 3 46
count11 challenge 6 47
json format text only 4 64
mapBully challenge 6 88
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now